diff --git a/src/components/XButton/src/ButtonBase.vue b/src/components/XButton/src/ButtonBase.vue
index 8158b8319..679340802 100644
--- a/src/components/XButton/src/ButtonBase.vue
+++ b/src/components/XButton/src/ButtonBase.vue
@@ -5,9 +5,10 @@
:type="item.type"
:color="item.color"
:link = "item.link ? item.link : false"
+ v-hasPermi="[item.hasPermi]"
@click="buttonBaseClick(item.name,item,$event)"
>
-
+
{{ item.label }}
diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts
index f49a80b7d..5bfaac741 100644
--- a/src/utils/disposition/defaultButtons.ts
+++ b/src/utils/disposition/defaultButtons.ts
@@ -13,7 +13,8 @@ export function defaultAddBtn(option:any) {
hide: false,
type: 'primary',
icon: 'ep:plus',
- color: ''
+ color: '',
+ hasPermi: ''
})
}
@@ -25,7 +26,8 @@ export function defaultImportBtn(option:any) {
hide: false,
type: 'warning',
icon: 'ep:upload',
- color: ''
+ color: '',
+ hasPermi: ''
})
}
@@ -37,7 +39,8 @@ export function defaultExportBtn(option:any) {
hide: false,
type: 'success',
icon: 'ep:download',
- color: ''
+ color: '',
+ hasPermi: ''
})
}
@@ -166,9 +169,10 @@ export function mainListEditBtn(option:any) {
label: '编辑',
name: 'edit',
hide: false,
- type: 'warning',
+ type: 'primary',
color: '',
link: true, // 文本展现按钮
+ hasPermi: ''
})
}
@@ -181,6 +185,7 @@ export function mainListDeleteBtn(option:any) {
type: 'danger',
color: '',
link: true, // 文本展现按钮
+ hasPermi: ''
})
}
@@ -200,6 +205,7 @@ function __defaultBtnOption(option:any,specific:any){
color:option && option.color ? option.color : specific.color,
hide:option && option.hide ? option.hide : specific.hide,
link:option && option.link ? option.link : specific.link,
+ hasPermi:option && option.hasPermi ? option.hasPermi : specific.hasPermi,
...option
}
}