|  |  | 
 |  |  |   <QueryMenuView @close="handleReset" @confirm="emit('close')" cancelText="重置"> | 
 |  |  |     <div class="home-query-menu-view"> | 
 |  |  |       <QueryMenuItem title="性别"> | 
 |  |  |         <ProRadio v-model="query.gender" :value-enum="GenderText" show-all-btn></ProRadio> | 
 |  |  |         <ProRadio | 
 |  |  |           v-model="query.genderLimit" | 
 |  |  |           :value-enum="EnumUserGenderText" | 
 |  |  |           show-all-btn | 
 |  |  |         ></ProRadio> | 
 |  |  |       </QueryMenuItem> | 
 |  |  |       <QueryMenuItem title="身份"> | 
 |  |  |         <ProRadio v-model="query.gender" :value-enum="GenderText" show-all-btn></ProRadio> | 
 |  |  |         <ProRadio | 
 |  |  |           v-model="query.personalIdentityCode" | 
 |  |  |           :value-enum="identityList" | 
 |  |  |           show-all-btn | 
 |  |  |         ></ProRadio> | 
 |  |  |       </QueryMenuItem> | 
 |  |  |       <QueryMenuItem> | 
 |  |  |         <template #title> | 
 |  |  | 
 |  |  |         ></nut-range> | 
 |  |  |       </QueryMenuItem> | 
 |  |  |       <QueryMenuItem title="资格证书"> | 
 |  |  |         <ProRadio v-model="query.gender" :value-enum="GenderText" show-all-btn></ProRadio> | 
 |  |  |         <ProRadio | 
 |  |  |           v-model="query.certificateType" | 
 |  |  |           :value-enum="certificateTypeList" | 
 |  |  |           show-all-btn | 
 |  |  |         ></ProRadio> | 
 |  |  |       </QueryMenuItem> | 
 |  |  |     </div> | 
 |  |  |   </QueryMenuView> | 
 |  |  | 
 |  |  |  | 
 |  |  | <script setup lang="ts"> | 
 |  |  | import { QueryMenuView, QueryMenuItem, ProRadio } from '@12333/components'; | 
 |  |  | import { GenderText } from '@12333/constants'; | 
 |  |  | import { EnumUserGenderText, CategoryCode } from '@12333/constants'; | 
 |  |  | import { useDictionaryDataSelect } from '@12333/hooks'; | 
 |  |  |  | 
 |  |  | defineOptions({ | 
 |  |  |   name: 'HomeQueryMenuView', | 
 |  |  | 
 |  |  |  | 
 |  |  | // const props = withDefaults(defineProps<Props>(), {}); | 
 |  |  |  | 
 |  |  | const { dictionaryDataList: identityList } = useDictionaryDataSelect({ | 
 |  |  |   categoryCode: CategoryCode.Identity, | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const { dictionaryDataList: certificateTypeList } = useDictionaryDataSelect({ | 
 |  |  |   categoryCode: CategoryCode.CertificateType, | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const emit = defineEmits<{ | 
 |  |  |   (e: 'reset'): void; | 
 |  |  |   (e: 'close'): void; | 
 |  |  | }>(); | 
 |  |  |  | 
 |  |  | const query = defineModel<{ | 
 |  |  |   gender: number | string; | 
 |  |  |   genderLimit: number | string; | 
 |  |  |   age: number[]; | 
 |  |  |   personalIdentityCode: string; | 
 |  |  |   certificateType: string; | 
 |  |  | }>('query'); | 
 |  |  |  | 
 |  |  | const DefaultQuery = { | 
 |  |  |   ...query.value, | 
 |  |  |   age: [...query.value.age], | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | console.log('query: ', query.value); | 
 |  |  | function handleReset() { | 
 |  |  |   for (const key in DefaultQuery) { | 
 |  |  |     query.value[key] = DefaultQuery[key]; |