savokiss

首先在 manifest.json 中对应的平台对象添加:(微信平台为 mp-weixin)

    "useExtendedLib": {
      "weui": true
    },

 

由于 uni-app 已经弃用 mpvue 的编译模式,详见:https://ask.dcloud.net.cn/article/35843

 

即所有 vue 文件均编译成原生小程序组件(Component).

 

所以如果是直接某个页面引入vue组件,可以在 pages.json 对应页面的 usingComponents 声明。

如果是某个vue 组件中引入的 另外一个 vue 组件,可以在 pages.json 的 globalStyle 中声明。

如使用 slideview,在 usingComponents 下加入:

"mp-slideview": "/miniprogram_npm/weui-miniprogram/slideview/slideview"

 

分类:

技术点:

相关文章:

  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-12-15
  • 2021-11-20
  • 2021-07-17
猜你喜欢
  • 2021-06-13
  • 2021-12-01
  • 2021-11-20
  • 2021-11-20
  • 2022-02-08
  • 2021-11-29
相关资源
相似解决方案