index.vue 270 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <script lang="ts" setup name="Auth"> const props = defineProps<{ value: string | string[] }>() function check() { return useAuth().auth(props.value) } </script> <template> <div> <slot v-if="check()" /> <slot v-else name="no-auth" /> </div> </template>