国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 課堂 > 小程序 > 正文

微信小程序使用Vant Weapp組件庫的方法步驟

2020-03-21 15:50:09
字體:
來源:轉載
供稿:網(wǎng)友

微信小程序,Vant,Weapp,組件庫

地址:https://youzan.github.io/vant/#/zh-CN/intro

一.引入Vant組件庫

1.首先運行 npm init

微信小程序,Vant,Weapp,組件庫

微信小程序,Vant,Weapp,組件庫

就會生成 package.json

微信小程序,Vant,Weapp,組件庫

2.運行

npm i vant-weapp -S --production

 微信小程序,Vant,Weapp,組件庫

微信小程序,Vant,Weapp,組件庫

3.安裝成功后 點擊 工具 => 構建npm

微信小程序,Vant,Weapp,組件庫

之后點擊 詳情 => 使用構建npm 渲染

微信小程序,Vant,Weapp,組件庫

二.使用組件庫

首先在json文件中引入組件

微信小程序,Vant,Weapp,組件庫

"van-button": "vant-weapp/button"

之后可以在官網(wǎng)找到想要用的組件使用

微信小程序,Vant,Weapp,組件庫

微信小程序,Vant,Weapp,組件庫

報錯碼

VM292:1 thirdScriptError sdk uncaught third Error module "miniprogram_npm/vant-weapp/mixins/transition" is not defined Error: module "miniprogram_npm/vant-weapp/mixins/transition" is not defined at require (http://127.0.0.1:56368/appservice/__dev__/WAService.js:22:26700) at http://127.0.0.1:56368/appservice/__dev__/WAService.js:22:26448 at http://127.0.0.1:56368/appservice/miniprogram_npm/vant-weapp/popup/index.js:5:19 at require (http://127.0.0.1:56368/appservice/__dev__/WAService.js:22:26841) at <anonymous>:395:7 at HTMLScriptElement.scriptLoaded (http://127.0.0.1:56368/appservice/appservice?t=1557802464868:4544:21) at HTMLScriptElement.script.onload (http://127.0.0.1:56368/appservice/appservice?t=1557802464868:4556:20) 

解決方法:

你只需要把miniprogram_npm/vant-weapp里的組件文件夾都刪除,

之后再https://github.com/youzan/vant-weapp下載一份vant, 將dist文件夾(vant-weapp-dev/vant-weapp-dev/dist)中的文件復制到項目的miniprogram_npm/vant-weapp

即下載一份vant,之后替換掉項目中的文件

之后保存解決

微信小程序,Vant,Weapp,組件庫

總結

以上就是這篇文章的全部內容了,希望本文的內容對大家的學習或者工作具有一定的參考學習價值,謝謝大家對VEVB武林網(wǎng)的支持。


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 正蓝旗| 宝山区| 墨玉县| 鄱阳县| 东乌| 宝山区| 丽水市| 喜德县| 昌都县| 大兴区| 云龙县| 大港区| 绍兴市| 达孜县| 曲水县| 汨罗市| 金塔县| 西丰县| 谷城县| 工布江达县| 东源县| 兴业县| 舞钢市| 敖汉旗| 利川市| 肃宁县| 玉屏| 肇州县| 山阳县| 铜山县| 夏津县| 福贡县| 万源市| 巴里| 门源| 遵义市| 时尚| 昭觉县| 石家庄市| 通州市| 遂川县|