6.10
This commit is contained in:
@@ -42,7 +42,7 @@ const props=defineProps({
|
||||
},
|
||||
type:{
|
||||
type:String,
|
||||
default:'',
|
||||
default:'home',
|
||||
},
|
||||
navName:{
|
||||
type:String,
|
||||
@@ -50,12 +50,13 @@ const props=defineProps({
|
||||
}
|
||||
|
||||
})
|
||||
const emit = defineEmits(['changeWord'])
|
||||
const placeholder = ref("输入疾病名称、标题、作者搜索");
|
||||
watch(()=>props.type,(newVal)=>{
|
||||
if(newVal==='doctor'){
|
||||
placeholder.value='输入医生姓名'
|
||||
}else if(newVal==='hospital'){
|
||||
placeholder.value='输入医院名称'
|
||||
if(newVal==='home'){
|
||||
//placeholder.value='输入医生姓名'
|
||||
}else if(newVal==='caseTalk'){
|
||||
//placeholder.value='输入医院名称'
|
||||
}
|
||||
|
||||
},{immediate: true })
|
||||
@@ -68,6 +69,15 @@ const goMy=()=>{
|
||||
})
|
||||
}
|
||||
const search=()=>{
|
||||
if(props.type=='home'){
|
||||
uni.navigateTo({
|
||||
url: `/pages/search/search?keyWord=${keyWord.value}`,
|
||||
});
|
||||
}else if(props.type=='caseTalk'){
|
||||
uni.navigateTo({
|
||||
url: `/pages/specialList/specialList?keyWord=${keyWord.value}`,
|
||||
});
|
||||
}
|
||||
// if (!keyWord.value) {
|
||||
// return uni.showToast({
|
||||
// title: "请输入关键字",
|
||||
@@ -75,9 +85,7 @@ const search=()=>{
|
||||
// });
|
||||
// }
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/search/search?keyWord=${keyWord.value}`,
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user