1.创建项目;
2.在项目根目录下(pages)打开命令行,初始化执行命令: npm init
3.安装npm 执行命令: npm install
如果遇到npm notice created a lockfile as package-lock.json. You should commit this file
请尝试:npm install -production docxtemplater命令
4.小程序工具打开项目,菜单设置中有工具选项,其中有一个:构建npm
5.成功之后直接到组件官方文档中下载文件,里面有相应的操作说明,引用即可
以下是小程序常用的官方组件或其他开发组件:
(1) https://github.com/TalkingData/iview-weapp 基于Vue.js组件库;
官方文档: https://weapp.iviewui.com/;
(无演示文档)
(2) https://github.com/samwang1027/mpvue-zanui Web UI 规范 ZanUI 的小程序现实版本 ;
npm下载:npm i mpvue-zanui
官方文档: https://youzan.github.io/vant-weapp/#/intro
(内涵页面演示)
(3) https://github.com/wux-weapp/wux-weapp 微信小程序自定义 UI 组件库 ;
npm下载:npm i wux-weapp;
官方文档: https://wux-weapp.github.io/wux-weapp-docs/#/
(无演示 组件较全面)