























组件中使用model时候,一定要监听到具体的字段:
比如 const { handlingPhone } = useModel("common", (model) => ({
handlingPhone: model.handlingPhone,
}));
不要图省事直接写 const { handlingPhone } = useModel("common")
这样的话会监听整个model对象,其他字段改变,即使 handlingPhone不变,也会导致组件函数重新执行
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。