mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-02-02 18:28:41 +08:00
BasicTable组件中actionColumn的fixed属性判断
This commit is contained in:
parent
b08b1f8379
commit
af13557ea0
@ -92,10 +92,17 @@ export function useColumns(propsRef: ComputedRef<BasicTableProps>) {
|
||||
function handleActionColumn(propsRef: ComputedRef<BasicTableProps>, 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),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//设置
|
||||
|
Loading…
Reference in New Issue
Block a user