From 189c8d1441c370e85a6fa1bfadec35c8be1b26ee Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Fri, 6 Dec 2019 19:54:08 +0800 Subject: [PATCH] fix(v3): properties --- packages/uni-mp-weixin/dist/mp.js | 4 ++-- src/core/runtime/mp/polyfill/state/properties.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/uni-mp-weixin/dist/mp.js b/packages/uni-mp-weixin/dist/mp.js index 426517fd8..1f12686b1 100644 --- a/packages/uni-mp-weixin/dist/mp.js +++ b/packages/uni-mp-weixin/dist/mp.js @@ -508,9 +508,9 @@ function initProperties (vm, instanceData) { /* eslint-disable no-self-compare */ if (newVal === value || (newVal !== newVal && value !== value)) { return - } + } + value = newVal; if (observer) { - value = newVal; observe(observer, vm, newVal, oldVal); } // 触发渲染 diff --git a/src/core/runtime/mp/polyfill/state/properties.js b/src/core/runtime/mp/polyfill/state/properties.js index 0d55c3aae..174eca621 100644 --- a/src/core/runtime/mp/polyfill/state/properties.js +++ b/src/core/runtime/mp/polyfill/state/properties.js @@ -84,9 +84,9 @@ export function initProperties (vm, instanceData) { /* eslint-disable no-self-compare */ if (newVal === value || (newVal !== newVal && value !== value)) { return - } + } + value = newVal if (observer) { - value = newVal observe(observer, vm, newVal, oldVal) } // 触发渲染 -- GitLab