Fixed: Fix the issue of the create asset button not being disabled under the global organization.

This commit is contained in:
zhaojisen
2025-05-12 16:12:27 +08:00
committed by ZhaoJiSen
parent f0ff8f7370
commit d2469f6313

View File

@@ -126,6 +126,7 @@ export default {
icon: '', icon: '',
split: true, split: true,
has: this.headerActions.hasCreate, has: this.headerActions.hasCreate,
can: !this.$store.getters.currentOrgIsRoot,
callback: () => { callback: () => {
this.showPlatform = false this.showPlatform = false
setTimeout(() => { setTimeout(() => {
@@ -185,6 +186,10 @@ export default {
} }
const create = this.createAction const create = this.createAction
create.dropdown = this.recentPlatforms create.dropdown = this.recentPlatforms
create.dropdown.map((item) => {
item.can = !this.$store.getters.currentOrgIsRoot
return item
})
const extraActions = actions.extraActions || [] const extraActions = actions.extraActions || []
actions.extraActions = [create, ...extraActions] actions.extraActions = [create, ...extraActions]
// actions.extraActions[0].dropdown = platforms // actions.extraActions[0].dropdown = platforms