feat: refactor layouts and login components
This commit is contained in:
+5
-5
@@ -185,8 +185,8 @@ import {
|
||||
} from '@mdi/js'
|
||||
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import SKAdminLayout from '@/components/layouts/SKAdminLayout.vue'
|
||||
import SKEmptyLayout from '@/components/layouts/SKEmptyLayout.vue'
|
||||
import MainLayout from '@/components/layouts/MainLayout.vue'
|
||||
import PlainLayout from '@/components/layouts/PlainLayout.vue'
|
||||
import { HTTP_TOAST_EVENT } from './services/http-toast'
|
||||
import { SESSION_FORCE_LOGOUT_EVENT } from './services/session'
|
||||
import { useAuthStore } from './stores/auth'
|
||||
@@ -238,13 +238,13 @@ const _menuItemsExample = [
|
||||
* 佈局對映表
|
||||
*/
|
||||
const layoutMap = {
|
||||
default: SKAdminLayout,
|
||||
none: SKEmptyLayout,
|
||||
default: MainLayout,
|
||||
none: PlainLayout,
|
||||
}
|
||||
|
||||
// 取得當前應使用的組件
|
||||
const activeLayout = computed(() => {
|
||||
return layoutMap[route.meta.layout] || SKAdminLayout
|
||||
return layoutMap[route.meta.layout] || MainLayout
|
||||
})
|
||||
|
||||
function buildMergedMenuItems(items) {
|
||||
|
||||
Reference in New Issue
Block a user