mirror of https://github.com/halo-dev/halo
fix: current selected role templates will be clear after select a other role (#5276)
#### What type of PR is this? /area console /kind bug /milestone 2.12.x #### What this PR does / why we need it: 修复创建角色时,勾选某个角色模板导致已选角色模板被清空的问题。 #### Which issue(s) this PR fixes: Fixes #5275 #### Does this PR introduce a user-facing change? ```release-note None ```pull/3818/head^2 v2.12.0-beta.2
parent
2de03851c4
commit
a4e862cfc4
|
@ -277,10 +277,10 @@ export function useRoleTemplateSelection(
|
|||
return;
|
||||
}
|
||||
|
||||
selectedRoleTemplates.value = new Set([
|
||||
role.metadata.name,
|
||||
...resolveDeepDependencies(role, roleTemplates.value || []),
|
||||
]);
|
||||
selectedRoleTemplates.value.add(role.metadata.name);
|
||||
resolveDeepDependencies(role, roleTemplates.value || []).forEach((name) => {
|
||||
selectedRoleTemplates.value.add(name);
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue