scorpio 1 rok pred
rodič
commit
65d76efeef

+ 8 - 0
lua/cmp/snippets/vscode/flex-center.json

@@ -0,0 +1,8 @@
+{
+  "snip1": {
+    "prefix": "flex-center",
+    "body": [
+      "flex flex-center flex-col"
+    ]
+  }
+}

+ 9 - 0
lua/cmp/snippets/vscode/js/api.json

@@ -0,0 +1,9 @@
+{
+  "api": {
+    "prefix": "api",
+    "description": "API 数据请求 ",
+    "body": [
+      "this.\\$api.$1($2).then(res => {\n        if (res.code === 200) {\n          console.log(res)\n        } else {\n          console.log(res.msg)\n        }\n      })"
+    ]
+  }
+}

+ 9 - 0
lua/cmp/snippets/vscode/js/log.json

@@ -0,0 +1,9 @@
+{
+  "log": {
+    "prefix": "log",
+    "body": [
+      "console.log($1)"
+    ],
+    "description": "console log"
+  }
+}

+ 12 - 0
lua/cmp/snippets/vscode/package.json

@@ -7,6 +7,18 @@
                     "lua"
                 ],
                 "path": "./lua.json"
+            },
+            {
+                "language": [
+                    "vue"
+                ],
+                "path": "./js/log.json"
+            },
+            {
+                "language": [
+                    "vue"
+                ],
+                "path": "./js/api.json"
             }
     ]
   }