# 全局通用页面生成代码块
这里面的目录基本都是最常见的命令,也是比较通用的
TIP
先看命令列表可以快速熟悉所有的命令哦
# 命令列表
命令 | 描述 | 类型/语言 | 提示 | 备注 |
---|---|---|---|---|
evue | vue 基础 template 模板单文件 vue 文件,通用代码块 | html / html | 输入 evue 即可 | - |
evuedialog | vue 基础弹窗组件 template 模板单文件 vue 文件,通用代码块 | html / html | 输入 evue 即可 | - |
# evue
命令描述:vue 基础 template 模板单文件 vue 文件,通用代码块
快捷命令:evue
<template>
<div>
</div>
</template>
<script>
export default {
name: '',
mixins: [],
props: {},
components: {},
data () {
return {
}
},
watch: {},
computed: {},
created () {},
mounted () {},
methods: {
}
}
</script>
<style scoped lang="${1:scss}">
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
TIP
输入 evue 即可
# evuedialog
命令描述:vue 基础弹窗组件 template 模板单文件 vue 文件,通用代码块
快捷命令:evuedialog
<template>
<div>
<el-dialog
:title="title"
:visible.sync="visibleDialog"
:modal-append-to-body="false"
custom-class="dialog-box"
width="50%"
>
<div class="dialog-content">我是dialog</div>
<div class="dialog-footer">
<el-button type="info" size="small" @click="showModal = false">取消</el-button>
<el-button type="primary" :loading="loading" size="small" @click="confirmDialog">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: '',
mixins: [],
props: {},
components: {},
data () {
return {
title: '行政区域',
loading: false,
showModal: this.value
}
},
watch: {},
computed: {},
created () {},
mounted () {},
methods: {
// 组件显示的方法
show () {
this.showModal = true
this.loading = false
},
// 点击确定
confirmDialog () {
// 防爆点击
// if (this.loading) return
console.log('点击确定,如果需要回调,就调用 handleCallBack 方法即可')
},
// 操作成功,回调
handleCallBack () {
this.$$emit('handleCallBack')
}
}
}
</script>
<style scoped lang="scss">
.dialog-box {
// dialog 整体样式
}
.dialog-content {
// dialog-content 样式
}
.dialog-footer {
// dialog footer 样式
}
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
TIP
输入 evue 即可