vue_ts_large_scale/README.md

63 lines
1.4 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-pinia 看板 scale 布局
欢迎使用 bunny-cli。
这个项目模板只涉及 scale不涉及其它内容。
## 路由相关
- 目前打包为了适应 apk 所以打包路由使用的是 hash 路由如果没有这方面需求,同时也不需要 hash 路由需要在`router/index.ts`下删除。
## 安装的包
1. 使用`v-scale-screen`
2. 去除了`postcss.config.js`
## 优缺点
### 优点
1. 开发容易。
2. 同比例放大,完美还原设计稿。
### 缺点
1. 文字易模糊。
2. 如果不是 16:9 的屏幕下会有留白;但是是 100%按照设计稿进行。
3. 如果地图点击事件等会有热区事件失踪。
## 注意事项
### 目录结构
```
├─api
│ ├─v1
│ └─v2
├─assets
│ ├─css
│ │ └─common
│ └─images
│ └─tip
├─component
│ └─table
├─lib
├─router
├─store
├─utils
└─views
```
### 打包成 apk
1. 如果需要打包成 apk要将路由改为 hash 路由。
2. 打包成 apk 将公共路径改为`./`。
3. 打包成 apk需要考虑跨域跨域由于打包时没有 NGINX 做代理,所以无法完成,只能后端做跨域,否则接口访问不到。
4. 要设置 APPID因为 HBuilderX 必须要获取。
### docker 配置
默认配置中已经集成了 NGINX 和 dockfile 文件,后面自动化部署等直接用即可