开发助手
This commit is contained in:
parent
91d63f2a05
commit
639e0bf91f
6
.idea/jsLibraryMappings.xml
generated
6
.idea/jsLibraryMappings.xml
generated
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="file://$PROJECT_DIR$/dev-assistant-web" libraries="{Node.js Core}" />
|
||||
</component>
|
||||
</project>
|
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -4,7 +4,7 @@
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$/dev-assistant-service" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_22" project-jdk-name="graalvm-21" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_22" project-jdk-name="21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8"/>
|
||||
<link rel="icon" type="image/svg+xml" href="/logo.png"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="disable-autofill" content="on">
|
||||
<title>开发助手</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -6,6 +6,7 @@ import {loginApi} from "~/api/login.js";
|
||||
const loginFormRef = ref()
|
||||
const inputRef = ref()
|
||||
const router = useRouter()
|
||||
const passwordReadonly = ref(true)
|
||||
|
||||
const loginForm = ref({
|
||||
password: ''
|
||||
@ -34,18 +35,11 @@ const login = async (loginFormRef) => {
|
||||
})
|
||||
}
|
||||
|
||||
let timer = null
|
||||
const passwordKeyup = (loginFormRef) => {
|
||||
if (timer) {
|
||||
clearTimeout(timer)
|
||||
}
|
||||
timer = setTimeout(() => {
|
||||
login(loginFormRef)
|
||||
}, 300);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
inputRef.value.focus()
|
||||
setTimeout(() => {
|
||||
passwordReadonly.value = false
|
||||
}, 1)
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -60,12 +54,13 @@ onMounted(() => {
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
autocomplete="new-password"
|
||||
clearable type="password"
|
||||
auto-complete="off"
|
||||
clearable
|
||||
type="password"
|
||||
:readonly="passwordReadonly"
|
||||
size="large"
|
||||
placeholder="请输入口令"
|
||||
ref="inputRef"
|
||||
@keyup="passwordKeyup(loginFormRef)"></el-input>
|
||||
ref="inputRef"></el-input>
|
||||
</el-form-item>
|
||||
<el-button type="primary" size="large" @click="login(loginFormRef)" style="width: 100%">
|
||||
登录
|
||||
|
Loading…
x
Reference in New Issue
Block a user