perf: update auth integration

This commit is contained in:
ibuler
2025-05-09 17:24:15 +08:00
committed by 老广
parent 41ec908f37
commit 44619725c6

View File

@@ -1,5 +1,5 @@
<template> <template>
<TabPage v-if="!loading" :active-menu.sync="activeMenu" :submenu="menu"> <TabPage v-if="!loading" :active-menu.sync="activeMenu" :submenu="submenu">
<keep-alive> <keep-alive>
<component :is="activeMenu" /> <component :is="activeMenu" />
</keep-alive> </keep-alive>
@@ -51,15 +51,14 @@ export default {
return { return {
loading: true, loading: true,
activeMenu: 'Basic', activeMenu: 'Basic',
authMethods: [], authMethods: []
submenu: []
} }
}, },
computed: { computed: {
...mapState({ ...mapState({
authMethodsSetting: state => state.settings.authMethods authMethodsSetting: state => state.settings.authMethods
}), }),
menu() { submenu() {
return [ return [
{ {
title: this.$t('Basic'), title: this.$t('Basic'),
@@ -78,7 +77,7 @@ export default {
this.$store.dispatch('settings/getAuthMethods').then() this.$store.dispatch('settings/getAuthMethods').then()
}, },
async mounted() { async mounted() {
this.authMethods = await getAuthItems() this.authMethods = getAuthItems()
this.loading = false this.loading = false
} }
} }