Forráskód Böngészése

地址搜索每次都要重置1

wangfumin 4 hete
szülő
commit
ecdc836188
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      src/view/case/drawMap/creatMap.vue

+ 3 - 1
src/view/case/drawMap/creatMap.vue

@@ -163,7 +163,8 @@ const initMap = async () => {
         input: 'searchInput',
         placeSearchOptions: {
             map: map,
-            pageSize: 7
+            pageSize: 7,
+            pageIndex: 1,
         },
         searchResultsContainer: 'searchResults'
     });
@@ -333,6 +334,7 @@ const debouncedSearch = (inputValue: string, searchType: string) => {
       console.log(22222)
       // 地址搜索,保持原有逻辑
       if (poiPicker) {
+        poiPicker.placeSearch.opt.pageIndex = 1;        
         poiPicker.searchByKeyword(inputValue)
       }
     }