开发助手
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">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
<file type="web" url="file://$PROJECT_DIR$/dev-assistant-service" />
|
<file type="web" url="file://$PROJECT_DIR$/dev-assistant-service" />
|
||||||
</component>
|
</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" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -1,13 +1,14 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="zh-cn">
|
<html lang="zh-cn">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8"/>
|
||||||
<link rel="icon" type="image/svg+xml" href="/logo.png" />
|
<link rel="icon" type="image/svg+xml" href="/logo.png"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<meta name="disable-autofill" content="on">
|
||||||
<title>开发助手</title>
|
<title>开发助手</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -6,6 +6,7 @@ import {loginApi} from "~/api/login.js";
|
|||||||
const loginFormRef = ref()
|
const loginFormRef = ref()
|
||||||
const inputRef = ref()
|
const inputRef = ref()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const passwordReadonly = ref(true)
|
||||||
|
|
||||||
const loginForm = ref({
|
const loginForm = ref({
|
||||||
password: ''
|
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(() => {
|
onMounted(() => {
|
||||||
inputRef.value.focus()
|
inputRef.value.focus()
|
||||||
|
setTimeout(() => {
|
||||||
|
passwordReadonly.value = false
|
||||||
|
}, 1)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -60,12 +54,13 @@ onMounted(() => {
|
|||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
autocomplete="new-password"
|
auto-complete="off"
|
||||||
clearable type="password"
|
clearable
|
||||||
|
type="password"
|
||||||
|
:readonly="passwordReadonly"
|
||||||
size="large"
|
size="large"
|
||||||
placeholder="请输入口令"
|
placeholder="请输入口令"
|
||||||
ref="inputRef"
|
ref="inputRef"></el-input>
|
||||||
@keyup="passwordKeyup(loginFormRef)"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" size="large" @click="login(loginFormRef)" style="width: 100%">
|
<el-button type="primary" size="large" @click="login(loginFormRef)" style="width: 100%">
|
||||||
登录
|
登录
|
||||||
|
Loading…
x
Reference in New Issue
Block a user