Merge pull request #593 from xzz2021/master
fix: 修复store里title不更新,Enter登录重复触发
This commit is contained in:
@@ -328,6 +328,8 @@ export const useAppStore = defineStore('app', {
|
|||||||
valueLight: 'light'
|
valueLight: 'light'
|
||||||
})
|
})
|
||||||
isDark.value = this.getIsDark
|
isDark.value = this.getIsDark
|
||||||
|
const newTitle = import.meta.env.VITE_APP_TITLE
|
||||||
|
newTitle !== this.getTitle && this.setTitle(newTitle)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
persist: true
|
persist: true
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ const schema = reactive<FormSchema[]>([
|
|||||||
// 按下enter键触发登录
|
// 按下enter键触发登录
|
||||||
onKeydown: (_e: any) => {
|
onKeydown: (_e: any) => {
|
||||||
if (_e.key === 'Enter') {
|
if (_e.key === 'Enter') {
|
||||||
|
_e.stopPropagation() // 阻止事件冒泡
|
||||||
signIn()
|
signIn()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user