Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mp): support for adding plugins to miniprogram components #4575

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

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