mirror of
https://github.com/vastxie/99AI.git
synced 2025-11-13 20:23:43 +08:00
v4.3.0
This commit is contained in:
20
admin/src/components/Auth/index.vue
Executable file
20
admin/src/components/Auth/index.vue
Executable file
@@ -0,0 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
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>
|
||||
Reference in New Issue
Block a user