如何在微信小程序中使用iview weapp

1.首先去github上下载,下载地址:https://github.com/TalkingData/iview-weapp

2.下载并将其解压之后讲dist文件夹拷贝到项目中

3.需要添加什么组件,只需要在对应的json文件中进行配置即可,如下:

{
  "component":true, 
  "usingComponents": {
    "i-notice-bar":"../../dist/notice-bar/index"
  }
}

4.在wxml中使用组件即可

<!--滚动公告-->

<view class='margin-top'>

<i-notice-bar icon="systemprompt" loop>2018年世界杯,将于6月14日至7月15日举行</i-notice-bar>

</view>

猜你喜欢

转载自blog.csdn.net/weixin_42679187/article/details/86648862