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 .vue
type support plugin by running Volar: Switch TS Plugin on/off
from VSCode command palette.
node node_modules/esbuild/install.js
-
规范
- 1.命名
- 变量以及i18n key 采用蛇形命名)(下划线分隔 例如:post_user)
- 方法使用驼峰(首字母小写,例如:editUser)
- js文件使用驼峰(首字母小写,例如:getDate)
- vue使用驼峰(首字母大写写,例如:User)
- sass
- class 蛇形命名(横杠分隔 例如:login-contain)
- 1.命名
正式环境运行
cp .env.example .env.production
本地运行
cp .env.example .env.development
运行:
npm install
npm run serve
打包:
npm run build
目录树
.
├── README.md
├── babel.config.js
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
├── src
│ ├── App.vue
│ ├── api
│ ├── assets
│ │ ├── css
│ │ ├── img
│ ├── components
│ │ ├── common
│ │ │ ├── Bread.vue
│ │ │ ├── Header.vue
│ │ │ ├── Home.vue
│ │ │ ├── Sidebar.vue // 侧边栏菜单
│ │ │ ├── Tags.vue
│ │ │ ├── TreeMenu.vue
│ │ │ ├── bus.js
│ │ │ ├── directives.js
│ │ │ └── i18n // 中英文
│ │ └── page // 页面
│ ├── main.js
│ ├── router
│ │ └── index.js
│ ├── store
│ │ └── index.js
│ └── utils
│ └── request.js
└── vue.config.js
- 权限页面
- 设计
- 三层设计,上层为侧边栏目录为两层接口,最下层为按钮级
- 权限采用唯一key 标识, 统一通过has_permission 方法获取是否有权限
- 设计
- 登录 / 注销
- 权限验证
- 页面权限
- 指令权限
- 权限配置
- 文件
- 上传文件
- 运行文件
IE / Edge |
Firefox |
Chrome |
Safari |
iOS Safari |
Samsung |
Opera |
---|---|---|---|---|---|---|
IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |