简介
Mobile Legacy Template 是一个开源的移动端模版。
特性
- 技术栈:使用 Vue2/Vite2/Vant2 等前端前沿技术开发
- TypeScript: 应用程序级 JavaScript 的语言
准备
- [Node] 和 [Git]
- [Vite]
- [Vue2]
- [Vant2]
安装使用
git clone https://gitee.com/jh_shot/mobile-legacy-template.git
npm i
npm run dev
npm run build
注意事项
- 与 vue3 不同, 不能用 hooks 的方式封装 render 函数,会被编译函数式组件而不是函数
- 插槽统一使用 scopedSlots 属性传递,以便升级 vue3 后用 v-slots 代替
- 由于不能用 scoped 样式,类名的命名规则为:
- 父组件:
目录名
- 子组件:
父组件目录名首字母缩写-子组件目录名
- 图片命名规则:
目录名缩写-组件目录名缩写-编号