Commit 53e79a2d94df19c0e1aa7399d5ce4c27834e0350

Authored by 无木
1 parent 8ff5c03d

fix(table): fix `injection not found` warning

修复injection警告
src/components/Table/src/BasicTable.vue
@@ -106,11 +106,13 @@ @@ -106,11 +106,13 @@
106 return { ...props, ...unref(innerPropsRef) } as BasicTableProps; 106 return { ...props, ...unref(innerPropsRef) } as BasicTableProps;
107 }); 107 });
108 108
109 - const isFixedHeightPage = inject(PageWrapperFixedHeightKey); 109 + const isFixedHeightPage = inject(PageWrapperFixedHeightKey, false);
110 watchEffect(() => { 110 watchEffect(() => {
111 unref(isFixedHeightPage) && 111 unref(isFixedHeightPage) &&
112 props.canResize && 112 props.canResize &&
113 - warn("[BasicTable] 'canResize' may not worked in PageWrapper with 'fixedHeight'"); 113 + warn(
  114 + "'canResize' of BasicTable may not work in PageWrapper with 'fixedHeight' (especially in hot updates)"
  115 + );
114 }); 116 });
115 117
116 const { getLoading, setLoading } = useLoading(getProps); 118 const { getLoading, setLoading } = useLoading(getProps);