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

feat(runtime): wxsCallMethods

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