diff --git a/packages/uni-mp-alipay/dist/index.js b/packages/uni-mp-alipay/dist/index.js index 139e5cf00e848c0493a8053fb72a2ea62285cb4d..8e18e39b60ce6af940dba61c2c9112b333597eea 100644 --- a/packages/uni-mp-alipay/dist/index.js +++ b/packages/uni-mp-alipay/dist/index.js @@ -1047,6 +1047,12 @@ function createSelectorQuery () { return this }; } + + if (!query.in) { + query.in = function () { + return this + }; + } return query } diff --git a/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js b/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js index baff018d0ba31c500a9ba20cc85d3f08d98f7480..69ebf44f29b063c98a01a8618c63fea63a7dbd08 100644 --- a/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js +++ b/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js @@ -5829,9 +5829,21 @@ function internalMixin(Vue) { MP_METHODS.forEach(function (method) { Vue.prototype[method] = function(args) { - if (this.$scope) { + if (this.$scope && this.$scope[method]) { return this.$scope[method](args) } + // mp-alipay + if(typeof my === 'undefined'){ + return + } + if (method === 'createSelectorQuery') { + /* eslint-disable no-undef */ + return my.createSelectorQuery(args) + } else if (method === 'createIntersectionObserver') { + /* eslint-disable no-undef */ + return my.createIntersectionObserver(args) + } + // TODO mp-alipay ζš‚δΈζ”―ζŒ selectAllComponents,selectComponent }; }); diff --git a/src/platforms/mp-alipay/runtime/api/index.js b/src/platforms/mp-alipay/runtime/api/index.js index fa81afc0816e51d39080dc91c59b68457b602983..d55421ec1e4239d15945e24e8d87b529eed04944 100644 --- a/src/platforms/mp-alipay/runtime/api/index.js +++ b/src/platforms/mp-alipay/runtime/api/index.js @@ -88,6 +88,12 @@ export function createSelectorQuery () { return this } } + + if (!query.in) { + query.in = function () { + return this + } + } return query }