mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 14:57:52 +08:00
26 lines
394 B
Vue
26 lines
394 B
Vue
<template>
|
|
<div>
|
|
<slot v-if="check()" />
|
|
<slot v-else name="no-auth" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { auth } from '@/util'
|
|
|
|
export default {
|
|
name: 'Auth',
|
|
props: {
|
|
value: {
|
|
type: [String, Array],
|
|
default: ''
|
|
}
|
|
},
|
|
methods: {
|
|
check() {
|
|
return auth(this.value)
|
|
}
|
|
}
|
|
}
|
|
</script>
|