VSCode相关
插件
- vscode-pigments:实时预览设置的颜色
- Live Server:本地静态服务
- Image preview:实时预览图片
- Prettier - Code formatter:代码格式化
- Material Icon Theme:vscode文件目录图标
在vscode终端使用命令删除node_modules
shell
$ Remove-Item -Recurse -Force node_modulessettings.json
js
{
"workbench.colorTheme": "Default High Contrast",
"editor.fontSize": 20,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.linkedEditing": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[markdown]": {
"editor.defaultFormatter": "vscode.markdown-language-features"
},
"prettier.arrowParens": "avoid",
"prettier.bracketSpacing": true,
"prettier.endOfLine": "auto",
"prettier.htmlWhitespaceSensitivity": "strict",
"prettier.singleAttributePerLine": true,
"prettier.bracketSameLine": false,
"prettier.jsxSingleQuote": true,
"prettier.printWidth": 80,
"prettier.proseWrap": "always",
"prettier.quoteProps": "as-needed",
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.tabWidth": 2,
"prettier.trailingComma": "none",
"prettier.useTabs": false,
"prettier.vueIndentScriptAndStyle": true,
"prettier.embeddedLanguageFormatting": "auto",
"search.followSymlinks": false,
"liveServer.settings.donotShowInfoMsg": true,
"editor.accessibilitySupport": "on",
"workbench.iconTheme": "material-icon-theme",
"json.validate.enable": false,
"editor.largeFileOptimizations": true,
}全局代码
js
"v3ts": {
"prefix": "v3ts",
"body": [
"<script setup lang=\"ts\">",
"</script>",
"",
"<template>",
"<div class=\"$1\"></div>",
"</template>",
"",
"<style scoped lang=\"scss\">",
"</style>"
],
"description": "输入v3ts生成vue3组件模板(ts)"
},
"v3js": {
"prefix": "v3js",
"body": [
"<script setup>",
"</script>",
"",
"<template>",
"<div class=\"$1\"></div>",
"</template>",
"",
"<style scoped lang=\"scss\">",
"</style>"
],
"description": "输入v3js生成vue3组件模板(js)"
},
"u3ts": {
"prefix": "u3ts",
"body": [
"<script setup lang=\"ts\">",
"</script>",
"",
"<template>",
"<view class=\"$1\"></view>",
"</template>",
"",
"<style scoped lang=\"scss\">",
"</style>"
],
"description": "输入u3ts生成uniapp vue3组件模板(ts)"
},
"u3js": {
"prefix": "u3js",
"body": [
"<script setup>",
"</script>",
"",
"<template>",
"<view class=\"$1\"></view>",
"</template>",
"",
"<style scoped lang=\"scss\">",
"</style>"
],
"description": "输入u3js生成uniapp vue3组件模板(js)"
},
"v2": {
"prefix": "v2",
"body": [
"<template>",
"<div class=\"$1\"></div>",
"</template>",
"",
"<script>",
"export default {",
" components: {},",
" props: {},",
" data: () => ({}),",
" created(){},",
" mounted(){},",
" computed: {},",
" watch: {},",
" methods: {}",
"}",
"</script>",
"",
"<style scoped lang=\"scss\">",
"</style>"
],
"description": "输入vue2生成vue2组件模板"
},
"mComment": {
"prefix": "mComment",
"body": [
"/*",
" * Author: Symbol(王独秀)",
" * Date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
" * Description: $1",
" */"
],
"description": "输入mComment生成带作者日期注释的多行注释"
},
"gPinia": {
"prefix": "gPinia",
"body": [
"import { defineStore } from 'pinia'",
"",
"export const useDemoStore = defineStore('demo', () => {",
" $1",
" return {}",
"})"
],
"description": "生成pinia代码片段"
}