|
|
@ -471,6 +471,16 @@ const InteralTable = defineComponent< |
|
|
|
return mergedData.value.slice((current - 1) * pageSize, current * pageSize); |
|
|
|
return mergedData.value.slice((current - 1) * pageSize, current * pageSize); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const expandIconColumnIndex = computed(() => { |
|
|
|
|
|
|
|
// Adjust expand icon index, no overwrite expandIconColumnIndex if set. |
|
|
|
|
|
|
|
if (expandType.value === 'nest' && props.expandIconColumnIndex === undefined) { |
|
|
|
|
|
|
|
return props.rowSelection ? 1 : 0; |
|
|
|
|
|
|
|
} else if (props.expandIconColumnIndex! > 0 && props.rowSelection) { |
|
|
|
|
|
|
|
return props.expandIconColumnIndex - 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return props.expandIconColumnIndex; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// ========================== Selections ========================== |
|
|
|
// ========================== Selections ========================== |
|
|
|
const [transformSelectionColumns, selectedKeySet] = useSelection( |
|
|
|
const [transformSelectionColumns, selectedKeySet] = useSelection( |
|
|
|
computed(() => props.rowSelection), |
|
|
|
computed(() => props.rowSelection), |
|
|
@ -483,7 +493,7 @@ const InteralTable = defineComponent< |
|
|
|
expandType, |
|
|
|
expandType, |
|
|
|
childrenColumnName, |
|
|
|
childrenColumnName, |
|
|
|
locale: tableLocale, |
|
|
|
locale: tableLocale, |
|
|
|
expandIconColumnIndex: computed(() => props.expandIconColumnIndex), |
|
|
|
expandIconColumnIndex, |
|
|
|
getPopupContainer: computed(() => props.getPopupContainer), |
|
|
|
getPopupContainer: computed(() => props.getPopupContainer), |
|
|
|
}, |
|
|
|
}, |
|
|
|
); |
|
|
|
); |
|
|
@ -509,15 +519,6 @@ const InteralTable = defineComponent< |
|
|
|
expose({ |
|
|
|
expose({ |
|
|
|
selectedKeySet, |
|
|
|
selectedKeySet, |
|
|
|
}); |
|
|
|
}); |
|
|
|
const expandIconColumnIndex = computed(() => { |
|
|
|
|
|
|
|
// Adjust expand icon index, no overwrite expandIconColumnIndex if set. |
|
|
|
|
|
|
|
if (expandType.value === 'nest' && props.expandIconColumnIndex === undefined) { |
|
|
|
|
|
|
|
return props.rowSelection ? 1 : 0; |
|
|
|
|
|
|
|
} else if (props.expandIconColumnIndex! > 0 && props.rowSelection) { |
|
|
|
|
|
|
|
return props.expandIconColumnIndex - 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return props.expandIconColumnIndex; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const indentSize = computed(() => { |
|
|
|
const indentSize = computed(() => { |
|
|
|
// Indent size |
|
|
|
// Indent size |
|
|
|