no message
Former-commit-id: 85ec7bbd986a27b5bf63f4c661bd992e0ee96cf7 Former-commit-id: c82d46c4a506965beb80b7c8dbea4e1650c91723 Former-commit-id: b7578889722e86782b775d382f87c5eb00ebd0b6
This commit is contained in:
51
src/components/demo/GithubLinkButton/index.vue
Normal file
51
src/components/demo/GithubLinkButton/index.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-popover
|
||||
ref="pop"
|
||||
placement="top"
|
||||
width="160"
|
||||
v-model="popover.visible">
|
||||
<p>访问 Github</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="popover.visible = false">取消</el-button>
|
||||
<el-button type="primary" size="mini" @click="jump">确定</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
<el-button
|
||||
v-popover:pop
|
||||
v-bind="$attrs"
|
||||
@click="popover.visible = true">
|
||||
view in
|
||||
<span class="fa fa-github"></span>
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'https://github.com/FairyEver'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
popover: {
|
||||
visible: false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump () {
|
||||
window.open(this.url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -31,6 +31,12 @@ Vue.component('GithubLink', resolve => {
|
||||
require(['@/components/demo/GithubLink'], resolve)
|
||||
})
|
||||
|
||||
// 名称:github 链接按钮
|
||||
// 用途:本质上这就是一个 github 的链接
|
||||
Vue.component('GithubLinkButton', resolve => {
|
||||
require(['@/components/demo/GithubLinkButton'], resolve)
|
||||
})
|
||||
|
||||
// 名称:SimpleMDE markdown 编辑器
|
||||
// 用途:SimpleMDE markdown 编辑器
|
||||
Vue.component('SimpleMDE', resolve => {
|
||||
|
||||
Reference in New Issue
Block a user