{
// Place your 全局 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"mylog": {
// "scope": "javascript,typescript,vue", //注释表示所有文件中可用
"prefix": "mylog",
"body": [
"console.log('')",
],
"description": "自定义 console.log()"
},
"mybutton": {
// "scope": "javascript,typescript,vue", //注释表示所有文件中可用
"prefix": "mybutton",
"body": [
"<button @click=\"method\">查询</button>",
"",
],
"description": "自定义 button"
},
"mytextoneway": {
// "scope": "javascript,typescript,vue", //注释表示所有文件中可用
"prefix": "mytextoneway",
"body": [
"<input type=\"text\" v-bind:value=\"nickname\">",
"",
],
"description": "自定义 input text"
},
"mytexttwoway": {
// "scope": "javascript,typescript,vue", //注释表示所有文件中可用
"prefix": "mytexttwoway",
"body": [
"<input type=\"text\" v-model:value=\"nickname\">",
"",
],
"description": "自定义 input text"
},
"mydiv": {
// "scope": "javascript,typescript,vue", //注释表示所有文件中可用
"prefix": "mydiv",
"body": [
"<div id=\"root\">",
"",
"</div>",
],
"description": "自定义script"
},
// 自定义 script 动态生成代码片段
"myscript": {
// "scope": "javascript,typescript,vue", //注释表示所有文件中可用
"prefix": "myscript",
"body": [
"<script type=\"text/javascript\">",
"",
"</script>",
],
"description": "自定义script"
},
"myVue": {
// "scope": "javascript,typescript,vue", //注释表示所有文件中可用
"prefix": "myVue",
"body": [
"//console.log(vm)"
"const vm = new Vue({",
"el: '#root',",
"data: {",
"",
"},"
"",
"methods: {"
"methodOne() {",
"alert('事件触发成功!')"
"},"
"",
"methodTwo(event, str) {",
"alert('事件触发成功!' + str)"
"},"
"},"
"})",
],
"description": "自定义script"
}
}
博客内容主要用于日常学习记录,内容比较随意,如有问题,还需谅解!!!

浙公网安备 33010602011771号