提交 53e79a2d 编写于 作者: 无木

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

修复injection警告
上级 8ff5c03d
...@@ -106,11 +106,13 @@ ...@@ -106,11 +106,13 @@
return { ...props, ...unref(innerPropsRef) } as BasicTableProps; return { ...props, ...unref(innerPropsRef) } as BasicTableProps;
}); });
const isFixedHeightPage = inject(PageWrapperFixedHeightKey); const isFixedHeightPage = inject(PageWrapperFixedHeightKey, false);
watchEffect(() => { watchEffect(() => {
unref(isFixedHeightPage) && unref(isFixedHeightPage) &&
props.canResize && props.canResize &&
warn("[BasicTable] 'canResize' may not worked in PageWrapper with 'fixedHeight'"); warn(
"'canResize' of BasicTable may not work in PageWrapper with 'fixedHeight' (especially in hot updates)"
);
}); });
const { getLoading, setLoading } = useLoading(getProps); const { getLoading, setLoading } = useLoading(getProps);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册