Showing
3 changed files
with
36 additions
and
12 deletions
| ... | @@ -209,7 +209,7 @@ button:focus { | ... | @@ -209,7 +209,7 @@ button:focus { |
| 209 | .levels { | 209 | .levels { |
| 210 | width: 90vmin; | 210 | width: 90vmin; |
| 211 | height: 64vmin; | 211 | height: 64vmin; |
| 212 | - margin: -32vmin 0 0 -40vmin; | 212 | + margin: -7rem 0 0 -40vmin; |
| 213 | -webkit-transition: -webkit-transform 0.3s; | 213 | -webkit-transition: -webkit-transform 0.3s; |
| 214 | transition: transform 0.3s; | 214 | transition: transform 0.3s; |
| 215 | -webkit-transform-style: preserve-3d; | 215 | -webkit-transform-style: preserve-3d; |
| ... | @@ -362,7 +362,7 @@ button:focus { | ... | @@ -362,7 +362,7 @@ button:focus { |
| 362 | .level.level--current { | 362 | .level.level--current { |
| 363 | -webkit-transform: translateZ(15vmin) rotate3d(0,0,1,20deg); | 363 | -webkit-transform: translateZ(15vmin) rotate3d(0,0,1,20deg); |
| 364 | /* go to center */ | 364 | /* go to center */ |
| 365 | - transform: translateZ(-15vmin) rotate3d(0,0,1,20deg); | 365 | + transform: translateZ(-3rem) rotate3d(0,0,1,20deg); |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | /* Navigation classes */ | 368 | /* Navigation classes */ | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-07-27 11:04:04 | 2 | * @Date: 2023-07-27 11:04:04 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-08-04 16:00:11 | 4 | + * @LastEditTime: 2023-08-04 16:57:15 |
| 5 | * @FilePath: /map-demo/src/components/Floor/index.vue | 5 | * @FilePath: /map-demo/src/components/Floor/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -79,11 +79,11 @@ | ... | @@ -79,11 +79,11 @@ |
| 79 | <van-popup v-model:show="show_search_popup" position="right" :overlay="true" | 79 | <van-popup v-model:show="show_search_popup" position="right" :overlay="true" |
| 80 | :style="{ height: '100%', width: '80%', background: '#FFF' }"> | 80 | :style="{ height: '100%', width: '80%', background: '#FFF' }"> |
| 81 | <div style="background-color: #F7f8fa; padding: 1rem;"> | 81 | <div style="background-color: #F7f8fa; padding: 1rem;"> |
| 82 | - <van-field v-model="search_value" placeholder="请输入搜索关键词" style="border-radius: 5px; padding: 0.5rem 1rem;" /> | 82 | + <van-field v-model="search_value" @update:model-value="onSearchUpdate" placeholder="请输入搜索关键词" style="border-radius: 5px; padding: 0.5rem 1rem;" /> |
| 83 | </div> | 83 | </div> |
| 84 | - <div v-for="(item, index) in search_list" :key="index" class="search_box"> | 84 | + <div v-for="(item, index) in search_list" :key="index" v-show="item.show" class="search_box"> |
| 85 | <div class="search_box_title">{{ item.title }}</div> | 85 | <div class="search_box_title">{{ item.title }}</div> |
| 86 | - <van-row v-for="(x, idx) in item.list" :key="idx" @click="onSearchRow(x.space)" | 86 | + <van-row v-show="x.show" v-for="(x, idx) in item.list" :key="idx" @click="onSearchRow(x.space)" |
| 87 | style="color: #aaa; margin-bottom: 0.5rem;"> | 87 | style="color: #aaa; margin-bottom: 0.5rem;"> |
| 88 | <van-col span="20">{{ x.text }}</van-col> | 88 | <van-col span="20">{{ x.text }}</van-col> |
| 89 | <van-col span="4" style="text-align: right;">{{ x.floor }}</van-col> | 89 | <van-col span="4" style="text-align: right;">{{ x.floor }}</van-col> |
| ... | @@ -116,14 +116,17 @@ export default { | ... | @@ -116,14 +116,17 @@ export default { |
| 116 | { | 116 | { |
| 117 | space: 1.01, | 117 | space: 1.01, |
| 118 | text: '101~110室', | 118 | text: '101~110室', |
| 119 | - floor: 'L1' | 119 | + floor: 'L1', |
| 120 | + show: true, | ||
| 120 | }, | 121 | }, |
| 121 | { | 122 | { |
| 122 | space: 1.02, | 123 | space: 1.02, |
| 123 | text: '111~119室', | 124 | text: '111~119室', |
| 124 | - floor: 'L1' | 125 | + floor: 'L1', |
| 126 | + show: true, | ||
| 125 | }, | 127 | }, |
| 126 | ], | 128 | ], |
| 129 | + show: true | ||
| 127 | }, | 130 | }, |
| 128 | { | 131 | { |
| 129 | title: '2-客房', | 132 | title: '2-客房', |
| ... | @@ -131,14 +134,17 @@ export default { | ... | @@ -131,14 +134,17 @@ export default { |
| 131 | { | 134 | { |
| 132 | space: 2.01, | 135 | space: 2.01, |
| 133 | text: '201~210室', | 136 | text: '201~210室', |
| 134 | - floor: 'L2' | 137 | + floor: 'L2', |
| 138 | + show: true, | ||
| 135 | }, | 139 | }, |
| 136 | { | 140 | { |
| 137 | space: 2.02, | 141 | space: 2.02, |
| 138 | text: '211~219室', | 142 | text: '211~219室', |
| 139 | - floor: 'L2' | 143 | + floor: 'L2', |
| 144 | + show: true, | ||
| 140 | }, | 145 | }, |
| 141 | ], | 146 | ], |
| 147 | + show: true | ||
| 142 | }, | 148 | }, |
| 143 | ] | 149 | ] |
| 144 | } | 150 | } |
| ... | @@ -227,6 +233,24 @@ export default { | ... | @@ -227,6 +233,24 @@ export default { |
| 227 | this.popup_title = item?.affix?.title; | 233 | this.popup_title = item?.affix?.title; |
| 228 | this.popup_content = item?.affix?.content; | 234 | this.popup_content = item?.affix?.content; |
| 229 | }, | 235 | }, |
| 236 | + onSearchUpdate () { | ||
| 237 | + this.search_list.forEach((item) => { | ||
| 238 | + item.list.forEach((x) => { | ||
| 239 | + if (x.text.indexOf(this.search_value) >= 0) { | ||
| 240 | + x.show = true; | ||
| 241 | + } else { | ||
| 242 | + x.show = false; | ||
| 243 | + } | ||
| 244 | + }); | ||
| 245 | + // 如果子项里面都为空,隐藏整个项 | ||
| 246 | + let show_num = item.list.filter((x) => x.show === true); | ||
| 247 | + if (show_num.length) { | ||
| 248 | + item.show = true; | ||
| 249 | + } else { | ||
| 250 | + item.show = false; | ||
| 251 | + } | ||
| 252 | + }); | ||
| 253 | + } | ||
| 230 | } | 254 | } |
| 231 | } | 255 | } |
| 232 | </script> | 256 | </script> | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-05-19 14:54:27 | 2 | * @Date: 2023-05-19 14:54:27 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-08-04 15:34:12 | 4 | + * @LastEditTime: 2023-08-04 16:59:15 |
| 5 | * @FilePath: /map-demo/src/views/inner.vue | 5 | * @FilePath: /map-demo/src/views/inner.vue |
| 6 | * @Description: 内部地图主体页面 | 6 | * @Description: 内部地图主体页面 |
| 7 | --> | 7 | --> |
| ... | @@ -277,7 +277,7 @@ export default { | ... | @@ -277,7 +277,7 @@ export default { |
| 277 | point_range: [ // 景区范围经纬度 | 277 | point_range: [ // 景区范围经纬度 |
| 278 | [120.585111, 31.316084], [120.585111, 31.316084], [120.589488, 31.313197], [120.585422, 31.313005] | 278 | [120.585111, 31.316084], [120.585111, 31.316084], [120.589488, 31.313197], [120.585422, 31.313005] |
| 279 | ], | 279 | ], |
| 280 | - show_floor_popup: true, | 280 | + show_floor_popup: false, |
| 281 | } | 281 | } |
| 282 | }, | 282 | }, |
| 283 | async mounted() { | 283 | async mounted() { | ... | ... |
-
Please register or login to post a comment