Files
devstar_introduction/node_modules/vitepress/dist/client/app/components/ClientOnly.js
2025-07-26 16:40:29 +08:00

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);
}
});