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 383ee9a44a4cb9fa9e1a86fe00d9f4ea5f2000d6..88666057cb4042774d9aaf16c71a64bde709b667 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 @@ -5420,6 +5420,8 @@ Vue.version = '2.6.11'; */ var ARRAYTYPE = '[object Array]'; var OBJECTTYPE = '[object Object]'; +var NULLTYPE = '[object Null]'; +var UNDEFINEDTYPE = '[object Undefined]'; // const FUNCTIONTYPE = '[object Function]' function diff(current, pre) { @@ -5453,6 +5455,16 @@ function syncKeys(current, pre) { } } +function nullOrUndefined(currentType, preType) { + if( + (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) && + (preType === NULLTYPE || preType === UNDEFINEDTYPE) + ) { + return false + } + return true +} + function _diff(current, pre, path, result) { if (current === pre) { return } var rootCurrentType = type(current); @@ -5467,7 +5479,7 @@ function _diff(current, pre, path, result) { var currentType = type(currentValue); var preType = type(preValue); if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) { - if (currentValue !== pre[key]) { + if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) { setResult(result, (path == '' ? '' : path + ".") + key, currentValue); } } else if (currentType == ARRAYTYPE) {