Commit b3cc4937 by Jaxon

feat(vscode配置): 更新VSCode设置并添加Vuex store代码片段

- 添加explorer.compactFolders和scm.compactFolders配置
- 格式化VSCode设置文件的缩进
- 新增Vue2+Vuex3的store模板代码片段
1 parent 6263e9c6
......@@ -2,12 +2,14 @@
"i18n-ally.localesPaths": [
"src/locales"
],
"problems.decorations.enabled": false,
"explorer.compactFolders": false,
"scm.compactFolders": false,
"problems.decorations.enabled": false,
"eslint.format.enable": true,
"[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"editor.autoIndent": "full",
"editor.autoIndent": "full",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
......@@ -25,4 +27,4 @@
}
},
"i18n-ally.sourceLanguage": "zh-chs"
}
}
\ No newline at end of file
......@@ -36,5 +36,34 @@
"</style>"
],
"description": "Vue 2 单文件组件模板"
},
"Vuex Store Template (Vue2)": {
"prefix": "vuexstore2",
"body": [
"export default {",
" state: {",
" ${1:count}: ${2:0},",
" },",
" getters: {",
" ${3:get${1/(.*)/${1:/capitalize}/}}: state => state.${1},",
" },",
" mutations: {",
" set${1/(.*)/${1:/capitalize}/}(state, payload) {",
" state.${1} = payload;",
" },",
" increment${1/(.*)/${1:/capitalize}/}(state, payload = 1) {",
" state.${1} += payload;",
" }",
" },",
" actions: {",
" ${4:increment${1/(.*)/${1:/capitalize}/}Async}({ commit }, payload) {",
" setTimeout(() => {",
" commit('increment${1/(.*)/${1:/capitalize}/}', payload);",
" }, 1000);",
" }",
" },",
"};"
],
"description": "Vue 2 + Vuex 3 的 store 模板"
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!