mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/JiboViteDocs.git
synced 2026-06-15 19:16:19 +00:00
11 lines
314 B
JavaScript
11 lines
314 B
JavaScript
import { defineComponent, onMounted, ref } from 'vue';
|
|
export const ClientOnly = defineComponent({
|
|
setup(_, { slots }) {
|
|
const show = ref(false);
|
|
onMounted(() => {
|
|
show.value = true;
|
|
});
|
|
return () => (show.value && slots.default ? slots.default() : null);
|
|
}
|
|
});
|