taro 3.0.17 Vue3 添加Vant-weapp,组件警告问题



  • 引入vant-weapp
    组件可以正常显示,但是会有警告信息:

    [Vue warn]: Failed to resolve component: van-button 
      at <Index tid="pages/index/index" > 
      at <App>
    

    请问这个怎么解决,应用上该配置的都配置了

    代码如下:

      // index.config.js
      usingComponents: {
        "van-button": "../../components/vant-weapp/button/index"
      }
    
       // config/index.js
       patterns: [
          { from: 'src/components/vant-weapp/wxs', to: 'dist/components/vant-weapp/wxs' },
          { from: 'src/components/vant-weapp/common/style', to: 'dist/components/vant-weapp/common/style' },
          { from: 'src/components/vant-weapp/common/index.wxss', to: 'dist/components/vant-weapp/common/index.wxss' }
        ],
    


  • 我这里@click事件也不能用,你那里可以吗


登录后回复