// 启动项目
pnpm run dev
易联盟全新页面
EditorConfig 有助于为不同 IDE 编辑器上处理同一项目的多个开发人员维护一致的编码风格。
# http://editorconfig.org
root = true
[*] # 表示所有文件适用
charset = utf-8 # 设置文件字符集为 utf-8
indent_style = space # 缩进风格(tab | space)
indent_size = 2 # 缩进大小
end_of_line = lf # 控制换行类型(lf | cr | crlf)
trim_trailing_whitespace = true # 去除行首的任意空白字符
insert_final_newline = true # 始终在文件末尾插入一个新行
[*.md] # 表示仅 md 文件适用以下规则
max_line_length = off
trim_trailing_whitespace = false
VSCode 需要安装一个插件:EditorConfig for VS Code
{
"useTabs": false, // 使用tab缩进还是空格缩进,选择false;
"tabWidth": 2, // tab是空格的情况下,是几个空格,选择2个;
"printWidth": 80, // 当行字符的长度,推荐80,也有人喜欢100或者120;
"singleQuote": true, // 使用单引号还是双引号,选择true,使用单引号;
"trailingComma": "none", // 在多行输入的尾逗号是否添加,设置为 none;
"semi": false // 语句末尾是否要加分号,默认值true,选择false表示不加
}
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
Since TypeScript cannot handle type information for .vue
imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in .vue
imports (for example to get props validation when using manual h(...)
calls), you can enable Volar's Take Over mode by following these steps:
- Run
Extensions: Show Built-in Extensions
from VS Code's command palette, look forTypeScript and JavaScript Language Features
, then right click and selectDisable (Workspace)
. By default, Take Over mode will enable itself if the default TypeScript extension is disabled. - Reload the VS Code window by running
Developer: Reload Window
from the command palette.
You can learn more about Take Over mode here.