梗概
- 先注册:Declare the plug-ins used in the fields corresponding to each platform in
manifest.json. - 页面中进行引用:
pluginis the protocol
实例
注册:
"mp-weixin": {
"plugins": {
"myPlugin": {
"version": "1.0.0",
"provider": "wxidxxxxxxxxxxxxxxxx",
"export": "index.js"
}
}
}引用:
// WeChat applet
{
"path": "pages/index/index",
"style": {
"mp-weixin": {
"usingComponents": {
"hello-component": "plugin://myPlugin/hello-component"
}
}
}
}