@tplc/business 0.2.40 → 0.2.41
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 +10 -0
- package/components/lcb-calendar-search/lcb-calendar-search.vue +3 -11
- package/components/lcb-calendar-search/types.ts +3 -0
- package/components/lcb-map/lcb-map.vue +41 -28
- package/components/lcb-map/types.ts +4 -0
- package/package.json +1 -1
- package/types/components/lcb-calendar-search/lcb-calendar-search.vue.d.ts +1 -0
- package/types/components/lcb-calendar-search/types.d.ts +3 -0
- package/types/components/lcb-map/types.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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.2.41](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.40...v0.2.41) (2024-12-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* add map list ([f22a31b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f22a31b5dd263d036e1c36ac979ce7a93d4f9d18))
|
|
11
|
+
* map color ([59b79eb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/59b79eb7720de13f338b5d485408d1827618bd4f))
|
|
12
|
+
* map link ([f64b14f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f64b14f9889077f846dfedc3cc8899427f894307))
|
|
13
|
+
* map 支持过滤 ([fd5c4fb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/fd5c4fbcc0d48afa5e9947664b5fd7e0682068b8))
|
|
14
|
+
|
|
5
15
|
### [0.2.40](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.38...v0.2.40) (2024-12-27)
|
|
6
16
|
|
|
7
17
|
|
|
@@ -26,14 +26,9 @@
|
|
|
26
26
|
<view class="text-#999999">{{ placeholder }}</view>
|
|
27
27
|
</view>
|
|
28
28
|
</view>
|
|
29
|
-
<
|
|
30
|
-
name="
|
|
31
|
-
|
|
32
|
-
size="36rpx"
|
|
33
|
-
color="#333"
|
|
34
|
-
custom-class="ml-4"
|
|
35
|
-
@click="toMap"
|
|
36
|
-
/>
|
|
29
|
+
<lcb-action-view v-bind="link" v-if="link">
|
|
30
|
+
<wd-icon :name="icon" class-prefix="lcb" size="36rpx" color="#333" custom-class="ml-4" />
|
|
31
|
+
</lcb-action-view>
|
|
37
32
|
</lcb-block>
|
|
38
33
|
</template>
|
|
39
34
|
|
|
@@ -84,9 +79,6 @@ watch(
|
|
|
84
79
|
},
|
|
85
80
|
)
|
|
86
81
|
getLocation()
|
|
87
|
-
const toMap = () => {
|
|
88
|
-
uni.$lcb.navigateTo(`/pages/map/index?form=${JSON.stringify(form?.value)}`)
|
|
89
|
-
}
|
|
90
82
|
</script>
|
|
91
83
|
|
|
92
84
|
<style lang="scss" scoped>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { LcbActionViewProps } from '../lcb-action-view/types'
|
|
1
2
|
import { LcbBlockProps } from '../lcb-block/types'
|
|
2
3
|
|
|
3
4
|
export interface LcbCalendarSearchProps extends LcbBlockProps {
|
|
4
5
|
// Define the component's prop types here
|
|
5
6
|
placeholder?: string
|
|
7
|
+
link?: LcbActionViewProps
|
|
8
|
+
icon?: string
|
|
6
9
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
2
|
+
<view id="pagingTop"></view>
|
|
3
|
+
<view class="flex-col flex w-full" :style="{ height }" v-if="height">
|
|
3
4
|
<view class="flex-1 h-0 relative">
|
|
4
5
|
<map
|
|
5
6
|
:latitude="form.mapLatitude"
|
|
@@ -14,16 +15,18 @@
|
|
|
14
15
|
/>
|
|
15
16
|
<image
|
|
16
17
|
src="./images/2.png"
|
|
17
|
-
class="w-36rpx h-66rpx absolute
|
|
18
|
+
class="w-36rpx h-66rpx absolute left-0 top-0 m-auto bottom-0 right-0"
|
|
18
19
|
/>
|
|
19
20
|
|
|
20
|
-
<view class="absolute bottom-0 left-0 p-3 box-border
|
|
21
|
-
<lcb-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
<view class="absolute bottom-0 left-0 p-3 box-border w-full h-fit" v-if="list[current]">
|
|
22
|
+
<lcb-action-view v-bind="list[current].link">
|
|
23
|
+
<lcb-product-item
|
|
24
|
+
v-bind="{
|
|
25
|
+
...list[current],
|
|
26
|
+
...attrs,
|
|
27
|
+
}"
|
|
28
|
+
/>
|
|
29
|
+
</lcb-action-view>
|
|
27
30
|
<wd-icon
|
|
28
31
|
class-prefix="lcb"
|
|
29
32
|
size="28"
|
|
@@ -47,11 +50,12 @@
|
|
|
47
50
|
|
|
48
51
|
<script lang="ts" setup>
|
|
49
52
|
import { FORM_KEY } from '@tplc/business/constants'
|
|
50
|
-
import { reactive, inject, ref, useAttrs } from 'vue'
|
|
53
|
+
import { reactive, inject, ref, useAttrs, watch } from 'vue'
|
|
51
54
|
import { LcbListInfo } from '../lcb-list/api'
|
|
52
55
|
import { getPageOptions } from '../../utils/utils'
|
|
53
56
|
import { MapItem, MapMarker } from './types'
|
|
54
|
-
|
|
57
|
+
import useAutoHeight from '../../hooks/useAutoHeight'
|
|
58
|
+
const height = useAutoHeight()
|
|
55
59
|
defineOptions({
|
|
56
60
|
name: 'LcbMap',
|
|
57
61
|
options: {
|
|
@@ -82,24 +86,24 @@ const scaleRadius: Record<string, number> = {
|
|
|
82
86
|
19: 10,
|
|
83
87
|
20: 5,
|
|
84
88
|
}
|
|
89
|
+
const themeColor = inject('theme-color', '#3875FF')
|
|
85
90
|
const callout: MapMarker['callout'] = {
|
|
86
91
|
content: '腾讯总部大楼',
|
|
87
|
-
padding:
|
|
92
|
+
padding: 4,
|
|
88
93
|
display: 'ALWAYS',
|
|
89
94
|
fontSize: 14,
|
|
90
95
|
textAlign: 'center',
|
|
91
|
-
borderRadius:
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
borderRadius: 4,
|
|
97
|
+
|
|
98
|
+
borderWidth: 1,
|
|
99
|
+
borderColor: themeColor,
|
|
94
100
|
bgColor: '#ffffff',
|
|
95
|
-
color:
|
|
101
|
+
color: themeColor,
|
|
96
102
|
}
|
|
97
103
|
const info = reactive({
|
|
98
104
|
covers: [] as MapMarker[],
|
|
99
105
|
})
|
|
100
|
-
const form = inject<Record<string, any>>(FORM_KEY, {
|
|
101
|
-
mapViewRadius: scaleRadius[16],
|
|
102
|
-
})
|
|
106
|
+
const form = inject<Record<string, any>>(FORM_KEY, {})
|
|
103
107
|
const current = ref(0)
|
|
104
108
|
const list = ref<MapItem[]>([])
|
|
105
109
|
|
|
@@ -116,15 +120,14 @@ const getData = async () => {
|
|
|
116
120
|
getCurrentData(data)
|
|
117
121
|
}
|
|
118
122
|
const getLocation = () => {
|
|
119
|
-
getData()
|
|
120
123
|
uni.getLocation({
|
|
121
124
|
type: 'gcj02',
|
|
122
125
|
success: (res) => {
|
|
126
|
+
form.value.mapViewRadius = scaleRadius[16]
|
|
123
127
|
form.value.userLongitude = res.longitude
|
|
124
128
|
form.value.userLatitude = res.latitude
|
|
125
129
|
form.value.mapLatitude = res.latitude
|
|
126
130
|
form.value.mapLongitude = res.longitude
|
|
127
|
-
getData()
|
|
128
131
|
},
|
|
129
132
|
fail: () => {
|
|
130
133
|
uni.showToast({
|
|
@@ -165,15 +168,15 @@ const onCalloutTap = (e: { detail: { markerId: number } }) => {
|
|
|
165
168
|
const old = info.covers[current.value].callout
|
|
166
169
|
info.covers[e.detail.markerId].callout = {
|
|
167
170
|
...pre,
|
|
168
|
-
borderColor:
|
|
169
|
-
bgColor:
|
|
171
|
+
borderColor: themeColor,
|
|
172
|
+
bgColor: themeColor,
|
|
170
173
|
color: '#fff',
|
|
171
174
|
}
|
|
172
175
|
info.covers[current.value].callout = {
|
|
173
176
|
...old,
|
|
174
177
|
borderColor: '#eeeeee',
|
|
175
178
|
bgColor: '#ffffff',
|
|
176
|
-
color:
|
|
179
|
+
color: themeColor,
|
|
177
180
|
}
|
|
178
181
|
current.value = e.detail.markerId
|
|
179
182
|
}
|
|
@@ -188,19 +191,29 @@ const getCurrentData = (markers: MapItem[]) => {
|
|
|
188
191
|
poiId: current.productId,
|
|
189
192
|
latitude: current.latitude,
|
|
190
193
|
longitude: current.longitude,
|
|
194
|
+
alpha: 0,
|
|
191
195
|
callout: {
|
|
192
196
|
...callout,
|
|
193
197
|
content: current.mapPriceTips,
|
|
194
|
-
borderColor: '#eeeeee',
|
|
195
|
-
bgColor: isCurrent ?
|
|
196
|
-
color: isCurrent ? '#ffffff' :
|
|
198
|
+
borderColor: isCurrent ? themeColor : '#eeeeee',
|
|
199
|
+
bgColor: isCurrent ? themeColor : '#ffffff',
|
|
200
|
+
color: isCurrent ? '#ffffff' : themeColor,
|
|
197
201
|
},
|
|
198
202
|
}
|
|
199
203
|
})
|
|
200
204
|
current.value = 0
|
|
201
205
|
}
|
|
206
|
+
watch(
|
|
207
|
+
() => form.value,
|
|
208
|
+
() => {
|
|
209
|
+
getData()
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
deep: true,
|
|
213
|
+
},
|
|
214
|
+
)
|
|
202
215
|
</script>
|
|
203
|
-
<style lang="scss"
|
|
216
|
+
<style lang="scss">
|
|
204
217
|
.icon {
|
|
205
218
|
position: absolute;
|
|
206
219
|
top: 0;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { LcbActionViewProps } from '../lcb-action-view/types'
|
|
2
|
+
|
|
1
3
|
export interface MapMarker {
|
|
2
4
|
id: number
|
|
3
5
|
name?: string
|
|
@@ -11,6 +13,7 @@ export interface MapMarker {
|
|
|
11
13
|
x: number
|
|
12
14
|
y: number
|
|
13
15
|
}
|
|
16
|
+
alpha?: number
|
|
14
17
|
|
|
15
18
|
callout: {
|
|
16
19
|
textAlign: string
|
|
@@ -31,4 +34,5 @@ export interface MapItem {
|
|
|
31
34
|
latitude: number
|
|
32
35
|
longitude: number
|
|
33
36
|
productId: string
|
|
37
|
+
link: LcbActionViewProps
|
|
34
38
|
}
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LcbActionViewProps } from '../lcb-action-view/types'
|
|
1
2
|
export interface MapMarker {
|
|
2
3
|
id: number
|
|
3
4
|
name?: string
|
|
@@ -11,6 +12,7 @@ export interface MapMarker {
|
|
|
11
12
|
x: number
|
|
12
13
|
y: number
|
|
13
14
|
}
|
|
15
|
+
alpha?: number
|
|
14
16
|
callout: {
|
|
15
17
|
textAlign: string
|
|
16
18
|
borderWidth: number
|
|
@@ -30,4 +32,5 @@ export interface MapItem {
|
|
|
30
32
|
latitude: number
|
|
31
33
|
longitude: number
|
|
32
34
|
productId: string
|
|
35
|
+
link: LcbActionViewProps
|
|
33
36
|
}
|