Merge pull request #141 from diamont1001/dev

feat(PageContent):  左侧工具栏增加type配置参数
This commit is contained in:
Ray Hao
2024-06-14 15:15:41 +08:00
committed by GitHub
3 changed files with 9 additions and 1 deletions

View File

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

View File

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

View File

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