wepy2.0 assembly using vant-weapp

npm i vant-weapp -S --production

Look at whether the project has been under package.json vant field

By far the most important, when introduced through the module catches

<config>

{

    navigationBarTitleText: 'WePY 2.0 Feature Demo',

    usingComponents: {
    
    panel: '~@/components/panel',
    
    counter: '~counter',
    
    list: '../components/list',
    
    group: '../components/group',
    
    "slide-view": "module:miniprogram-slide-view",
    
    "van-button": "module:vant-weapp/dist/button/index"
    
    }

}

</config>
< Van Button- type = "Danger" > risk button </ Van-Button >

 

Guess you like

Origin www.cnblogs.com/ll15888/p/11744146.html