关于VSCode添加自定义代码块-Vue模块的添加
文件→首选项→用户片段→全局设置(该文件是在html中添加vue模版)
文件中的内容为:
1 { 2 "create a new Vue":{ 3 "scope": "",//指定该代码块作用文件类型,css表示作用Css文件,多个文件类型用“,"号隔开(譬如:"css,javascript"表示作用于Css及JS重起作用)不写或则为空则表示均有效. 4 "prefix": "vue",//触发代码块的字符,该处表示Vue触发 5 "body": [ 6 "<div id='content'>", 7 8 "</div>", 9 10 "<script src='./Vue/vue.js'></script>", 11 " <script>", 12 " const content = new Vue({", 13 " el:'#content',", 14 " data:{", 15 16 " },", 17 " methods:{", 18 19 " },", 20 " components:{", 21 22 " }", 23 " });", 24 "</script>" 25 ] 26 } 27 }
浙公网安备 33010602011771号