diff --git a/packages/uni-app-plus/dist/index.v3.js b/packages/uni-app-plus/dist/index.v3.js index ef0a677da82749231412709d109efd36538db817..dbc25949710bf03b983ef9d55e772e238d4dbf39 100644 --- a/packages/uni-app-plus/dist/index.v3.js +++ b/packages/uni-app-plus/dist/index.v3.js @@ -12181,10 +12181,12 @@ var serviceContext = (function () { cur = newObj[key]; old = oldObj[key]; if (old !== cur) { - if (key === B_STYLE && isPlainObject(cur) && isPlainObject(old)) { - const style = diffObject(cur, old); - style && setResult(result || (result = Object.create(null)), B_STYLE, style); - } else if (key === V_FOR && Array.isArray(cur) && Array.isArray(old)) { + // 全量同步 style (因为 style 可能会动态删除部分样式) + // if (key === B_STYLE && isPlainObject(cur) && isPlainObject(old)) { + // const style = diffObject(cur, old) + // style && setResult(result || (result = Object.create(null)), B_STYLE, style) + // } else + if (key === V_FOR && Array.isArray(cur) && Array.isArray(old)) { const vFor = diffArray(cur, old); vFor && setResult(result || (result = Object.create(null)), V_FOR, vFor); } else { diff --git a/src/platforms/app-plus/service/framework/plugins/diff.js b/src/platforms/app-plus/service/framework/plugins/diff.js index 152315927d7388824714d907c9797f24d0cd53ca..95a080fac2b97de83e79d7d50c50b6c289f9f7f1 100644 --- a/src/platforms/app-plus/service/framework/plugins/diff.js +++ b/src/platforms/app-plus/service/framework/plugins/diff.js @@ -3,8 +3,7 @@ import { } from 'uni-shared' import { - V_FOR, - B_STYLE + V_FOR } from '../../constants' function setResult (data, k, v) { @@ -52,10 +51,12 @@ function diffElmData (newObj, oldObj) { cur = newObj[key] old = oldObj[key] if (old !== cur) { - if (key === B_STYLE && isPlainObject(cur) && isPlainObject(old)) { - const style = diffObject(cur, old) - style && setResult(result || (result = Object.create(null)), B_STYLE, style) - } else if (key === V_FOR && Array.isArray(cur) && Array.isArray(old)) { + // 全量同步 style (因为 style 可能会动态删除部分样式) + // if (key === B_STYLE && isPlainObject(cur) && isPlainObject(old)) { + // const style = diffObject(cur, old) + // style && setResult(result || (result = Object.create(null)), B_STYLE, style) + // } else + if (key === V_FOR && Array.isArray(cur) && Array.isArray(old)) { const vFor = diffArray(cur, old) vFor && setResult(result || (result = Object.create(null)), V_FOR, vFor) } else {