pure-admin-thin/README.md

48 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 前端Vue.js命名规范
#### 变量命名
- 使用驼峰命名法camelCase来命名变量首字母小写。
- 示例:`userInfo`, `selectedItem`.
#### 函数命名
- 同样使用驼峰命名法,以动词开头描述函数的操作。
- 示例:`getUserData()`, `updateUserProfile()`.
#### 组件命名
- 使用帕斯卡命名法PascalCase来命名组件每个单词的首字母都大写。
- 示例:`UserProfile`, `ProductList`.
#### 文件命名
- 使用帕斯卡命名法来命名 Vue 组件文件,同时在文件名中体现出组件的用途。
- 示例:`UserProfile.vue`, `ProductList.vue`.
#### 常量命名
- 常量全部大写,多个单词间使用下划线分隔。
- 示例:`MAX_ITEMS`, `API_ENDPOINTS`.
#### CSS 类名
- 使用连字符kebab-case来命名类名保持一致。
- 示例:`user-profile`, `product-card`.
#### 路由命名和地址规范
- 使用小写字母和连字符kebab-case来命名路由地址。
- 示例:`/user-profile`.
---
### 运行命令:
```bash
npm install -g pnpm # 下载 pnpm
pnpm install # 下载配置项
pnpm dev # 运行
pnpm build # 打包
```