Files
orico-officialWebsite-ts-admin/src/views/articleManagement/list/constant/table.ts
2025-06-06 14:05:40 +08:00

61 lines
1.2 KiB
TypeScript

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: "center",
label: "图片",
prop: "image",
width: 160
},
{
align: "left",
label: "文章名称",
prop: "title"
},
{
align: "left",
label: "文章分类",
prop: "category_name"
},
{
align: "left",
label: "文章排序",
prop: "sort",
width: 160
},
{
align: "left",
label: "首页推荐",
prop: "recommend",
render: (scope: RenderScope<any>): VNode | string | any => {
return YES_OR_NO[scope.row.recommend];
}
},
{
align: "left",
label: "发布时间",
prop: "release_time",
width: 160
},
// {
// align: "center",
// label: "状态",
// prop: "enabled",
// width: 80
// },
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
];