@tplc/business 0.3.49 → 0.3.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/components/lcb-list/components/FilterSlider/index.vue +1 -1
- package/components/lcb-list/components/TreeSelect/index.vue +6 -4
- package/components/lcb-map/lcb-map.vue +26 -14
- package/components/lcb-map/types.ts +1 -0
- package/package.json +1 -1
- package/types/components/lcb-map/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.3.51](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.50...v0.3.51) (2025-02-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 新增mapcatch ([cfa54e0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/cfa54e0fc77933171a5dd2ae49a083f6cb990516))
|
|
11
|
+
|
|
12
|
+
### [0.3.50](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.60...v0.3.50) (2025-02-14)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
16
|
+
|
|
17
|
+
* **release:** 0.3.45 ([a72c8ec](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a72c8ec926ceb069ff6ab4321c8f9fcb4779c836))
|
|
18
|
+
* **release:** 0.3.46 ([a6c91b9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a6c91b992f3671f714a2c4353818253882469cf0))
|
|
19
|
+
* **release:** 0.3.47 ([1e7994c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1e7994c9e4026cec799b22e24d6c51ad2123a819))
|
|
20
|
+
* **release:** 0.3.48 ([b4bcf14](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b4bcf1459b1ea87b5860e99acee85806d07d65bb))
|
|
21
|
+
* **release:** 0.3.49 ([48ee2b4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/48ee2b468524de9ca8e8a5a61593399a72d89d33))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### ✨ Features | 新功能
|
|
25
|
+
|
|
26
|
+
* map 初始化 ([4793f89](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4793f89a6565eea9d089038627ca9fb49453c856))
|
|
27
|
+
* 修改map初始化 ([a1bda0c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a1bda0caee0072c274614c4d9c16276adbfb4b15))
|
|
28
|
+
* 兼容map ([78f054d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/78f054d3e73179da26f17d46c07a92a5cf066267))
|
|
29
|
+
* 兼容map ([fa98ffb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/fa98ffb9e2e3a2d75442be8bc71ae58f35f82f56))
|
|
30
|
+
* 更新collapse ([f3d42e8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f3d42e8e938ab39718304139edc780e3924128d9))
|
|
31
|
+
|
|
5
32
|
### [0.3.49](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.48...v0.3.49) (2025-02-13)
|
|
6
33
|
|
|
7
34
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<script setup lang="ts">
|
|
61
|
-
import { computed, getCurrentInstance, nextTick, watch, ref } from 'vue'
|
|
61
|
+
import { computed, getCurrentInstance, nextTick, watch, ref, watchEffect } from 'vue'
|
|
62
62
|
import { TreeSelectProps } from './type'
|
|
63
63
|
import useSelect from '../../hooks/useSelect'
|
|
64
64
|
import SelectTagView from '../SelectTagView/index.vue'
|
|
@@ -92,14 +92,16 @@ const treeObj = computed(() => {
|
|
|
92
92
|
)
|
|
93
93
|
})
|
|
94
94
|
const onSubmit = () => {
|
|
95
|
-
if (props.mode !== 'multiple') {
|
|
96
|
-
modelTitle.value = treeObj.value[innerValue.value as string]
|
|
97
|
-
}
|
|
98
95
|
model.value = innerValue.value
|
|
99
96
|
nextTick(() => {
|
|
100
97
|
emits('submit')
|
|
101
98
|
})
|
|
102
99
|
}
|
|
100
|
+
watchEffect(() => {
|
|
101
|
+
if (props.mode !== 'multiple') {
|
|
102
|
+
modelTitle.value = treeObj.value[innerValue.value as string]
|
|
103
|
+
}
|
|
104
|
+
})
|
|
103
105
|
const onCategoryClick = (index: number) => {
|
|
104
106
|
currentCategory.value = index
|
|
105
107
|
toView.value = `grid_${index}`
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
show-location
|
|
10
10
|
show-compass
|
|
11
11
|
show-scale
|
|
12
|
+
:scale="14"
|
|
12
13
|
class="w-full h-full"
|
|
14
|
+
id="map"
|
|
13
15
|
@regionchange="onRegionChange"
|
|
14
16
|
@callouttap="onCalloutTap"
|
|
15
17
|
/>
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
|
|
60
62
|
<script lang="ts" setup>
|
|
61
63
|
import { FORM_KEY } from '@tplc/business/constants'
|
|
62
|
-
import { reactive, inject, ref, useAttrs, watch, onMounted } from 'vue'
|
|
64
|
+
import { reactive, inject, ref, useAttrs, watch, onMounted, getCurrentInstance } from 'vue'
|
|
63
65
|
import { transformValueUnit } from '../../utils/transform'
|
|
64
66
|
import { MapItem, MapMarker } from './types'
|
|
65
67
|
import useAutoHeight from '../../hooks/useAutoHeight'
|
|
@@ -67,7 +69,6 @@ import { LcbListProps } from '@tplc/business/components/lcb-list/types'
|
|
|
67
69
|
import { LcbListInfo } from '@tplc/business/components/lcb-list/api'
|
|
68
70
|
import { debounce } from '@tplc/wot/components/common/util'
|
|
69
71
|
import useLocation from '../../hooks/useLocation'
|
|
70
|
-
import { getCurrentPage } from '../../utils/utils'
|
|
71
72
|
const height = useAutoHeight()
|
|
72
73
|
defineOptions({
|
|
73
74
|
name: 'LcbMap',
|
|
@@ -78,6 +79,8 @@ defineOptions({
|
|
|
78
79
|
},
|
|
79
80
|
})
|
|
80
81
|
const attrs = useAttrs()
|
|
82
|
+
const { proxy } = getCurrentInstance()!
|
|
83
|
+
const mapContext = ref<UniApp.MapContext>()
|
|
81
84
|
const { userLatLon, getLocation } = useLocation()
|
|
82
85
|
const props = defineProps<LcbListProps & LcbListInfo>()
|
|
83
86
|
const scaleRadius: Record<string, number> = {
|
|
@@ -121,16 +124,21 @@ const form = inject<Record<string, any>>(FORM_KEY, {})
|
|
|
121
124
|
const current = ref(0)
|
|
122
125
|
const list = ref<MapItem[]>([])
|
|
123
126
|
|
|
124
|
-
const getData = debounce(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
const getData = debounce(() => {
|
|
128
|
+
mapContext.value?.getRegion({
|
|
129
|
+
async success(res) {
|
|
130
|
+
const { data = [] } = (await uni.$lcb.http.post('/productInfo/map', {
|
|
131
|
+
...props.baseParam,
|
|
132
|
+
...form?.value,
|
|
133
|
+
mapCornerLongitude: res.southwest.longitude,
|
|
134
|
+
mapCornerLatitude: res.southwest.latitude,
|
|
135
|
+
})) as {
|
|
136
|
+
data: MapItem[]
|
|
137
|
+
}
|
|
138
|
+
list.value = data
|
|
139
|
+
getCurrentData(data)
|
|
140
|
+
},
|
|
141
|
+
})
|
|
134
142
|
}, 50)
|
|
135
143
|
|
|
136
144
|
watch(
|
|
@@ -141,6 +149,7 @@ watch(
|
|
|
141
149
|
form.value.mapLongitude = val.longitude
|
|
142
150
|
form.value.userLongitude = val.longitude
|
|
143
151
|
form.value.userLatitude = val.latitude
|
|
152
|
+
form.value.scale = 14
|
|
144
153
|
form.value.mapViewRadius = scaleRadius[14]
|
|
145
154
|
},
|
|
146
155
|
{
|
|
@@ -163,7 +172,7 @@ const onRegionChange = (e: {
|
|
|
163
172
|
form.value.scale = e.detail.scale
|
|
164
173
|
form.value.mapLatitude = e.detail.centerLocation.latitude
|
|
165
174
|
form.value.mapLongitude = e.detail.centerLocation.longitude
|
|
166
|
-
form.value.mapViewRadius = scaleRadius[e.detail.scale]
|
|
175
|
+
form.value.mapViewRadius = scaleRadius[parseInt(String(e.detail.scale))]
|
|
167
176
|
}
|
|
168
177
|
}
|
|
169
178
|
const onCurrentChange = (p: number) => {
|
|
@@ -220,9 +229,12 @@ watch(
|
|
|
220
229
|
},
|
|
221
230
|
{
|
|
222
231
|
deep: true,
|
|
223
|
-
immediate: true,
|
|
224
232
|
},
|
|
225
233
|
)
|
|
234
|
+
onMounted(() => {
|
|
235
|
+
mapContext.value = uni.createMapContext('map', proxy)
|
|
236
|
+
getData()
|
|
237
|
+
})
|
|
226
238
|
</script>
|
|
227
239
|
<style lang="scss">
|
|
228
240
|
.icon {
|
package/package.json
CHANGED