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

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.example
/output/

View File

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

View File

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