refactor: ♻️ cURD加强TS支持

This commit is contained in:
cshaptx4869
2024-04-27 15:04:27 +08:00
parent e96fc32588
commit 982c5e57fa
9 changed files with 170 additions and 93 deletions

View File

@@ -1,6 +1,12 @@
const contentConfig = {
import type { IContentConfig } from "@/components/PageContent/index.vue";
const contentConfig: IContentConfig = {
pageName: "sys:user",
indexAction: function (data: any) {
table: {
border: true,
highlightCurrentRow: true,
},
indexAction: function (data) {
console.log("index", data);
return new Promise((resolve, reject) => {
setTimeout(() => {
@@ -44,7 +50,7 @@ const contentConfig = {
}, 800);
});
},
deleteAction: function (id: string) {
deleteAction: function (id) {
console.log("delete", id);
return new Promise((resolve, reject) => {
resolve({
@@ -64,6 +70,7 @@ const contentConfig = {
name: "upload",
icon: "upload",
text: "导入",
auth: "upload",
},
],
cols: [
@@ -79,6 +86,7 @@ const contentConfig = {
align: "center",
prop: "status",
templet: "custom",
slotName: "status",
},
{ label: "创建时间", align: "center", prop: "createTime", width: 180 },
{