增加搜索模板

This commit is contained in:
xuli3099
2025-08-18 16:11:49 +08:00
parent 1a66f1f3a6
commit 5e36cbb244
4 changed files with 178 additions and 147 deletions

View File

@@ -68,7 +68,7 @@ const props = defineProps({
searchKeywords:{//搜索文本
type:String
},
searchType:{//哪种类型显示对象
searchType:{//哪种类型显示对象 typeId:1-首页2-业务首页3-消息 之后可以自动添加
type:Object
},
searchTypeList:{//类型列表
@@ -111,7 +111,7 @@ const emit = defineEmits(['confirm']);
// 加载历史记录
const loadHistory = () => {
let typeId = props.searchType.typeId
let typeId = props.searchType?props.searchType.typeId:undefined
const history = uni.getStorageSync('searchHistory'+typeId) || []
historyList.value = history
}