1、搭环境html
官网:https://weapp.iviewui.com/docs/guide/startgit
1、到 GitHub 下载 iView Weapp 的代码,将 dist 目录拷贝到本身的项目中。而后按照以下的方式使用组件,以 Button 为例,其它组件在对应的文档页查看:github
① 添加须要的组件。在页面的 json 中配置(路径根据本身项目位置配置):npm
"usingComponents": {json
"i-button": "../../dist/button/index"}小程序
② 在 wxml 中使用组件:微信小程序
<i-button type="primary" bind:click="handleClick">这是一个按钮</i-button>微信
二、或按如下方式在微信开发者工具中查看:微信开发
# 从 GitHub 下载后,安装依赖npm installapp
# 编译组件npm run dev
而后,将 examples 目录在微信开发者工具中打开便可。
三、分包加载
https://developers.weixin.qq.com/miniprogram/dev/framework/subpackages/basic.html