mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 12:48:30 +08:00
21 lines
294 B
Vue
21 lines
294 B
Vue
<script setup lang="ts">
|
|
const props = defineProps<{
|
|
value: string | string[]
|
|
}>()
|
|
|
|
defineOptions({
|
|
name: 'Auth',
|
|
})
|
|
|
|
function check() {
|
|
return useAuth().auth(props.value)
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<slot v-if="check()" />
|
|
<slot v-else name="no-auth" />
|
|
</div>
|
|
</template>
|