Compare commits
2 Commits
17e6adf0b2
...
8222a12ef4
Author | SHA1 | Date |
---|---|---|
sqlnice | 8222a12ef4 | |
sqlnice | 3783049246 |
|
@ -8,7 +8,6 @@ export {}
|
||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
ElAside: typeof import('element-plus/es')['ElAside']
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
|
||||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElCard: typeof import('element-plus/es')['ElCard']
|
ElCard: typeof import('element-plus/es')['ElCard']
|
||||||
|
@ -28,33 +27,20 @@ declare module '@vue/runtime-core' {
|
||||||
ElMain: typeof import('element-plus/es')['ElMain']
|
ElMain: typeof import('element-plus/es')['ElMain']
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
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']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
||||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
Empty: typeof import('./components/empty/Empty.vue')['default']
|
Empty: typeof import('./components/empty/Empty.vue')['default']
|
||||||
IconEpApp: typeof import('~icons/ep/app')['default']
|
|
||||||
IconEpArrowDown: typeof import('~icons/ep/arrow-down')['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']
|
IconEpArrowRight: typeof import('~icons/ep/arrow-right')['default']
|
||||||
IconEpBell: typeof import('~icons/ep/bell')['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']
|
IconEpHomeFilled: typeof import('~icons/ep/home-filled')['default']
|
||||||
IconEpKey: typeof import('~icons/ep/key')['default']
|
IconEpKey: typeof import('~icons/ep/key')['default']
|
||||||
IconEpLock: typeof import('~icons/ep/lock')['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']
|
IconEpSearch: typeof import('~icons/ep/search')['default']
|
||||||
IconEpSwitchButton: typeof import('~icons/ep/switch-button')['default']
|
IconEpSwitchButton: typeof import('~icons/ep/switch-button')['default']
|
||||||
IconEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
|
IconEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="软KEY登录" name="SKEY">
|
<el-tab-pane label="软KEY登录" name="SKEY">
|
||||||
<div v-if="activeName === 'SKEY'">
|
<div v-if="activeName === 'SKEY'">
|
||||||
<!-- <div class="login-title">账号登录</div>-->
|
<!-- <div class="login-title">账号登录</div>-->
|
||||||
<el-form-item class="login-form-item" prop="saccount" :rules="[{ ...required, message: '请输入用户名' }]">
|
<el-form-item class="login-form-item" prop="saccount" :rules="[{ ...required, message: '请输入用户名' }]">
|
||||||
<el-input v-model="loginForm.saccount" autocomplete="off" placeholder="登录账户">
|
<el-input v-model="loginForm.saccount" autocomplete="off" placeholder="登录账户">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
|
@ -112,10 +112,9 @@ import { required } from '@/validate'
|
||||||
import { setUkeyPassword } from 'utils/auth'
|
import { setUkeyPassword } from 'utils/auth'
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
|
|
||||||
|
|
||||||
const ukeyPasswordInputRef = ref()
|
const ukeyPasswordInputRef = ref()
|
||||||
onMounted(() => {
|
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 activeName = ref('UKEY')
|
||||||
const loginForm = reactive({
|
const loginForm = reactive({
|
||||||
|
@ -124,7 +123,6 @@ const loginForm = reactive({
|
||||||
ukeyPassword: '',
|
ukeyPassword: '',
|
||||||
saccount: '',
|
saccount: '',
|
||||||
spassword: ''
|
spassword: ''
|
||||||
|
|
||||||
})
|
})
|
||||||
const remember = ref(false)
|
const remember = ref(false)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
@ -139,9 +137,9 @@ const init = () => {
|
||||||
if (local) {
|
if (local) {
|
||||||
const obj = JSON.parse(local)
|
const obj = JSON.parse(local)
|
||||||
loginForm.account = obj.account
|
loginForm.account = obj.account
|
||||||
loginForm.password = decrypt(obj.password)
|
if (obj.password) loginForm.password = decrypt(obj.password)
|
||||||
loginForm.saccount = obj.saccount
|
loginForm.saccount = obj.saccount
|
||||||
loginForm.spassword = decrypt(obj.spassword)
|
if (obj.spassword) loginForm.spassword = decrypt(obj.spassword)
|
||||||
remember.value = true
|
remember.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -207,9 +205,8 @@ function handleLogin4sKey() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ukey 登录
|
// ukey 登录
|
||||||
async function handleUkeyLogin() {
|
async function handleUkeyLogin() {
|
||||||
if (!loginFormRef.value) return
|
if (!loginFormRef.value) return
|
||||||
loginFormRef.value.validate(async valid => {
|
loginFormRef.value.validate(async valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -229,9 +226,9 @@ function handleLogin4sKey() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkCapslock({ shiftKey, key }: { shiftKey: boolean; key: string }) {
|
function checkCapslock({ shiftKey, key }: { shiftKey: boolean; key: string }) {
|
||||||
if (key && key.length === 1) {
|
if (key && key.length === 1) {
|
||||||
if ((shiftKey && key >= 'a' && key <= 'z') || (!shiftKey && key >= 'A' && key <= 'Z')) {
|
if ((shiftKey && key >= 'a' && key <= 'z') || (!shiftKey && key >= 'A' && key <= 'Z')) {
|
||||||
capsTooltip.value = true
|
capsTooltip.value = true
|
||||||
|
@ -242,8 +239,7 @@ function handleLogin4sKey() {
|
||||||
if (key === 'CapsLock' && unref(capsTooltip) === true) {
|
if (key === 'CapsLock' && unref(capsTooltip) === true) {
|
||||||
capsTooltip.value = false
|
capsTooltip.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in New Issue