Merge pull request #593 from xzz2021/master

fix: 修复store里title不更新,Enter登录重复触发
This commit is contained in:
Archer
2025-02-13 11:01:24 +08:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -328,6 +328,8 @@ export const useAppStore = defineStore('app', {
valueLight: 'light'
})
isDark.value = this.getIsDark
const newTitle = import.meta.env.VITE_APP_TITLE
newTitle !== this.getTitle && this.setTitle(newTitle)
}
},
persist: true

View File

@@ -76,6 +76,7 @@ const schema = reactive<FormSchema[]>([
// 按下enter键触发登录
onKeydown: (_e: any) => {
if (_e.key === 'Enter') {
_e.stopPropagation() // 阻止事件冒泡
signIn()
}
}