{
  // 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"
  // }
  // HTML注释区域
  // 取消下行格式化
  "pig": {
    "prefix": "pig",
    "body": [
      "prettier-ignore"
    ],
    "description": "prettier-ignore"
  },
  // 注释
  "codeNoteCommon": {
    "prefix": "codeNoteCommon",
    "body": [
      "//# ====== $0"
    ],
    "description": "tempLog"
  },
  "codenoteHTML": {
    "prefix": "codenoteHTML",
    "body": [
      "<!--#region  $0 -->",
      "",
      "<!--#endregion -->"
    ],
    "description": ""
  },
  // JS注释区域
  "codenoteJS": {
    "prefix": "codenoteJS",
    "body": [
      "//#region ===== $0 ",
      "",
      "//#endregion"
    ],
    "description": ""
  },
  // 测试标记
  "test": {
    "prefix": "test",
    "body": [
      "// // dev-test"
    ],
    "description": "tempLog"
  },
  // 临时测试输出--极简版
  "tempLog": {
    "prefix": "tLog",
    "body": [
      "// // dev-log >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",
      "console.log(`[Dev_Log][${''}_$0]_>>>`,$1)",
      ""
    ],
    "description": "tempLog"
  },
  // 临时测试输出--图形版
  "tempLogV2": {
    "prefix": "tLogV2",
    "body": [
      "// // dev-log >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",
      "// prettier-ignore",
      "console.log('%c[Dev_Log]','background-color: #e8f4ff;color: #1890ff; padding: 4px 8px; border: 1px solid #d1e9ff;border-radius: 4px;')",
      "console.log(`[Dev_Log][${''}_$0]_>>>`,$1)",
      ""
    ],
    "description": "tempLogV2"
  },
  // Promise then接法
  "thenSnippet": {
    "prefix": "thenSnippet",
    "body": [
      ".then(res=>{",
      "  console.log('[Dev_Api_res][$0]_>>>',res)",
      "  if(!res.code){",
      "    $1",
      "  }",
      "})",
      // $ 不会显示,$$(但是有光标定位) 多写一个 可展示
      // $ 不会显示,\\$ 多写一个 可展示
      ".catch(err=>this.$$message.error(err))",
      ".finally(()=>{})"
    ],
    "description": "thenSnippet"
  },
  // ES7 async接法
  "asyncSnippet": {
    "prefix": "asyncSnippet",
    "body": [
      "async function (){",
      "  try{",
      "    let res$2 = await this.$1API(this.accountModel)",
      "    console.log('[Dev_Api_res][$3]_>>>',res)",
      "  }",
      "  catch(err){",
      "    // this.$message.warning(err?.message || err || \"未知错误!\") ",
      "  }",
      "  finally{}",
      "} "
    ],
    "description": "asyncSnippet"
  },
  // 箭头函数 接法
  "constArrowFunc": {
    "prefix": "constArrowFunc",
    "body": [
      "const handle$1 = () => {};",
    ],
    "description": "constArrowFunc"
  },
  // 异步箭头函数 接法
  "asyncArrowFunc": {
    "prefix": "asyncArrowFunc",
    "body": [
      "const $0 = async () => {",
      "  try {",
      "    let params = {};",
      "    const res = await curAPI(params);",
      "    if (res && res.code === 0) {",
      "      // doSomething",
      "    }",
      "  } catch (error) {",
      "    // showNotify({",
      "    //   type: 'danger',",
      "    //   message: error.message || error,",
      "    // });",
      "  } finally {",
      "  }",
      "};"
    ],
    "description": "asyncArrowFunc"
  },
  // vueFile template
  "vue2": {
    "prefix": "vue2",
    "body": [
      "<template>",
      "  <div>",
      "",
      "  </div>",
      "</template>",
      "",
      "<script>",
      "// import Vue from 'vue'",
      "export default {",
      "    name:'$0',",
      "    props:{},",
      "    components:{},",
      "    computed:{},",
      "    data() {",
      "        return {",
      "            ",
      "        }",
      "    },",
      "    methods:{},",
      "    mounted(){}",
      "}",
      "</script>",
      "",
      "<style lang=\"scss\" scoped></style>"
    ],
    "description": ""
  },
  "vue3temp": {
    "prefix": "vue3temp",
    "body": [
      "<template>",
      "  <div class=\"page-wrapper\">page-template</div>",
      "</template>",
      "",
      "<script setup lang=\"js\">",
      "import { ref, computed, onMounted } from 'vue';",
      "</script>",
      "",
      "<style lang=\"scss\" scoped>",
      ".page-wrapper {",
      "}",
      "</style>",
      "  "
    ],
    "description": "vue3temp"
  },
  // vueFile Mixin template
  "vmixin": {
    "prefix": "vmixin",
    "body": [
      "// import Vue from 'vue'",
      "export default {",
      "    components:{},",
      "    computed:{},",
      "    data() {",
      "        return {",
      "            ",
      "        }",
      "    },",
      "    methods:{},",
      "    mounted(){}",
      "}"
    ],
    "description": ""
  },
  // vueFile code_annotation template
  "code_annotation": {
    "prefix": "code_annotation",
    "body": [
      "<!-- ",
      "    author:sam9029",
      "    desc:代码区域组件",
      "    create_date:2023-09-01",
      "    update_date:2023-09-01",
      "    version:1.0",
      " -->"
    ],
    "description": ""
  },
  "Annotation Title": {
    "prefix": "AnnotationTitle",
    "body": [
      "/*",
      " * * * * * * * * * * * * * * * * * * * * * *",
      " *              something                  * ",
      " * * * * * * * * * * * * * * * * * * * * * *",
      " */",
      ""
    ],
    "description": "Annotation Title"
  }
}
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243