2024-08-23 17:19:10 +08:00
|
|
|
|
# 营销系统 模版H5
|
2024-08-23 16:01:52 +08:00
|
|
|
|
```
|
2024-11-01 11:58:46 +08:00
|
|
|
|
### 依赖包工具 默认 npm (pnpm 需要注释 webpack.base.js 配置 resolve-modules)
|
2024-08-23 17:19:10 +08:00
|
|
|
|
|
2024-08-23 16:01:52 +08:00
|
|
|
|
npm install
|
2024-09-12 14:40:58 +08:00
|
|
|
|
```
|
|
|
|
|
### 分支介绍
|
|
|
|
|
```
|
2024-11-01 11:58:46 +08:00
|
|
|
|
test 测试分支
|
|
|
|
|
main 生产分支
|
2024-08-23 16:01:52 +08:00
|
|
|
|
```
|
|
|
|
|
|
2024-08-23 17:19:10 +08:00
|
|
|
|
### 启动项目
|
2024-08-23 16:01:52 +08:00
|
|
|
|
```
|
2024-08-23 17:19:10 +08:00
|
|
|
|
npm run start
|
2024-08-23 16:01:52 +08:00
|
|
|
|
```
|
|
|
|
|
|
2024-11-01 11:58:46 +08:00
|
|
|
|
### 测试/生产打包
|
2024-08-23 16:01:52 +08:00
|
|
|
|
```
|
2024-08-23 17:19:10 +08:00
|
|
|
|
npm run build
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 单独打包 模版 js
|
2024-08-23 16:01:52 +08:00
|
|
|
|
```
|
2024-09-13 18:47:34 +08:00
|
|
|
|
### webpack.com.js-entry 配置需要打包的模版入口
|
|
|
|
|
|
|
|
|
|
模版开发
|
2024-11-07 17:34:23 +08:00
|
|
|
|
环境:H5(正常业务)+ 模版引入(配置样式)
|
2024-09-13 18:47:34 +08:00
|
|
|
|
|
|
|
|
|
规范:
|
|
|
|
|
目录 /src/views/templates
|
|
|
|
|
命名 cmsXxxx
|
2024-11-01 11:58:46 +08:00
|
|
|
|
"类组件"开发 + 外部文件引入样式 (index.scss)
|
2024-11-07 17:34:23 +08:00
|
|
|
|
props.comType: 1 H5; 2 配置页
|
2024-09-13 18:47:34 +08:00
|
|
|
|
cdn 引入图片
|
|
|
|
|
|
|
|
|
|
注意事项:
|
2024-11-07 17:34:23 +08:00
|
|
|
|
1、开发完成 配置(comType: 2)模拟模版引入,校验页面是否正确;
|
|
|
|
|
2、模版引入不推荐 vh、fixed 等;(需要样式兼容 H5 fixed + 模版 absolute/sticky)
|
|
|
|
|
3、模版引入暂不支持直接引入子组件(全局/子组件),可通过动态组件引入;
|
2024-08-23 16:01:52 +08:00
|
|
|
|
|
2024-08-23 17:19:10 +08:00
|
|
|
|
npm run com
|
|
|
|
|
```
|