import { ContentConfig } from "/@/components/PageContent";
import { httpList } from "/@/api/system/updates";
import dayjs from "dayjs";
import { renderHtml } from "/@/utils/column-helper";
const columns = [
  {
    type: "selection",
    minWidth: 55,
    align: "left",
    hide: ({ checkList }) => !checkList.includes("勾选列")
  },
  {
    label: "序号",
    type: "index",
    minWidth: 60,
    align: "left",
    hide: ({ checkList }) => !checkList.includes("序号列")
  },
  {
    type: "expand",
    slot: "expand"
  },
  {
    label: "版本号",
    prop: "version",
    minWidth: 180,
    align: "left"
  },
  {
    label: "更新模块",
    prop: "title",
    minWidth: 180,
    align: "left"
  },
  {
    label: "更新时间",
    minWidth: 180,
    prop: "addtime",
    formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
  }
];

const contentConfig: ContentConfig = {
  title: "版本更新",
  columns,
  apis: {
    httpList
  }
};

export default contentConfig;
