添加了笔顺码字典的查询等待反馈

This commit is contained in:
ZtRXR 2023-08-28 22:36:37 +08:00
parent f04d4d08f2
commit 3648033915
3 changed files with 10 additions and 3 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ logs
.env .env
.env.* .env.*
!.env.example !.env.example
/output/

View File

@ -14,7 +14,9 @@ let showCards = reactive<Word>({
bsm:"", bsm:"",
hz:"" hz:""
}) })
const isloading = ref(true)
const ret:any =await $fetch(`/api/tools/qqazk/details`,{params:{id:props.id}}) const ret:any =await $fetch(`/api/tools/qqazk/details`,{params:{id:props.id}})
isloading.value=false
if(ret.haveMess){ if(ret.haveMess){
ElMessageBox.alert(ret.message,"获取资源错误",{ ElMessageBox.alert(ret.message,"获取资源错误",{
confirmButtonText: '确认', confirmButtonText: '确认',
@ -48,7 +50,7 @@ showCards.hz = nI.hz
</script> </script>
<template> <template>
<el-card class="box-card" > <el-card class="box-card" v-loading="isloading">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span style="margin-right: 10px;font-size: 40px"> {{showCards.hz}} </span> <span style="margin-right: 10px;font-size: 40px"> {{showCards.hz}} </span>

View File

@ -7,6 +7,7 @@ const router = useRouter()
const route = useRoute() const route = useRoute()
const allEng = /^[a-zA-Z]+$/; const allEng = /^[a-zA-Z]+$/;
const allChi = /^[\u4e00-\u9fa5]+$/ const allChi = /^[\u4e00-\u9fa5]+$/
const isloading = ref(false)
interface SearchLable{ interface SearchLable{
words:string words:string
method:string method:string
@ -16,6 +17,7 @@ const formLabelAlign = reactive<SearchLable>({
method: 'bsmf', method: 'bsmf',
}) })
const testAndSearch = ()=>{ const testAndSearch = ()=>{
if (formLabelAlign.words.length<1 || if (formLabelAlign.words.length<1 ||
formLabelAlign.method=='bsmf'&&!allEng.test(formLabelAlign.words) || formLabelAlign.method=='bsmf'&&!allEng.test(formLabelAlign.words) ||
formLabelAlign.method=='bsmc'&&!allEng.test(formLabelAlign.words) || formLabelAlign.method=='bsmc'&&!allEng.test(formLabelAlign.words) ||
@ -30,6 +32,7 @@ const testAndSearch = ()=>{
} }
) )
}else { }else {
isloading.value=true
router.push({ router.push({
path:"/tools/qqazk/search", path:"/tools/qqazk/search",
query:{ query:{
@ -38,7 +41,6 @@ const testAndSearch = ()=>{
} }
}) })
} }
} }
</script> </script>
@ -50,6 +52,8 @@ const testAndSearch = ()=>{
:model="formLabelAlign" :model="formLabelAlign"
style="max-width: 460px" style="max-width: 460px"
@keydown.enter="testAndSearch" @keydown.enter="testAndSearch"
v-loading="isloading"
@submit.enter.prevent
> >
<el-form-item label="查询方法"> <el-form-item label="查询方法">
<el-radio-group v-model="formLabelAlign.method" label="label position"> <el-radio-group v-model="formLabelAlign.method" label="label position">
@ -59,7 +63,7 @@ const testAndSearch = ()=>{
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="查询内容"> <el-form-item label="查询内容">
<el-input @keydown.enter="testAndSearch" v-model="formLabelAlign.words" /> <el-input v-model="formLabelAlign.words" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="testAndSearch">搜索</el-button> <el-button @click="testAndSearch">搜索</el-button>