參考"小鳥(niǎo)睡在我身旁"的問(wèn)題答案 https://segmentfault.com/q/1010000017374634
1.文件->首選項(xiàng)->用戶片段: 輸入vue,找到vue.json
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div :class=\"\\$style['container']\">",
" $Index",
" </div>",
"</template>",
"",
"<script>",
"export default {",
" name: 'Index',",
" data() {",
" return {",
" };",
" },",
" methods: {},",
"};",
"</script>",
"",
"<style lang=\"less\" module>",
" .container {",
" }",
"</style>",
""
],
"description": "Log output to console"
}
}
vue.json文件中:
\ 用來(lái)轉(zhuǎn)義 如 \"
$ 用來(lái)控制光標(biāo)位置
\\$ 轉(zhuǎn)義$ ,可以輸出$字符