mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
chore: rename api folder to composition
This commit is contained in:
13
src/composition/use-lazy-render.ts
Normal file
13
src/composition/use-lazy-render.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
||||
}
|
Reference in New Issue
Block a user