Merge pull request #9829 from qkiroc/fix/nav-date-change

fix: 修复数据域改变,nav没有动态修改的问题
This commit is contained in:
hsm-lv 2024-03-22 13:55:13 +08:00 committed by GitHub
commit ccc50420c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1056,7 +1056,9 @@ const ConditionBuilderWithRemoteOptions = withRemoteConfig({
if (!!link.disabled) {
return false;
}
return motivation !== 'location-change' &&
return motivation &&
!['location-change', 'data-change'].includes(motivation) &&
typeof link.active !== 'undefined'
? link.active
: (depth === level
@ -1214,6 +1216,8 @@ const ConditionBuilderWithRemoteOptions = withRemoteConfig({
this.props.updateConfig(this.props.config, 'location-change');
} else if (!isEqual(this.props.links, prevProps.links)) {
this.props.updateConfig(this.props.links, 'update');
} else if (!isEqual(this.props.data, prevProps.data)) {
this.props.updateConfig(this.props.config, 'data-change');
}
// 外部修改defaultOpenLevel 会影响菜单的unfolded属性