1 Star 12 Fork 3

BaiHuaYang/vue-vant-template

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

vue-vant-template

vue vant h5应用脚手架集成模版,集成封装框架:vant-ui、axios、eslint、commit lint、stylelint、vConsole、gzip ... 等等

国内仓库:https://gitee.com/uzhan/vue-vant-template

功能点

vant ui

脚手架已集成vant-ui按需引入,对应文件src/vant.js

axios

封装axios请求以及自定义错误处理,目录:src/utils/request.js

copy

脚手架已集成clipboard,实现一键复制。

vConsole

vConsole只应用于开发环境,正式环境不会使用到。对应代码:src/main.js

移动端适配

脚手架集成pxtorem 基准值为37.5,建议设计图UI尺寸750。代码中可直接写px单位即可,无须单独转换

日期工具类

本框架对常用的日期工具类进行了封装,方便开发时使用,不需要重复造轮子

gzip打包压缩代码

通过配置压缩工具,可以在build的时候,自动将静态资源压缩为gz文件,当部署的服务器启用gzip功能后,将会自动加载压缩的文件,提高加载速度

提交规范

虽然定义了eslintstylelint,但是假如在提交代码时不去校验,那么也无法有效的限制,所以定义了提交规范,在提交时会自动校验代码格式,并自动格式化。

同时,对于提交,也添加了commitlint,提交时需要按照固定的格式进行提交,如 git commit -m 'feature: 增加了一个新的功能',具体可参考commitlint.config.js文件内的注释

代码规范

本框架内部集成了eslintstylelint,全方位的去管控代码规范,为了方便使用,建议使用开发工具如 vscode 时需要安装eslintstylelint插件

Project setup

yarn install

Compiles and hot-reloads for development

yarn start

Compiles and minifies for production

yarn build

Lints and fixes files

yarn lint

issue

该项目也会不断的完善,如遇到问题可在issue提交~

Tip

  • 1.对于moment H5应用中建议使用dayjs替代。
  • 2.对于sass,由于node-sass的不稳定性,建议使用less替代

Customize configuration

See Configuration Reference.

License

MIT license.

Copyright (c) 2021-present BaiHuaYang

MIT License Copyright (c) 2021 HuaYang Bai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于vue2/3+vant的H5集成模版,快速搭建Vue H5项目。 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/uzhan/vue-vant-template.git
git@gitee.com:uzhan/vue-vant-template.git
uzhan
vue-vant-template
vue-vant-template
main

搜索帮助