maxkb/ui/src/views/chat/auth/index.vue
wangdan-fit2cloud 16b1a79c0b feat: chat
2025-06-13 21:56:01 +08:00

44 lines
1.0 KiB
Vue

<template>
<component
:is="auth_components[`/src/views/chat/auth/component/${auth_type}.vue`].default"
v-model="is_auth"
:applicationProfile="application_profile"
/>
</template>
<script setup lang="ts">
import { computed } from 'vue'
import { isAppIcon } from '@/utils/common'
const auth_components: any = import.meta.glob('@/views/chat/auth/component/*.vue', {
eager: true,
})
const emit = defineEmits(['update:modelValue'])
const props = withDefaults(
defineProps<{ modelValue: boolean; application_profile: any; auth_type?: string; style?: any }>(),
{
auth_type: 'password',
style: {},
},
)
const is_auth = computed({
get: () => {
return props.modelValue
},
set: (v) => {
emit('update:modelValue', v)
},
})
const customStyle = computed(() => {
return {
background: props.application_profile?.custom_theme?.theme_color,
color: props.application_profile?.custom_theme?.header_font_color,
border: 'none',
...props.style,
}
})
</script>
<style lang="scss"></style>