Skip to content

Conversation

liangyuetian
Copy link

加强小程序插件的使用 https://uniapp.dcloud.net.cn/tutorial/mp-weixin-plugin.html

使其不仅仅能在页面级别的文件中使用,还可以在单个组件中使用。

使用方法:在组件同级目录创建同名json,json内容和 manifest.json 中一致

例子:

  • src
    • components
      • hello-word.vue
      • hello-word.json

hello-word.json 内容

{
  "component": true,
  "mp-weixin":  {
    "usingComponents": {
      "cell": "plugin://contactPlugin/cell"
    }
  },
  "mp-baidu": {
    "usingSwanComponents": {
      "chart": "dynamicLib://echartsLib/chart"
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants