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): 修复table组件卸载时,异常报错 #938

Merged
merged 1 commit into from
Jul 10, 2023
Merged
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
5 changes: 2 additions & 3 deletions src/table/base-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default defineComponent({
setup(props) {
const { classPrefix, tableLayoutClasses, tableHeaderClasses, tableBaseClass, tdAlignClasses, tdEllipsisClass } =
useClassName();

const defaultLoadingContent = h(TLoading, { ...props.loadingProps });
// 表格基础样式类
const { tableClasses, tableContentStyles, tableElementStyles } = useStyle(props);

Expand Down Expand Up @@ -140,9 +140,8 @@ export default defineComponent({
const renderCellEmptyContent = computed(() => renderTNode(internalInstance, 'cellEmptyContent'));
const loadingClasses = computed(() => [`${classPrefix}-table__loading--full`]);
const loadingContent = computed(() =>
renderTNode(internalInstance, 'loading', { defaultNode: h(TLoading, { ...props.loadingProps }) }),
renderTNode(internalInstance, 'loading', { defaultNode: defaultLoadingContent }),
);

const onInnerVirtualScroll = (e: WheelEvent) => {
props.onScroll?.({ params: e });
};
Expand Down