2025-03-26
This commit is contained in:
38
src/views/articleManagement/class/constant/table.ts
Normal file
38
src/views/articleManagement/class/constant/table.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { RenderScope } from "@/components/ProTable/interface";
|
||||
|
||||
const YES_OR_NO: any = {
|
||||
1: "✔️",
|
||||
0: "❌"
|
||||
};
|
||||
|
||||
export const COLUMNS = [
|
||||
{
|
||||
align: "center",
|
||||
fixed: true,
|
||||
label: "ID",
|
||||
prop: "id",
|
||||
width: 80
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "文章分类名称",
|
||||
prop: "name"
|
||||
},
|
||||
|
||||
{
|
||||
align: "left",
|
||||
label: "文章分类排序",
|
||||
prop: "sort"
|
||||
},
|
||||
{
|
||||
align: "left",
|
||||
label: "是否显示",
|
||||
prop: "is_show",
|
||||
render: (scope: RenderScope<any>): VNode | string | any => {
|
||||
return YES_OR_NO[scope.row.is_show];
|
||||
}
|
||||
},
|
||||
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 300 }
|
||||
];
|
||||
Reference in New Issue
Block a user