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 eb78ea38c6f584b6881c7d2cb41bd3461b9e6653..281178e6ef600e056cfbcd11f6648df1d9c478d8 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 @@ -910,7 +910,13 @@ var Observer = function Observer (value) { def(value, '__ob__', this); if (Array.isArray(value)) { if (hasProto) { - protoAugment(value, arrayMethods); + {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑 + if(value.push !== value.__proto__.push){ + copyAugment(value, arrayMethods, arrayKeys); + } else { + protoAugment(value, arrayMethods); + } + } } else { copyAugment(value, arrayMethods, arrayKeys); } @@ -2479,7 +2485,12 @@ function resolveSlots ( slot.push(child); } } else { - (slots.default || (slots.default = [])).push(child); + // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page + if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){ + (slots['page'] || (slots['page'] = [])).push(child); + }else{ + (slots.default || (slots.default = [])).push(child); + } } } // ignore slots that contains only whitespace