fix: 解决报错

develop
sqlnice 2024-11-01 14:52:56 +08:00
parent 17e6adf0b2
commit 3783049246
2 changed files with 30 additions and 48 deletions

14
src/components.d.ts vendored
View File

@ -8,7 +8,6 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
ElAside: typeof import('element-plus/es')['ElAside']
ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElBadge: typeof import('element-plus/es')['ElBadge']
ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
@ -28,33 +27,20 @@ declare module '@vue/runtime-core' {
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
Empty: typeof import('./components/empty/Empty.vue')['default']
IconEpApp: typeof import('~icons/ep/app')['default']
IconEpArrowDown: typeof import('~icons/ep/arrow-down')['default']
IconEpArrowLeft: typeof import('~icons/ep/arrow-left')['default']
IconEpArrowRight: typeof import('~icons/ep/arrow-right')['default']
IconEpBell: typeof import('~icons/ep/bell')['default']
IconEpBellFill: typeof import('~icons/ep/bell-fill')['default']
IconEpBellFilled: typeof import('~icons/ep/bell-filled')['default']
IconEpG0ird: typeof import('~icons/ep/g0ird')['default']
IconEpGird: typeof import('~icons/ep/gird')['default']
IconEpGrid: typeof import('~icons/ep/grid')['default']
IconEpHomeFilled: typeof import('~icons/ep/home-filled')['default']
IconEpKey: typeof import('~icons/ep/key')['default']
IconEpLock: typeof import('~icons/ep/lock')['default']
IconEpPlus: typeof import('~icons/ep/plus')['default']
IconEpRight: typeof import('~icons/ep/right')['default']
IconEpSearch: typeof import('~icons/ep/search')['default']
IconEpSwitchButton: typeof import('~icons/ep/switch-button')['default']
IconEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']

View File

@ -112,10 +112,9 @@ import { required } from '@/validate'
import { setUkeyPassword } from 'utils/auth'
import type { FormInstance } from 'element-plus'
const ukeyPasswordInputRef = ref()
onMounted(() => {
if (typeof ukeyPasswordInputRef.value.focus === 'function') ukeyPasswordInputRef.value.focus()
if (ukeyPasswordInputRef.value && typeof ukeyPasswordInputRef.value.focus === 'function') ukeyPasswordInputRef.value.focus()
})
const activeName = ref('UKEY')
const loginForm = reactive({
@ -124,7 +123,6 @@ const loginForm = reactive({
ukeyPassword: '',
saccount: '',
spassword: ''
})
const remember = ref(false)
const loading = ref(false)
@ -207,7 +205,6 @@ function handleLogin4sKey() {
})
}
// ukey
async function handleUkeyLogin() {
if (!loginFormRef.value) return
@ -243,7 +240,6 @@ function handleLogin4sKey() {
capsTooltip.value = false
}
}
</script>
<style lang="scss" scoped>