chore(Overlay): use tsx

This commit is contained in:
chenjiahan
2020-10-09 20:56:32 +08:00
parent dffa11959a
commit 6319d44423
3 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { ref, watch, WatchSource, VNode } from 'vue';
import { ref, watch, WatchSource } from 'vue';
export function useLazyRender(show: WatchSource<boolean>) {
export function useLazyRender(show: WatchSource<boolean | undefined>) {
const inited = ref(false);
watch(
@@ -13,5 +13,5 @@ export function useLazyRender(show: WatchSource<boolean>) {
{ immediate: true }
);
return (render: () => VNode) => () => (inited.value ? render() : null);
return (render: () => JSX.Element) => () => (inited.value ? render() : null);
}