feat(PageContent): 左侧工具栏增加type配置参数

This commit is contained in:
diamont1001
2024-06-14 15:09:59 +08:00
parent 66b913ef01
commit 20274e6aac
3 changed files with 9 additions and 1 deletions

View File

@@ -46,7 +46,7 @@
<el-button
v-hasPerm="[`${contentConfig.pageName}:${item.auth}`]"
:icon="item.icon"
type="default"
:type="item.type ?? 'default'"
@click="handleToolbar(item.name)"
>
{{ item.text }}

View File

@@ -108,6 +108,7 @@ export interface IContentConfig<T = any> {
icon?: string;
name: string;
text: string;
type?: "primary" | "success" | "warning" | "danger" | "info";
}
>;
// 表格工具栏右侧图标

View File

@@ -49,6 +49,13 @@ const contentConfig: IContentConfig<UserQuery> = {
text: "导入",
auth: "import",
},
{
name: "custom1",
icon: "plus",
text: "自定义1",
auth: "import",
type: "info",
},
],
defaultToolbar: ["refresh", "filter", "imports", "exports", "search"],
cols: [