国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 德清县| 天气| 西和县| 永兴县| 扶余县| 越西县| 杭锦后旗| 达日县| 加查县| 华蓥市| 夹江县| 年辖:市辖区| 金湖县| 黄平县| 繁峙县| 鹿泉市| 龙南县| 夹江县| 枝江市| 林周县| 彰化县| 东丽区| 永平县| 临朐县| 尼勒克县| 中西区| 鹿泉市| 广元市| 达拉特旗| 中山市| 丰都县| 同江市| 大邑县| 濮阳市| 泰和县| 阿尔山市| 乐山市| 石家庄市| 略阳县| 翁源县| 郯城县|