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