Skip to content

Commit 272642e

Browse files
fix: 修复登录页的主题切换按钮不能跟随配置 (#230)
Co-authored-by: pany <[email protected]>
1 parent 63e3960 commit 272642e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pages/login/index.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts" setup>
22
import type { FormInstance, FormRules } from "element-plus"
33
import type { LoginRequestData } from "./apis/type"
4+
import { useSettingsStore } from "@/pinia/stores/settings"
45
import { useUserStore } from "@/pinia/stores/user"
56
import ThemeSwitch from "@@/components/ThemeSwitch/index.vue"
67
import { Key, Loading, Lock, Picture, User } from "@element-plus/icons-vue"
@@ -12,6 +13,8 @@ const router = useRouter()
1213
1314
const userStore = useUserStore()
1415
16+
const settingsStore = useSettingsStore()
17+
1518
const { isFocus, handleBlur, handleFocus } = useFocus()
1619
1720
/** 登录表单元素的引用 */
@@ -82,7 +85,7 @@ createCode()
8285

8386
<template>
8487
<div class="login-container">
85-
<ThemeSwitch class="theme-switch" />
88+
<ThemeSwitch v-if="settingsStore.showThemeSwitch" class="theme-switch" />
8689
<Owl :close-eyes="isFocus" />
8790
<div class="login-card">
8891
<div class="title">

0 commit comments

Comments
 (0)