@tplc/business 0.5.14 → 0.5.16
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 +24 -0
- package/components/lcb-nav/AddressCommunity/index.vue +41 -21
- package/components/lcb-nav/types.ts +2 -0
- package/components/lcb-swiper/lcb-swiper.vue +11 -2
- package/components/lcb-swiper/types.ts +1 -0
- package/package.json +1 -1
- package/types/components/lcb-nav/AddressCommunity/index.vue.d.ts +4 -0
- package/types/components/lcb-nav/types.d.ts +2 -0
- package/types/components/lcb-swiper/lcb-swiper.vue.d.ts +3 -0
- package/types/components/lcb-swiper/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
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.5.16](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.12...v0.5.16) (2025-10-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.5.13 ([c911dd5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c911dd5f74158911411e8f0208451a03563cd2ab))
|
|
11
|
+
* **release:** 0.5.14 ([d63749c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d63749cbb55f51598bbd622ae6da0665e6f0e225))
|
|
12
|
+
* **release:** 0.5.15 ([075e7ae](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/075e7ae7a0f8a0378270a700e6c04b8c60d9138a))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ✨ Features | 新功能
|
|
16
|
+
|
|
17
|
+
* 新增banner ([8dba4d4](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8dba4d42665360e02b390c472c902075061157c7))
|
|
18
|
+
* 更新版本 ([72a74ed](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/72a74ed6bdb18784f628b8f4ccf2124a2ad7807d))
|
|
19
|
+
* 调整address 策略 ([91063a1](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/91063a19ec34314920e3064c6292c085efc9b2a6))
|
|
20
|
+
* 调整ceng'ji1 ([1abf0ac](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/1abf0ac761c07cc32577a930e23e4905b60a6997))
|
|
21
|
+
|
|
22
|
+
### [0.5.15](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.14...v0.5.15) (2025-10-12)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### ✨ Features | 新功能
|
|
26
|
+
|
|
27
|
+
* 调整ceng'ji1 ([1abf0ac](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/1abf0ac761c07cc32577a930e23e4905b60a6997))
|
|
28
|
+
|
|
5
29
|
### [0.5.14](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.13...v0.5.14) (2025-10-11)
|
|
6
30
|
|
|
7
31
|
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
|
-
class="drop-menu-container"
|
|
4
|
-
:style="`background-color: ${backgroundColor}; --address-content-color: ${color};--address-width: ${width}rpx;width: ${width}rpx;`"
|
|
5
|
-
v-if="
|
|
3
|
+
class="drop-menu-container flex items-center"
|
|
4
|
+
:style="`background-color: ${backgroundColor}; --address-content-color: ${color};font-size: ${fontSize}rpx;--address-width: ${width}rpx;width: ${width}rpx;`"
|
|
5
|
+
v-if="title"
|
|
6
|
+
@click="onChooseAddress"
|
|
6
7
|
>
|
|
7
|
-
<
|
|
8
|
+
<template v-if="mode === 'normal'">
|
|
9
|
+
<view class="truncate">{{ title }}</view>
|
|
10
|
+
<wd-icon name="arrow-down" />
|
|
11
|
+
</template>
|
|
12
|
+
<wd-drop-menu v-else>
|
|
8
13
|
<wd-drop-menu-item
|
|
9
14
|
v-model="value"
|
|
10
15
|
:options="options"
|
|
@@ -18,7 +23,7 @@
|
|
|
18
23
|
</template>
|
|
19
24
|
|
|
20
25
|
<script setup lang="ts">
|
|
21
|
-
import {
|
|
26
|
+
import { ref, watch, computed } from 'vue'
|
|
22
27
|
import { AddressCommunityProps } from '../types'
|
|
23
28
|
defineOptions({
|
|
24
29
|
name: 'AddressCommunity',
|
|
@@ -28,32 +33,29 @@ defineOptions({
|
|
|
28
33
|
styleIsolation: 'shared',
|
|
29
34
|
},
|
|
30
35
|
})
|
|
31
|
-
withDefaults(defineProps<AddressCommunityProps>(), {
|
|
36
|
+
const props = withDefaults(defineProps<AddressCommunityProps>(), {
|
|
32
37
|
backgroundColor: 'transparent',
|
|
33
38
|
color: '#000',
|
|
39
|
+
fontSize: 28,
|
|
34
40
|
width: 240,
|
|
41
|
+
mode: 'normal',
|
|
35
42
|
})
|
|
36
|
-
const constantsStore = uni.$lcb.constantsStore?.()
|
|
37
43
|
const value = defineModel<string>('')
|
|
38
|
-
const
|
|
44
|
+
const constantsStore = uni.$lcb.constantsStore?.()
|
|
45
|
+
const title = ref<string>('')
|
|
39
46
|
const options = computed(() => {
|
|
40
47
|
return constantsStore?.mainConfig?.addressList
|
|
41
48
|
})
|
|
42
|
-
const setCurrentAddress = (addressId
|
|
43
|
-
if (
|
|
44
|
-
title.value =
|
|
45
|
-
value.value = addressId
|
|
49
|
+
const setCurrentAddress = (address: { addressName: string; addressId: string }) => {
|
|
50
|
+
if (address) {
|
|
51
|
+
title.value = address.addressName
|
|
52
|
+
value.value = address.addressId
|
|
46
53
|
}
|
|
47
54
|
}
|
|
48
|
-
setCurrentAddress(
|
|
49
|
-
constantsStore?.mainConfig?.address?.addressId ||
|
|
50
|
-
constantsStore?.mainConfig?.addressList?.[0]?.addressId ||
|
|
51
|
-
'',
|
|
52
|
-
)
|
|
53
55
|
watch(
|
|
54
56
|
() => constantsStore?.mainConfig?.address,
|
|
55
57
|
(address) => {
|
|
56
|
-
setCurrentAddress(address
|
|
58
|
+
setCurrentAddress(address)
|
|
57
59
|
},
|
|
58
60
|
{
|
|
59
61
|
immediate: true,
|
|
@@ -62,26 +64,32 @@ watch(
|
|
|
62
64
|
)
|
|
63
65
|
|
|
64
66
|
const handleChange = (e: any) => {
|
|
65
|
-
title.value = e.selectedItem.label
|
|
66
67
|
uni.$lcb.constantsStore?.()?.setAddressId(e.selectedItem.addressId)
|
|
67
68
|
}
|
|
69
|
+
|
|
70
|
+
const onChooseAddress = () => {
|
|
71
|
+
if (props.mode === 'normal') {
|
|
72
|
+
uni.$lcb.navigateTo('/pages-sub/index/store')
|
|
73
|
+
}
|
|
74
|
+
}
|
|
68
75
|
</script>
|
|
69
76
|
|
|
70
77
|
<style lang="scss" scoped>
|
|
71
78
|
.drop-menu-container {
|
|
72
79
|
margin-right: 24rpx;
|
|
73
|
-
|
|
74
|
-
|
|
80
|
+
gap: 8rpx;
|
|
75
81
|
:deep(.wd-drop-menu__list) {
|
|
76
82
|
background-color: transparent;
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
:deep(.wd-drop-menu) {
|
|
80
86
|
font-size: 28rpx !important;
|
|
87
|
+
width: 100%;
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
:deep(.wd-drop-menu__item) {
|
|
84
91
|
color: var(--address-content-color);
|
|
92
|
+
text-align: start;
|
|
85
93
|
}
|
|
86
94
|
|
|
87
95
|
:deep(.wd-drop-item) {
|
|
@@ -89,5 +97,17 @@ const handleChange = (e: any) => {
|
|
|
89
97
|
width: var(--address-width);
|
|
90
98
|
}
|
|
91
99
|
}
|
|
100
|
+
:deep(.wd-drop-item__icon) {
|
|
101
|
+
font-size: 16rpx !important;
|
|
102
|
+
}
|
|
103
|
+
:deep(.wd-drop-item__title) {
|
|
104
|
+
font-size: 28rpx !important;
|
|
105
|
+
padding: 0;
|
|
106
|
+
// 一行省略号
|
|
107
|
+
width: 100%;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
text-overflow: ellipsis;
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
}
|
|
92
112
|
}
|
|
93
113
|
</style>
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<lcb-block v-bind="$props">
|
|
3
|
-
<view
|
|
3
|
+
<view
|
|
4
|
+
class="lcb-carousel"
|
|
5
|
+
@touchstart="starts"
|
|
6
|
+
@touchend="ends"
|
|
7
|
+
:style="{ height: itemHeight + 'rpx' }"
|
|
8
|
+
>
|
|
4
9
|
<view
|
|
5
10
|
v-for="(item, i) in imagelist"
|
|
6
11
|
:key="i"
|
|
@@ -14,6 +19,7 @@
|
|
|
14
19
|
height: itemHeight + 'rpx',
|
|
15
20
|
transition: item.transition + 's all',
|
|
16
21
|
transform: 'translate3d(-50%, -50%, 0) scale(' + item.scale + ')',
|
|
22
|
+
opacity: item.opacity,
|
|
17
23
|
}"
|
|
18
24
|
>
|
|
19
25
|
<lcb-action-view
|
|
@@ -51,6 +57,7 @@ const props = withDefaults(defineProps<LcbSwiperProps>(), {
|
|
|
51
57
|
mode: 'multiple',
|
|
52
58
|
itemWidth: 450,
|
|
53
59
|
itemHeight: 300,
|
|
60
|
+
enableOpacity: false,
|
|
54
61
|
})
|
|
55
62
|
type DataRecord = Record<string, any>
|
|
56
63
|
|
|
@@ -60,6 +67,7 @@ interface SlotStyle {
|
|
|
60
67
|
zIndex: number
|
|
61
68
|
scale: number
|
|
62
69
|
transition: number
|
|
70
|
+
opacity: number
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
interface ImageItem extends SlotStyle {
|
|
@@ -100,6 +108,7 @@ function buildSlots(n: number): SlotStyle[] {
|
|
|
100
108
|
top: '50%',
|
|
101
109
|
zIndex: 100 - d,
|
|
102
110
|
scale: Math.max(1 - d * scaleStep, 0.6),
|
|
111
|
+
opacity: props.enableOpacity ? (d === 0 ? 1 : d === 1 ? 0.4 : 0.7) : 1,
|
|
103
112
|
transition: 0.2,
|
|
104
113
|
}
|
|
105
114
|
})
|
|
@@ -132,6 +141,7 @@ function applySlotStyle(item: ImageItem, slot: SlotStyle) {
|
|
|
132
141
|
item.zIndex = slot.zIndex
|
|
133
142
|
item.scale = slot.scale
|
|
134
143
|
item.transition = slot.transition
|
|
144
|
+
item.opacity = slot.opacity
|
|
135
145
|
}
|
|
136
146
|
|
|
137
147
|
function LeftSliding() {
|
|
@@ -240,7 +250,6 @@ const jumpInterceptorHandler: any = (item: ImageItem) => () => {
|
|
|
240
250
|
.lcb-carousel {
|
|
241
251
|
width: 100%;
|
|
242
252
|
height: 100%;
|
|
243
|
-
min-height: 200px;
|
|
244
253
|
position: relative;
|
|
245
254
|
overflow: hidden;
|
|
246
255
|
z-index: 0;
|
package/package.json
CHANGED
|
@@ -9,7 +9,9 @@ declare const _default: import('vue').DefineComponent<
|
|
|
9
9
|
{
|
|
10
10
|
backgroundColor: string
|
|
11
11
|
color: string
|
|
12
|
+
fontSize: number
|
|
12
13
|
width: number
|
|
14
|
+
mode: string
|
|
13
15
|
}
|
|
14
16
|
>,
|
|
15
17
|
{},
|
|
@@ -23,9 +25,11 @@ declare const _default: import('vue').DefineComponent<
|
|
|
23
25
|
import('vue').PublicProps,
|
|
24
26
|
any,
|
|
25
27
|
{
|
|
28
|
+
mode: 'normal' | 'menu'
|
|
26
29
|
width: number
|
|
27
30
|
backgroundColor: string
|
|
28
31
|
color: string
|
|
32
|
+
fontSize: number
|
|
29
33
|
},
|
|
30
34
|
{}
|
|
31
35
|
>
|
|
@@ -7,6 +7,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
7
7
|
mode: string
|
|
8
8
|
itemWidth: number
|
|
9
9
|
itemHeight: number
|
|
10
|
+
enableOpacity: boolean
|
|
10
11
|
}
|
|
11
12
|
>,
|
|
12
13
|
{},
|
|
@@ -28,6 +29,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
28
29
|
mode: string
|
|
29
30
|
itemWidth: number
|
|
30
31
|
itemHeight: number
|
|
32
|
+
enableOpacity: boolean
|
|
31
33
|
}
|
|
32
34
|
>
|
|
33
35
|
>
|
|
@@ -38,6 +40,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
38
40
|
mode: string
|
|
39
41
|
itemWidth: number
|
|
40
42
|
itemHeight: number
|
|
43
|
+
enableOpacity: boolean
|
|
41
44
|
},
|
|
42
45
|
{}
|
|
43
46
|
>
|