提交 29bffca8 编写于 作者: fxy060608's avatar fxy060608

fix(mp-alipay): add createSelectorQuery,createIntersectionObserver

上级 7149ec3e
...@@ -5829,9 +5829,18 @@ function internalMixin(Vue) { ...@@ -5829,9 +5829,18 @@ function internalMixin(Vue) {
MP_METHODS.forEach(function (method) { MP_METHODS.forEach(function (method) {
Vue.prototype[method] = function(args) { Vue.prototype[method] = function(args) {
if (this.$scope) { if (this.$scope && this.$scope[method]) {
return this.$scope[method](args) return this.$scope[method](args)
} }
// 主要是 mp-alipay
if (method === 'createSelectorQuery') {
/* eslint-disable no-undef */
return uni.createSelectorQuery(args).in(this)
} else if (method === 'createIntersectionObserver') {
/* eslint-disable no-undef */
return uni.createIntersectionObserver(this, args)
}
// TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
}; };
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册