mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
14 lines
231 B
TypeScript
14 lines
231 B
TypeScript
import { ref, Ref, watch } from 'vue';
|
|
|
|
export function useLazyRender(show: Ref<boolean>) {
|
|
const inited = ref(show.value);
|
|
|
|
watch(show, (value) => {
|
|
if (value) {
|
|
inited.value = value;
|
|
}
|
|
});
|
|
|
|
return inited;
|
|
}
|