import { RenderScope } from "@/components/ProTable/interface";
export const COLUMNS = [
    {
        align: "center",
        fixed: true,
        label: "ID",
        prop: "id"
    },

    {
        align: "left",
        label: "属性",
        prop: "attr_name"
    },
    {
        align: "left",
        label: "属性值",
        prop: "props",
        render: (scope: RenderScope<any>): VNode | string | any => {
            let arr: any = [];
            if (scope.row.props.length) {
                scope.row.props.forEach((item: any) => {
                    arr.push(item.prop_name);
                });
                return arr.join(",");
            } else {
                return;
            }
        }
    },

    { prop: "operation", label: "操作", fixed: "right", width: 160 }
];
