no message

Former-commit-id: 37bb7bd8096cc3f7e152f0b5c2a364c5e4e6fef9
Former-commit-id: a45f6374b941f4e286249accf326e70dc82755e2
Former-commit-id: 4f50b4e5fbd283f3e112fd0cfdcb29ed876f790b
Former-commit-id: 658786ee9b6049a45e6bdaac66afd90f56fd83b8
This commit is contained in:
liyang
2018-06-12 11:04:16 +08:00
parent 6852f6155f
commit 10ed0608f9
3 changed files with 26 additions and 4 deletions

View File

@@ -33,18 +33,21 @@ import '@/mock/register'
// vuex
import store from '@/store/index.js'
// 插件 log简化
import pluginLog from '@/plugin/log'
// 插件 导出文件
import pluginImport from '@/plugin/import'
// 插件 导出文件
import pluginExport from '@/plugin/export'
// 插件 log简化
import pluginLog from '@/plugin/log'
// 插件 打开页面
import pluginOpen from '@/plugin/open'
Vue.use(ElementUI)
Vue.use(pluginLog)
Vue.use(pluginImport)
Vue.use(pluginExport)
Vue.use(pluginLog)
Vue.use(pluginOpen)
Vue.config.productionTip = false

View File

@@ -2,7 +2,13 @@
<d2-container type="full">
<template slot="header">日期计算</template>
<template slot="footer">
<a href="https://github.com/iamkun/dayjs">https://github.com/iamkun/dayjs</a>
<el-button-group>
<el-button size="mini">依赖</el-button>
<el-button size="mini" @click="$open(link)">
<d2-icon name="link"/>
{{link}}
</el-button>
</el-button-group>
</template>
</d2-container>
</template>
@@ -10,5 +16,10 @@
<script>
import dayjs from 'dayjs'
export default {
data () {
return {
link: 'https://github.com/iamkun/dayjs'
}
}
}
</script>

8
src/plugin/open/index.js Normal file
View File

@@ -0,0 +1,8 @@
export default {
install (Vue, options) {
// 打开一个url
Vue.prototype.$open = (url = 'https://github.com/FairyEver') => {
window.open(url)
}
}
}