微信小程序vant ui安装

Vant 安装

第一种方式

根据开发文档安装https://youzan.github.io/vant-weapp/#/quickstart

第二种方式

输入npm init -y

输入npm i @vant/weapp@1.3.3 -S --production

2、构建npm

3、删除  "style": "v2",

在app.json中添加常用的组件


  "usingComponents": {
    "van-button": "@vant/weapp/button/index",
    "van-cell": "@vant/weapp/cell/index",
    "van-cell-group": "@vant/weapp/cell-group/index",
    "van-divider": "@vant/weapp/divider/index",
    "van-field": "@vant/weapp/field/index",
    "van-grid": "@vant/weapp/grid/index",
    "van-grid-item": "@vant/weapp/grid-item/index",
    "van-icon": "@vant/weapp/icon/index",
    "van-picker": "@vant/weapp/picker/index",
    "van-tag": "@vant/weapp/tag/index",
    "van-image": "@vant/weapp/image/index",
    "van-row": "@vant/weapp/row/index",
    "van-col": "@vant/weapp/col/index",
    "van-notice-bar": "@vant/weapp/notice-bar/index",
    "van-checkbox": "@vant/weapp/checkbox/index",
    "van-checkbox-group": "@vant/weapp/checkbox-group/index",
    "van-tabbar": "@vant/weapp/tabbar/index",
    "van-tabbar-item": "@vant/weapp/tabbar-item/index",
    "van-nav-bar": "@vant/weapp/nav-bar/index",
    "van-dialog": "@vant/weapp/dialog/index",
    "van-toast": "@vant/weapp/toast/index",
    "van-loading": "@vant/weapp/loading/index",
    "van-overlay": "@vant/weapp/overlay/index",
    "van-tab": "@vant/weapp/tab/index",
    "van-tabs": "@vant/weapp/tabs/index",
    "van-card": "@vant/weapp/card/index",
    "van-uploader": "@vant/weapp/uploader/index",
    "van-panel": "@vant/weapp/panel/index",
    "van-popup": "@vant/weapp/popup/index",
    "van-collapse": "@vant/weapp/collapse/index",
    "van-collapse-item": "@vant/weapp/collapse-item/index",
    "van-radio": "@vant/weapp/radio/index",
    "van-radio-group": "@vant/weapp/radio-group/index",
    "van-stepper": "@vant/weapp/stepper/index",
    "van-steps": "@vant/weapp/steps/index",
    "van-sidebar": "@vant/weapp/sidebar/index",
    "van-sidebar-item": "@vant/weapp/sidebar-item/index",
    "van-search": "@vant/weapp/search/index",
    "k-notice-bar": "/components/k/k-notice-bar/index"
  },

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值