提交 1e684acb 编写于 作者: fxy060608's avatar fxy060608

feat(runtime): wxsCallMethods

上级 5e6c5bd8
......@@ -1336,6 +1336,14 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if (Array.isArray(vueOptions.wxsCallMethods)) {
vueOptions.wxsCallMethods.forEach(callMethod => {
componentOptions.methods[callMethod] = function (args) {
return this.$vm[callMethod](args)
};
});
}
if (isPage) {
return componentOptions
}
......
{
"name": "@dcloudio/uni-app-plus",
"version": "1.0.0-alpha-22120190814002",
"version": "0.0.253",
"description": "uni-app app-plus",
"main": "dist/index.js",
"scripts": {
......
......@@ -1477,6 +1477,14 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if (Array.isArray(vueOptions.wxsCallMethods)) {
vueOptions.wxsCallMethods.forEach(callMethod => {
componentOptions.methods[callMethod] = function (args) {
return this.$vm[callMethod](args)
};
});
}
if (isPage) {
return componentOptions
}
......
{
"name": "@dcloudio/uni-mp-baidu",
"version": "1.0.0-alpha-22120190814002",
"version": "0.0.857",
"description": "uni-app mp-baidu",
"main": "dist/index.js",
"scripts": {
......
......@@ -1391,6 +1391,14 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if (Array.isArray(vueOptions.wxsCallMethods)) {
vueOptions.wxsCallMethods.forEach(callMethod => {
componentOptions.methods[callMethod] = function (args) {
return this.$vm[callMethod](args)
};
});
}
if (isPage) {
return componentOptions
}
......
{
"name": "@dcloudio/uni-mp-qq",
"version": "0.0.111",
"version": "0.0.112",
"description": "uni-app mp-qq",
"main": "dist/index.js",
"scripts": {
......
......@@ -1544,6 +1544,14 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if (Array.isArray(vueOptions.wxsCallMethods)) {
vueOptions.wxsCallMethods.forEach(callMethod => {
componentOptions.methods[callMethod] = function (args) {
return this.$vm[callMethod](args)
};
});
}
if (isPage) {
return componentOptions
}
......
{
"name": "@dcloudio/uni-mp-toutiao",
"version": "0.0.351",
"version": "0.0.352",
"description": "uni-app mp-toutiao",
"main": "dist/index.js",
"scripts": {
......
......@@ -1331,6 +1331,14 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if (Array.isArray(vueOptions.wxsCallMethods)) {
vueOptions.wxsCallMethods.forEach(callMethod => {
componentOptions.methods[callMethod] = function (args) {
return this.$vm[callMethod](args)
};
});
}
if (isPage) {
return componentOptions
}
......
{
"name": "@dcloudio/uni-mp-weixin",
"version": "1.0.0-alpha-22120190814002",
"version": "0.0.973",
"description": "uni-app mp-weixin",
"main": "dist/index.js",
"scripts": {
......
......@@ -88,6 +88,14 @@ export default function parseBaseComponent (vueComponentOptions, {
}
}
if (Array.isArray(vueOptions.wxsCallMethods)) {
vueOptions.wxsCallMethods.forEach(callMethod => {
componentOptions.methods[callMethod] = function (args) {
return this.$vm[callMethod](args)
}
})
}
if (isPage) {
return componentOptions
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册