Files
basic/src/components/Auth/index.vue
T
2020-10-17 11:54:51 +08:00

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>