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 }
];
