From 2e28b526ca35bd64daccf4ca0971bb7cb8e93bfb Mon Sep 17 00:00:00 2001 From: harrywan Date: Tue, 24 Sep 2024 15:53:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E7=88=B6=E5=BA=94=E7=94=A8=E7=8A=B6=E6=80=81,=E5=AD=90?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=8A=B6=E6=80=81=E6=9C=AA=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fes-plugin-qiankun/src/micro/runtime/qiankunModel.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/fes-plugin-qiankun/src/micro/runtime/qiankunModel.tpl b/packages/fes-plugin-qiankun/src/micro/runtime/qiankunModel.tpl index c1223729..2f1bbc16 100644 --- a/packages/fes-plugin-qiankun/src/micro/runtime/qiankunModel.tpl +++ b/packages/fes-plugin-qiankun/src/micro/runtime/qiankunModel.tpl @@ -3,9 +3,12 @@ import { cloneDeep } from 'lodash-es' let initState = reactive({}); const setModelState = (props) => { // 使用深拷贝去掉主应用数据和子应用数据的引用关系,避免出现副作用。 + Object.keys(initState).forEach(p=>{ + delete initState[p] + }) Object.assign(initState, cloneDeep(props)) }; export default () => initState; -export { setModelState }; \ No newline at end of file +export { setModelState };