diff --git a/web/src/components/Table/src/hooks/useColumns.ts b/web/src/components/Table/src/hooks/useColumns.ts index 20f364e..8ff93fa 100644 --- a/web/src/components/Table/src/hooks/useColumns.ts +++ b/web/src/components/Table/src/hooks/useColumns.ts @@ -92,10 +92,17 @@ export function useColumns(propsRef: ComputedRef) { function handleActionColumn(propsRef: ComputedRef, columns: BasicColumn[]) { const { actionColumn } = unref(propsRef); if (!actionColumn) return; - !columns.find((col) => col.key === 'action') && - columns.push({ - ...(actionColumn as any), - }); + if (!columns.find((col) => col.key === 'action')) { + if ((actionColumn as any).fixed && (actionColumn as any).fixed === 'left') { + columns.unshift({ + ...(actionColumn as any), + }); + } else { + columns.push({ + ...(actionColumn as any), + }); + } + } } //设置