|
@@ -28,8 +28,8 @@
|
|
|
<div class="list-content">
|
|
|
<ion-list>
|
|
|
<ion-item v-for="(record,key) in dataList" :key="key">
|
|
|
- <ion-label @click="onSelect(record)" >
|
|
|
- <span v-html="formatStr(record.professionName)"></span>({{record.parentProfessionName}})
|
|
|
+ <ion-label @click="onSelect(record)">
|
|
|
+ <span v-html="formatStr(record.professionName)"></span>({{ record.parentProfessionName }})
|
|
|
</ion-label>
|
|
|
</ion-item>
|
|
|
</ion-list>
|
|
@@ -87,9 +87,11 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const reload = () => {
|
|
|
- dataList.value = [];
|
|
|
- searchParams.pageIndex = 1;
|
|
|
- loadData();
|
|
|
+ setTimeout(() => {
|
|
|
+ dataList.value = [];
|
|
|
+ searchParams.pageIndex = 1;
|
|
|
+ loadData();
|
|
|
+ }, 200)
|
|
|
}
|
|
|
|
|
|
const onScroll = (e: any) => {
|
|
@@ -103,7 +105,7 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const onConfirm = () => {
|
|
|
- if(searchParams.professionName){
|
|
|
+ if (searchParams.professionName) {
|
|
|
resultInfo.text = searchParams.professionName;
|
|
|
context.emit("resultInfo", resultInfo);
|
|
|
}
|
|
@@ -130,11 +132,11 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const formatStr = (str: any) => {
|
|
|
- if(!str){
|
|
|
+ if (!str) {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
- return str.replace(searchParams.professionName,'<span style="color: coral">'+searchParams.professionName+'</span>');
|
|
|
+ return str.replace(searchParams.professionName, '<span style="color: coral">' + searchParams.professionName + '</span>');
|
|
|
}
|
|
|
|
|
|
return {
|