Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(table): multiple editable table #2787

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/dialog/_example/async.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,19 @@ export default {
header: '提交后不可再编辑会进入审批流程',
body: '是否确认提交?',
confirmBtn: {
content: '确认',
content: '提交',
theme: 'primary',
loading: false,
},
theme: 'warning',
onConfirm: () => {
confirmDialog.update({ confirmBtn: { content: '提交中', loading: true } });
// confirmDialog.update({ confirmLoading: true });
confirmDialog.setConfirmLoading(true);
// confirmDialog.setConfirmLoading(true);
const timer = setTimeout(() => {
confirmDialog.update({ confirmBtn: { content: '提交', loading: false } });
// confirmDialog.update({ confirmLoading: false });
confirmDialog.setConfirmLoading(false);
// confirmDialog.setConfirmLoading(false);
confirmDialog.hide();
clearTimeout(timer);
}, 500);
Expand Down
3 changes: 1 addition & 2 deletions src/table/hooks/useEditableRow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ export interface TablePromiseErrorData {
errorMap: TableErrorListMap;
}

const cellRuleMap = new Map<any, PrimaryTableRowEditContext<TableRowData>[]>();

export default function useRowEdit(props: PrimaryTableProps, context: SetupContext) {
const cellRuleMap = new Map<any, PrimaryTableRowEditContext<TableRowData>[]>();
// 校验不通过的错误信息,其中 key 值为 [rowValue, col.colKey].join('__')
const errorListMap = ref<TableErrorListMap>({});
// 处于编辑态的表格行
Expand Down
Loading