feat(PageContent): ✨ 左侧工具栏增加type配置参数
This commit is contained in:
@@ -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 }}
|
||||||
|
|||||||
@@ -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";
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
// 表格工具栏右侧图标
|
// 表格工具栏右侧图标
|
||||||
|
|||||||
@@ -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: [
|
||||||
|
|||||||
Reference in New Issue
Block a user