增加搜索模板
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user