@tplc/business 0.5.15 → 0.5.17
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 +73 -10
- 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 +11 -14
- 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.17](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.16...v0.5.17) (2025-10-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 调整swiper nav ([5a40606](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5a40606ff1480bbd14119867a9a042eca535517c))
|
|
11
|
+
|
|
12
|
+
### [0.5.16](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.12...v0.5.16) (2025-10-13)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
16
|
+
|
|
17
|
+
* **release:** 0.5.13 ([c911dd5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c911dd5f74158911411e8f0208451a03563cd2ab))
|
|
18
|
+
* **release:** 0.5.14 ([d63749c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d63749cbb55f51598bbd622ae6da0665e6f0e225))
|
|
19
|
+
* **release:** 0.5.15 ([075e7ae](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/075e7ae7a0f8a0378270a700e6c04b8c60d9138a))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### ✨ Features | 新功能
|
|
23
|
+
|
|
24
|
+
* 新增banner ([8dba4d4](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8dba4d42665360e02b390c472c902075061157c7))
|
|
25
|
+
* 更新版本 ([72a74ed](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/72a74ed6bdb18784f628b8f4ccf2124a2ad7807d))
|
|
26
|
+
* 调整address 策略 ([91063a1](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/91063a19ec34314920e3064c6292c085efc9b2a6))
|
|
27
|
+
* 调整ceng'ji1 ([1abf0ac](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/1abf0ac761c07cc32577a930e23e4905b60a6997))
|
|
28
|
+
|
|
5
29
|
### [0.5.15](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.14...v0.5.15) (2025-10-12)
|
|
6
30
|
|
|
7
31
|
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
|
-
class="drop-menu-container flex-center"
|
|
4
|
-
:style="
|
|
3
|
+
class="drop-menu-container flex items-center"
|
|
4
|
+
:style="containerStyle"
|
|
5
5
|
v-if="title"
|
|
6
6
|
@click="onChooseAddress"
|
|
7
7
|
>
|
|
8
|
-
<
|
|
9
|
-
|
|
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>
|
|
13
|
+
<wd-drop-menu-item
|
|
14
|
+
v-model="value"
|
|
15
|
+
:options="options"
|
|
16
|
+
:title="title"
|
|
17
|
+
@change="handleChange"
|
|
18
|
+
value-key="addressId"
|
|
19
|
+
label-key="addressName"
|
|
20
|
+
/>
|
|
21
|
+
</wd-drop-menu>
|
|
10
22
|
</view>
|
|
11
23
|
</template>
|
|
12
24
|
|
|
13
25
|
<script setup lang="ts">
|
|
14
|
-
import { ref, watch } from 'vue'
|
|
26
|
+
import { ref, watch, computed } from 'vue'
|
|
15
27
|
import { AddressCommunityProps } from '../types'
|
|
16
28
|
defineOptions({
|
|
17
29
|
name: 'AddressCommunity',
|
|
@@ -21,18 +33,29 @@ defineOptions({
|
|
|
21
33
|
styleIsolation: 'shared',
|
|
22
34
|
},
|
|
23
35
|
})
|
|
24
|
-
withDefaults(defineProps<AddressCommunityProps>(), {
|
|
36
|
+
const props = withDefaults(defineProps<AddressCommunityProps>(), {
|
|
25
37
|
backgroundColor: 'transparent',
|
|
26
38
|
color: '#000',
|
|
27
39
|
fontSize: 28,
|
|
40
|
+
width: 240,
|
|
41
|
+
mode: 'normal',
|
|
28
42
|
})
|
|
43
|
+
const value = defineModel<string>('')
|
|
29
44
|
const constantsStore = uni.$lcb.constantsStore?.()
|
|
30
45
|
const title = ref<string>('')
|
|
46
|
+
const options = computed(() => {
|
|
47
|
+
return constantsStore?.mainConfig?.addressList
|
|
48
|
+
})
|
|
49
|
+
const setCurrentAddress = (address: { addressName: string; addressId: string }) => {
|
|
50
|
+
if (address) {
|
|
51
|
+
title.value = address.addressName
|
|
52
|
+
value.value = address.addressId
|
|
53
|
+
}
|
|
54
|
+
}
|
|
31
55
|
watch(
|
|
32
56
|
() => constantsStore?.mainConfig?.address,
|
|
33
57
|
(address) => {
|
|
34
|
-
|
|
35
|
-
console.log(title.value, address)
|
|
58
|
+
setCurrentAddress(address)
|
|
36
59
|
},
|
|
37
60
|
{
|
|
38
61
|
immediate: true,
|
|
@@ -40,14 +63,54 @@ watch(
|
|
|
40
63
|
},
|
|
41
64
|
)
|
|
42
65
|
|
|
66
|
+
const handleChange = (e: any) => {
|
|
67
|
+
uni.$lcb.constantsStore?.()?.setAddressId(e.selectedItem.addressId)
|
|
68
|
+
}
|
|
69
|
+
|
|
43
70
|
const onChooseAddress = () => {
|
|
44
|
-
|
|
71
|
+
if (props.mode === 'normal') {
|
|
72
|
+
uni.$lcb.navigateTo('/pages-sub/index/store')
|
|
73
|
+
}
|
|
45
74
|
}
|
|
75
|
+
const containerStyle = computed(() => {
|
|
76
|
+
return `background-color: ${props.backgroundColor}; --address-content-color: ${props.color};font-size: ${props.fontSize}rpx;--address-font-size: ${props.fontSize}rpx;--address-width: ${props.width}rpx;${props.mode === 'normal' ? 'max-width' : 'width'}: ${props.width}rpx`
|
|
77
|
+
})
|
|
46
78
|
</script>
|
|
47
79
|
|
|
48
80
|
<style lang="scss" scoped>
|
|
49
81
|
.drop-menu-container {
|
|
50
82
|
margin-right: 24rpx;
|
|
51
|
-
gap:
|
|
83
|
+
gap: 8rpx;
|
|
84
|
+
:deep(.wd-drop-menu__list) {
|
|
85
|
+
background-color: transparent;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:deep(.wd-drop-menu) {
|
|
89
|
+
font-size: var(--address-font-size) !important;
|
|
90
|
+
width: 100%;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:deep(.wd-drop-menu__item) {
|
|
94
|
+
color: var(--address-content-color);
|
|
95
|
+
text-align: start;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:deep(.wd-drop-item) {
|
|
99
|
+
.wd-popup {
|
|
100
|
+
width: var(--address-width);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
:deep(.wd-drop-item__icon) {
|
|
104
|
+
font-size: 16rpx !important;
|
|
105
|
+
}
|
|
106
|
+
:deep(.wd-drop-item__title) {
|
|
107
|
+
font-size: var(--address-font-size) !important;
|
|
108
|
+
padding: 0;
|
|
109
|
+
// 一行省略号
|
|
110
|
+
width: 100%;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
text-overflow: ellipsis;
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
}
|
|
52
115
|
}
|
|
53
116
|
</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
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { AddressCommunityProps } from '../types'
|
|
2
|
+
declare let __VLS_typeProps: AddressCommunityProps
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
''?: string
|
|
5
|
+
} & typeof __VLS_typeProps
|
|
2
6
|
declare const _default: import('vue').DefineComponent<
|
|
3
7
|
__VLS_WithDefaults<
|
|
4
|
-
__VLS_TypePropsToOption<
|
|
8
|
+
__VLS_TypePropsToOption<__VLS_PublicProps>,
|
|
5
9
|
{
|
|
6
10
|
backgroundColor: string
|
|
7
11
|
color: string
|
|
8
12
|
fontSize: number
|
|
13
|
+
width: number
|
|
14
|
+
mode: string
|
|
9
15
|
}
|
|
10
16
|
>,
|
|
11
17
|
{},
|
|
@@ -14,22 +20,13 @@ declare const _default: import('vue').DefineComponent<
|
|
|
14
20
|
{},
|
|
15
21
|
import('vue').ComponentOptionsMixin,
|
|
16
22
|
import('vue').ComponentOptionsMixin,
|
|
17
|
-
|
|
23
|
+
any,
|
|
18
24
|
string,
|
|
19
25
|
import('vue').PublicProps,
|
|
20
|
-
|
|
21
|
-
import('vue').ExtractPropTypes<
|
|
22
|
-
__VLS_WithDefaults<
|
|
23
|
-
__VLS_TypePropsToOption<AddressCommunityProps>,
|
|
24
|
-
{
|
|
25
|
-
backgroundColor: string
|
|
26
|
-
color: string
|
|
27
|
-
fontSize: number
|
|
28
|
-
}
|
|
29
|
-
>
|
|
30
|
-
>
|
|
31
|
-
>,
|
|
26
|
+
any,
|
|
32
27
|
{
|
|
28
|
+
mode: 'normal' | 'menu'
|
|
29
|
+
width: number
|
|
33
30
|
backgroundColor: string
|
|
34
31
|
color: string
|
|
35
32
|
fontSize: number
|
|
@@ -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
|
>
|