feat(PageContent): ✨ 支持switch属性修改
This commit is contained in:
@@ -3,6 +3,7 @@ import type { IContentConfig } from "@/components/PageContent/index.vue";
|
||||
const contentConfig: IContentConfig = {
|
||||
pageName: "sys:user",
|
||||
indexAction: function (params) {
|
||||
// console.log("indexAction:", params);
|
||||
return Promise.resolve({
|
||||
total: 2,
|
||||
list: [
|
||||
@@ -17,6 +18,7 @@ const contentConfig: IContentConfig = {
|
||||
icon: "el-icon-setting",
|
||||
gender: 1,
|
||||
status: 1,
|
||||
status2: 1,
|
||||
createTime: 1715647982437,
|
||||
},
|
||||
{
|
||||
@@ -30,11 +32,16 @@ const contentConfig: IContentConfig = {
|
||||
icon: "el-icon-user",
|
||||
gender: 0,
|
||||
status: 0,
|
||||
status2: 0,
|
||||
createTime: 1715648977426,
|
||||
},
|
||||
],
|
||||
});
|
||||
},
|
||||
modifyAction(data) {
|
||||
// console.log("modifyAction:", data);
|
||||
return Promise.resolve(null);
|
||||
},
|
||||
cols: [
|
||||
{ type: "selection", width: 50, align: "center" },
|
||||
{ label: "ID", align: "center", prop: "id" },
|
||||
@@ -69,6 +76,16 @@ const contentConfig: IContentConfig = {
|
||||
templet: "custom",
|
||||
slotName: "status",
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
align: "center",
|
||||
prop: "status2",
|
||||
templet: "switch",
|
||||
activeValue: 1,
|
||||
inactiveValue: 0,
|
||||
activeText: "启用",
|
||||
inactiveText: "禁用",
|
||||
},
|
||||
{
|
||||
label: "创建时间",
|
||||
align: "center",
|
||||
|
||||
Reference in New Issue
Block a user