在mpvue中引用vant weapp

使用mpvue做爲框架,引入第三方的ui框架 vant-weappvue

vant-weapp: https://github.com/youzan/vant-weappgit

下載vant-weapp的資源:https://github.com/youzan/vant-weapp.gitgithub

一、json

二、app

三、框架

四、全選複製ui

五、進入本身的項目的static文件夾3d

六、新建一個vant文件夾code

七、把剛纔複製的全部東西,丟進去blog

八、項目如圖:

九、單個頁面中建立main.json文件

十、使用的組件名稱引入

{
    "usingComponents": {
        "van-button": "/static/vant/button/index",
        "van-cell": "/static/vant/cell/index",
        "van-cell-group": "/static/vant/cell-group/index",
        "van-popup": "/static/vant/popup/index",
        "van-datetime-picker": "/static/vant/datetime-picker/index",
        "van-field": "/static/vant/field/index",
        "van-picker": "/static/vant/field/index",
        "van-dialog": "/static/vant/dialog/index",
        "van-toast": "/static/vant/toast/index"
    }
}
<van-cell title="姓名" is-link>
                <div>
                    <input type="text">
                </div>
            </van-cell>

-------------------------------------分割線------------------------------------------------------------

相關文章
相關標籤/搜索