UnisKB/ui/src/views/authentication/index.vue

59 lines
1.6 KiB
Vue
Raw Normal View History

2024-07-09 09:50:37 +00:00
<template>
<div class="authentication-setting p-24">
2024-07-11 11:51:28 +00:00
<h4>{{$t('login.authentication')}}</h4>
2024-07-09 09:50:37 +00:00
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<template v-for="(item, index) in tabList" :key="index">
<el-tab-pane :label="item.label" :name="item.name">
<div class="authentication-setting__main main-calc-height">
2024-07-10 03:27:52 +00:00
<el-scrollbar>
<div class="form-container">
2024-07-09 09:50:37 +00:00
<component :is="item.component" />
2024-07-10 03:27:52 +00:00
</div>
</el-scrollbar>
2024-07-09 09:50:37 +00:00
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</template>
<script setup lang="ts">
2024-07-11 11:51:28 +00:00
import { ref, computed, onMounted } from 'vue'
2024-07-09 09:50:37 +00:00
import LDAP from './component/LDAP.vue'
2024-07-11 11:51:28 +00:00
import { t } from '@/locales'
2024-07-09 09:50:37 +00:00
const activeName = ref('LDAP')
const tabList = [
{
2024-07-11 11:51:28 +00:00
label: t('login.ldap.title'),
2024-07-09 09:50:37 +00:00
name: 'LDAP',
component: LDAP
}
]
// 动态引入组件
const loadComponent = async (componentName: string) => {
await import(`./component/${componentName}.vue`).then((res) => res.default)
}
const currentComponent = computed(() => loadComponent(activeName.value))
function handleClick() {}
onMounted(() => {})
</script>
<style lang="scss" scoped>
.authentication-setting__main {
background-color: var(--app-view-bg-color);
box-sizing: border-box;
min-width: 700px;
height: calc(100vh - var(--app-header-height) - var(--app-view-padding) * 2 - 80px);
box-sizing: border-box;
.form-container {
width: 70%;
margin: 0 auto;
:deep(.el-checkbox__label) {
font-weight: 400;
}
}
}
</style>