src/components/Table/src/components/editable/EditableCell.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/Table/src/hooks/useTableScroll.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/Table/src/types/table.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/components/Table/src/components/editable/EditableCell.vue
@@ -82,17 +82,36 @@ if (component === 'ApiSelect') { apiSelectProps.cache = true; } upEditDynamicDisabled(record, column, value); return { size: 'small', getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body, placeholder: createPlaceholderMessage(unref(getComponent)), ...apiSelectProps, ...omit(compProps, 'onChange'), ...compProps, [valueField]: value, disabled: unref(getDisable), } as any; }); function upEditDynamicDisabled(record, column, value) { if (!record) return false; const { key, dataIndex } = column; if (!key && !dataIndex) return; const dataKey = (dataIndex || key) as string; set(record, dataKey, value); } const getDisable = computed(() => { const { editDynamicDisabled } = props.column; let disabled = false; if (isBoolean(editDynamicDisabled)) { disabled = editDynamicDisabled; } if (isFunction(editDynamicDisabled)) { const { record } = props; disabled = editDynamicDisabled({ record }); } return disabled; }); const getValues = computed(() => { const { editValueMap } = props.column; src/components/Table/src/hooks/useTableScroll.ts
@@ -90,7 +90,7 @@ bodyEl!.style.height = 'unset'; if (!unref(getCanResize) || tableData.length === 0) return; if (!unref(getCanResize) || !unref(tableData) || tableData.length === 0) return; await nextTick(); // Add a delay to get the correct bottomIncludeBody paginationHeight footerHeight headerHeight src/components/Table/src/types/table.ts
@@ -463,6 +463,8 @@ column: BasicColumn; index: number; }) => VNodeChild | JSX.Element; // 动态 Disabled editDynamicDisabled?: boolean | ((record: Recordable) => boolean); } export type ColumnChangeParam = {