|
1 |
| -# Vue 3 + TypeScript + Vite |
| 1 | +[在线 Demo](https://lch-coder.github.io/buildElement/login) |
2 | 2 |
|
3 |
| -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](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more. |
| 3 | +## 特性 |
4 | 4 |
|
5 |
| -## Recommended IDE Setup |
| 5 | +- ⚡️ Vue3、vite4、pnpm 快速搭建项目 |
| 6 | +- 🗂 动态路由 |
| 7 | +- 📦 组件自动化加载 |
| 8 | +- 🍍 使用 Pinia 的状态管理 |
| 9 | +- 📑 布局系统 |
| 10 | +- 🎨 UnoCSS - 高性能且极具灵活性的即时原子化 CSS 引擎 |
| 11 | +- 😃 支持多种图标 |
| 12 | +- 🔥 使用 新的<script setup>语法 |
| 13 | +- 🤙🏻 多种有趣的功能 |
| 14 | +- 📥 API 自动加载 - 直接使用 Composition API 无需引入 |
| 15 | +- 🦾 TypeScript |
6 | 16 |
|
7 |
| -- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) |
| 17 | +## 预配置 |
8 | 18 |
|
9 |
| -## Type Support For `.vue` Imports in TS |
| 19 | +### UI 框架 |
10 | 20 |
|
11 |
| -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: |
| 21 | +- Element Plus - Vue3 UI 组件库 |
| 22 | +- UnoCSS - 高性能且极具灵活性的即时原子化 CSS 引擎 |
12 | 23 |
|
13 |
| -1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled. |
14 |
| -2. Reload the VS Code window by running `Developer: Reload Window` from the command palette. |
| 24 | +### Icons |
15 | 25 |
|
16 |
| -You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471). |
| 26 | +- Iconify - 使用任意的图标集 |
| 27 | +- UnoCSS 的纯 CSS 图标方案 |
| 28 | + |
| 29 | +### 插件 |
| 30 | + |
| 31 | +- Vue Router |
| 32 | +- Pinia - 直接的, 类型安全的, 使用 Composition api 的轻便灵活的 Vue 状态管理 |
| 33 | +- unplugin-vue-components - 自动加载组件 |
| 34 | +- unplugin-auto-import - 直接使用 Composition API 等,无需导入 |
| 35 | +- VueUse - 实用的 Composition API 工具合集 |
| 36 | + |
| 37 | +### 编码风格 |
| 38 | + |
| 39 | +- 使用 Composition API 的 <script setup>SFC 语法 |
| 40 | +- ESLint、Prettier |
| 41 | + |
| 42 | +### 开发工具 |
| 43 | + |
| 44 | +- TypeScript |
| 45 | +- pnpm - 快, 节省磁盘空间的包管理器 |
| 46 | +- VS Code 扩展 |
| 47 | + - Vite - 自动启动 Vite 服务器 |
| 48 | + - Volar - Vue 3 <script setup> IDE 支持 |
| 49 | + - ESLint |
| 50 | + - Prettier |
| 51 | + - UnoCSS |
| 52 | + |
| 53 | +## 使用 |
| 54 | + |
| 55 | +### 安装依赖 |
| 56 | + |
| 57 | +pnpm install |
| 58 | + |
| 59 | +### 开发 |
| 60 | + |
| 61 | +pnpm dev |
| 62 | + |
| 63 | +### 构建 |
| 64 | + |
| 65 | +pnpm build |
| 66 | + |
| 67 | +## 系统功能 |
| 68 | + |
| 69 | +### 多级菜单 |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +### 拖拽布局 |
| 74 | + |
| 75 | +> 使用 vue-grid-layout、echarts 搭建数据看板 |
| 76 | +
|
| 77 | + |
| 78 | + |
| 79 | +### 分割面板 |
| 80 | + |
| 81 | +> 使用 splitpanes 的例子 |
| 82 | +
|
| 83 | + |
| 84 | + |
| 85 | +### 可插入 dom 节点的文本框 |
| 86 | + |
| 87 | +> 基于 codemirror6 开发的文本框,支持插入 dom 节点 |
| 88 | +
|
| 89 | + |
| 90 | + |
| 91 | +### 页面缓存 |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +### 动态路由 |
| 96 | + |
| 97 | +> 根据登录用户的菜单,生成路由数据,动态添加。 |
| 98 | +
|
| 99 | +### 404 页面 |
| 100 | + |
| 101 | +> 页面不存在,跳到 404 页面 |
| 102 | +
|
| 103 | + |
| 104 | +表格封装 |
| 105 | + |
| 106 | +> 二次封装 el-table,支持插槽、动态多级表头导出等。 |
| 107 | +
|
| 108 | + |
| 109 | + |
| 110 | +### 图标集 |
| 111 | + |
| 112 | + |
0 commit comments