2023-08-27 16:30:58 +00:00
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import {Action} from "element-plus";
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
id:String
|
|
|
|
|
})
|
|
|
|
|
interface Word{
|
|
|
|
|
bsm:string
|
|
|
|
|
hz:string
|
|
|
|
|
pyJs:string[]
|
|
|
|
|
}
|
|
|
|
|
let showCards = reactive<Word>({
|
|
|
|
|
pyJs:[],
|
|
|
|
|
bsm:"",
|
|
|
|
|
hz:""
|
|
|
|
|
})
|
2023-08-28 14:36:37 +00:00
|
|
|
|
const isloading = ref(true)
|
2023-08-27 16:30:58 +00:00
|
|
|
|
const ret:any =await $fetch(`/api/tools/qqazk/details`,{params:{id:props.id}})
|
2023-08-28 14:36:37 +00:00
|
|
|
|
isloading.value=false
|
2023-08-27 16:30:58 +00:00
|
|
|
|
if(ret.haveMess){
|
|
|
|
|
ElMessageBox.alert(ret.message,"获取资源错误",{
|
|
|
|
|
confirmButtonText: '确认',
|
|
|
|
|
callback:(action:Action)=>{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const d = ret.data
|
|
|
|
|
|
|
|
|
|
const arr: string[] = []
|
|
|
|
|
d.pyJs.forEach((df:any)=>{
|
|
|
|
|
let dfArr = df.split("。")
|
|
|
|
|
if (dfArr.length==1){
|
|
|
|
|
arr.push(dfArr[0])
|
|
|
|
|
}else {
|
|
|
|
|
dfArr.forEach((de:any)=>{
|
|
|
|
|
arr.push(de+"。")
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const nI={
|
|
|
|
|
bsm:d.bsm,
|
|
|
|
|
hz:d.hz,
|
|
|
|
|
pyJs:arr
|
|
|
|
|
}
|
|
|
|
|
showCards.pyJs = nI.pyJs
|
|
|
|
|
showCards.bsm = nI.bsm
|
|
|
|
|
showCards.hz = nI.hz
|
2023-09-02 02:58:39 +00:00
|
|
|
|
useHead({
|
|
|
|
|
title: "'"+showCards.hz+"'汉字详情",
|
|
|
|
|
})
|
2023-08-27 16:30:58 +00:00
|
|
|
|
// console.log(showCards)
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2023-08-28 14:36:37 +00:00
|
|
|
|
<el-card class="box-card" v-loading="isloading">
|
2023-08-27 16:30:58 +00:00
|
|
|
|
<template #header>
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<span style="margin-right: 10px;font-size: 40px"> {{showCards.hz}} </span>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<div>笔顺码: {{showCards.bsm}}</div>
|
|
|
|
|
<div style="margin-top: 10px" v-for="i in showCards.pyJs" v-show="i!='。'">
|
|
|
|
|
{{i}}
|
|
|
|
|
</div>
|
|
|
|
|
</el-card>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
|
|
</style>
|