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 };