import { Button } from "@arco-design/web-vue"; import { IconRefresh, IconSearch } from "@arco-design/web-vue/es/icon"; export const config = { searchInlineCount: 3, searchFormProps: { labelAlign: "left", autoLabelWidth: true, model: {}, }, searchItemSubmit: { field: "id", type: "custom", label: ' ', itemProps: { class: "table-search-item col-start-4 !mr-0 grid grid-cols-[0_1fr]", // hideLabel: true, }, component: () => { const tableRef = inject("ref:table"); return (
{(tableRef.search?.items?.length || 0) > config.searchInlineCount && ( )}
); }, }, pagination: { current: 1, pageSize: 10, total: 300, showTotal: true, }, columnBase: { ellipsis: true, tooltip: true, render: ({ record, column }: any) => record[column.dataIndex] || "-", }, columnIndex: { title: "序号", width: 60, align: "center", render: ({ rowIndex }: any) => { const table = inject("ref:table"); const page = table.pagination.current; const size = table.pagination.pageSize; return size * (page - 1) + rowIndex + 1; }, }, columnButtonBase: { buttonProps: { // type: "text", // size: "mini", }, }, columnButtonDelete: { title: "删除确认", content: "确认删除当前数据吗?", modalClass: "text-center", hideCancel: false, maskClosable: false, }, columnDropdownModify: { text: "修改", icon: "icon-park-outline-edit", }, getApiErrorMessage(error: any): string { const message = error?.response?.data?.message || error?.message || "请求失败"; return ''; }, };