@tplc/business 0.2.84 → 0.2.85
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 +7 -0
- package/components/lcb-block/lcb-block.vue +4 -1
- package/components/lcb-image/Image/index.vue +7 -3
- package/components/lcb-image/lcb-image.vue +2 -43
- package/components/lcb-image/types.ts +3 -0
- package/components/lcb-product/types.ts +3 -0
- package/components/lcb-product-item/lcb-product-item.vue +15 -7
- package/components/lcb-product-item/types.ts +3 -0
- package/package.json +1 -1
- package/types/components/lcb-image/types.d.ts +3 -0
- package/types/components/lcb-list/lcb-list.vue.d.ts +3 -3
- package/types/components/lcb-product/types.d.ts +3 -0
- package/types/components/lcb-product-item/lcb-product-item.vue.d.ts +10 -1
- package/types/components/lcb-product-item/types.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.85](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.84...v0.2.85) (2025-01-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* img prodcut 阴影 ([14f2203](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/14f2203b835e6beccbc692a77cd7809035aafef8))
|
|
11
|
+
|
|
5
12
|
### [0.2.84](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.83...v0.2.84) (2025-01-11)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -47,6 +47,9 @@ const props = withDefaults(defineProps<LcbBlockInnerProps>(), {
|
|
|
47
47
|
// 透明度+颜色
|
|
48
48
|
const innerBackgroundColor = computed(() => {
|
|
49
49
|
if (!props.backgroundColor) return ''
|
|
50
|
-
|
|
50
|
+
if (props.backgroundColor.length === 7) {
|
|
51
|
+
return props.backgroundColor + Math.floor(props.opacity * 255).toString(16)
|
|
52
|
+
}
|
|
53
|
+
return props.backgroundColor
|
|
51
54
|
})
|
|
52
55
|
</script>
|
|
@@ -6,11 +6,16 @@
|
|
|
6
6
|
:style="{
|
|
7
7
|
marginLeft: transformValueUnit(styleGroup != 1 && index > 0 ? imageMargin : 0),
|
|
8
8
|
marginTop: transformValueUnit(styleGroup == 1 && index > 0 ? imageMargin : 0),
|
|
9
|
-
// marginLeft: transformValueUnit(styleGroup == 2 && index > 0 ? imageMargin : 0),
|
|
10
9
|
width: styleGroup == 3 ? transformValueUnit(imageSize) : 'auto',
|
|
11
10
|
}"
|
|
12
11
|
>
|
|
13
|
-
<view
|
|
12
|
+
<view
|
|
13
|
+
class="relative overflow-hidden"
|
|
14
|
+
:style="{
|
|
15
|
+
boxShadow:
|
|
16
|
+
shadowColor && shadowSize ? `0px 0px ${blurSize}px ${shadowSize}px ${shadowColor}` : '',
|
|
17
|
+
}"
|
|
18
|
+
>
|
|
14
19
|
<lcb-action-view v-bind="item.link" custom-class="w-full" v-if="item.url">
|
|
15
20
|
<wd-img
|
|
16
21
|
:width="`${styleGroup == 3 ? transformValueUnit(imageSize) : '100%'}`"
|
|
@@ -68,7 +73,6 @@ function getRealSize(size: number = 0) {
|
|
|
68
73
|
if (mode !== 3 && props.marginHorizontal) realWidth -= props.marginHorizontal * 2
|
|
69
74
|
const imgSpan = props.imageMargin
|
|
70
75
|
if (mode === 2 && imgSpan) realWidth -= (lens - 1) / 2
|
|
71
|
-
// console.log('size', size, 'realWidth', realWidth, 'props.marginHorizontal', props.marginHorizontal)
|
|
72
76
|
return (realWidth / 375) * size
|
|
73
77
|
}
|
|
74
78
|
</script>
|
|
@@ -18,27 +18,9 @@
|
|
|
18
18
|
marginLeft: transformValueUnit(marginHorizontal),
|
|
19
19
|
marginRight: transformValueUnit(marginHorizontal),
|
|
20
20
|
marginTop: transformValueUnit(-(floatUp || 0)),
|
|
21
|
-
// marginTop: transformValueUnit(marginTop),
|
|
22
|
-
// marginBottom: transformValueUnit(marginBottom),
|
|
23
21
|
}"
|
|
24
22
|
>
|
|
25
|
-
|
|
26
|
-
marginTop: transformValueUnit(styleGroup == 1 && index > 0 ? imageMargin : 0),
|
|
27
|
-
marginLeft: transformValueUnit(styleGroup == 2 && index > 0 ? imageMargin : 0),
|
|
28
|
-
}">
|
|
29
|
-
<wd-img v-if="!!item.url" v-bind="{
|
|
30
|
-
src: item.url,
|
|
31
|
-
class: 'overflow-hidden block',
|
|
32
|
-
}" @click="onClickItem(item)" width="100%" :enable-preview="enablePreview" mode="widthFix" :style="{
|
|
33
|
-
borderRadius: transformValueUnit(imageRadius),
|
|
34
|
-
display: 'block',
|
|
35
|
-
}" />
|
|
36
|
-
<view v-if="!item.url" class="flex justify-center items-center bg-light color-gray overflow-hidden" :style="{
|
|
37
|
-
height: transformValueUnit(400),
|
|
38
|
-
borderRadius: transformValueUnit(imageRadius),
|
|
39
|
-
}"><wd-icon name="image" size="50px"></wd-icon></view>
|
|
40
|
-
</view> -->
|
|
41
|
-
<Image v-bind="imageProps" />
|
|
23
|
+
<Image v-bind="$props" />
|
|
42
24
|
</view>
|
|
43
25
|
|
|
44
26
|
<scroll-view
|
|
@@ -49,20 +31,15 @@
|
|
|
49
31
|
marginLeft: transformValueUnit(marginHorizontal),
|
|
50
32
|
marginRight: transformValueUnit(marginHorizontal),
|
|
51
33
|
marginTop: transformValueUnit(-(floatUp || 0)),
|
|
52
|
-
// marginTop: transformValueUnit(marginTop),
|
|
53
|
-
// marginBottom: transformValueUnit(marginBottom),
|
|
54
34
|
}"
|
|
55
35
|
>
|
|
56
36
|
<view class="flex shrink-0">
|
|
57
|
-
<Image v-bind="
|
|
37
|
+
<Image v-bind="$props" />
|
|
58
38
|
</view>
|
|
59
39
|
</scroll-view>
|
|
60
|
-
|
|
61
|
-
<!-- <view class="pl-20px pr-20px break-all">{{ JSON.stringify(iconItems) }}</view> -->
|
|
62
40
|
</template>
|
|
63
41
|
|
|
64
42
|
<script setup lang="ts">
|
|
65
|
-
import { computed } from 'vue'
|
|
66
43
|
import { transformValueUnit } from '../../utils/transform'
|
|
67
44
|
import Image from './Image/index.vue'
|
|
68
45
|
import { LcbImageProps } from './types'
|
|
@@ -82,24 +59,6 @@ const props = withDefaults(defineProps<LcbImageProps>(), {
|
|
|
82
59
|
marginBottom: 0,
|
|
83
60
|
marginHorizontal: 0,
|
|
84
61
|
})
|
|
85
|
-
|
|
86
|
-
const imageProps = computed(() => {
|
|
87
|
-
return {
|
|
88
|
-
items: props.items,
|
|
89
|
-
imageSize: props.imageSize,
|
|
90
|
-
imageMargin: props.imageMargin,
|
|
91
|
-
imageRadius: props.imageRadius,
|
|
92
|
-
marginHorizontal: props.marginHorizontal,
|
|
93
|
-
enablePreview: props.enablePreview,
|
|
94
|
-
styleGroup: props.styleGroup,
|
|
95
|
-
imageHeight: props.imageHeight,
|
|
96
|
-
}
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
// const iconItems = computed(() => {
|
|
100
|
-
// console.log('props.items', props.items)
|
|
101
|
-
// return props.items;
|
|
102
|
-
// })
|
|
103
62
|
</script>
|
|
104
63
|
|
|
105
64
|
<style lang="scss" scoped></style>
|
|
@@ -3,6 +3,9 @@ import { LcbBlockProps } from '../lcb-block/types'
|
|
|
3
3
|
export interface LcbProductProps extends LcbBlockProps {
|
|
4
4
|
// Define the component's prop types here
|
|
5
5
|
listType?: 'list' | 'horizontal' | 'grid' | 'waterfall' // 1列表 2 左右滑动 3一行两个 4瀑布流
|
|
6
|
+
shadowColor?: string
|
|
7
|
+
shadowSize?: number
|
|
8
|
+
blurSize?: number
|
|
6
9
|
imageWidth?: number
|
|
7
10
|
imageHeight?: number
|
|
8
11
|
imageRadius?: number
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { provide, useAttrs } from 'vue'
|
|
2
|
+
import { computed, provide, useAttrs } from 'vue'
|
|
3
3
|
import { LcbProductItemProps } from './types'
|
|
4
4
|
import ItemValue from './components/ItemValue.vue'
|
|
5
5
|
import { transformValueUnit } from '../../utils/transform'
|
|
@@ -48,6 +48,9 @@ const props = withDefaults(defineProps<LcbProductItemProps>(), {
|
|
|
48
48
|
addressIntroVisible: true,
|
|
49
49
|
distanceVisible: true,
|
|
50
50
|
borderRadius: 12,
|
|
51
|
+
shadowSize: 1,
|
|
52
|
+
shadowColor: '#D6D7DA',
|
|
53
|
+
blurSize: 5,
|
|
51
54
|
})
|
|
52
55
|
const attrs = useAttrs()
|
|
53
56
|
provide('lcb-product-item-props', props)
|
|
@@ -86,6 +89,15 @@ defineSlots<{
|
|
|
86
89
|
coverImgSection(): any
|
|
87
90
|
contentSection(): any
|
|
88
91
|
}>()
|
|
92
|
+
const itemStyle = computed(() => {
|
|
93
|
+
return {
|
|
94
|
+
borderRadius: transformValueUnit(props.borderRadius),
|
|
95
|
+
boxShadow:
|
|
96
|
+
props.shadowColor && props.shadowSize
|
|
97
|
+
? `0px 0px ${props.blurSize}px ${props.shadowSize}px ${props.shadowColor}`
|
|
98
|
+
: '',
|
|
99
|
+
}
|
|
100
|
+
})
|
|
89
101
|
</script>
|
|
90
102
|
|
|
91
103
|
<template>
|
|
@@ -94,9 +106,7 @@ defineSlots<{
|
|
|
94
106
|
v-if="layoutType === 'horizontal'"
|
|
95
107
|
:class="className"
|
|
96
108
|
class="flex flex-col gap-1 px-2 py-3 bg-white relative overflow-clip"
|
|
97
|
-
:style="
|
|
98
|
-
borderRadius: transformValueUnit(borderRadius),
|
|
99
|
-
}"
|
|
109
|
+
:style="itemStyle"
|
|
100
110
|
>
|
|
101
111
|
<slot name="itemSection" />
|
|
102
112
|
<slot name="itemTopSection" />
|
|
@@ -237,9 +247,7 @@ defineSlots<{
|
|
|
237
247
|
v-if="layoutType === 'vertical'"
|
|
238
248
|
class="flex bg-white relative overflow-hidden"
|
|
239
249
|
:class="className"
|
|
240
|
-
:style="
|
|
241
|
-
borderRadius: transformValueUnit(borderRadius),
|
|
242
|
-
}"
|
|
250
|
+
:style="itemStyle"
|
|
243
251
|
>
|
|
244
252
|
<slot name="itemSection" />
|
|
245
253
|
<slot name="itemLeftSection" />
|
package/package.json
CHANGED
|
@@ -50,14 +50,14 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
50
50
|
borderRadius: number
|
|
51
51
|
imageHeight: number
|
|
52
52
|
listType: 'list' | 'horizontal' | 'grid' | 'waterfall'
|
|
53
|
-
itemWidth: number
|
|
54
|
-
layoutType: 'vertical' | 'horizontal'
|
|
55
|
-
titleLineClamp: number
|
|
56
53
|
pageFilterType: string
|
|
57
54
|
pageListProps: import('./components/FilterList/type').PageListProps
|
|
58
55
|
styleMode: 'default' | 'plain'
|
|
59
56
|
border: boolean
|
|
57
|
+
titleLineClamp: number
|
|
60
58
|
isSticky: boolean
|
|
59
|
+
layoutType: 'vertical' | 'horizontal'
|
|
60
|
+
itemWidth: number
|
|
61
61
|
},
|
|
62
62
|
{}
|
|
63
63
|
>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { LcbBlockProps } from '../lcb-block/types'
|
|
2
2
|
export interface LcbProductProps extends LcbBlockProps {
|
|
3
3
|
listType?: 'list' | 'horizontal' | 'grid' | 'waterfall'
|
|
4
|
+
shadowColor?: string
|
|
5
|
+
shadowSize?: number
|
|
6
|
+
blurSize?: number
|
|
4
7
|
imageWidth?: number
|
|
5
8
|
imageHeight?: number
|
|
6
9
|
imageRadius?: number
|
|
@@ -100,6 +100,9 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
100
100
|
addressIntroVisible: boolean
|
|
101
101
|
distanceVisible: boolean
|
|
102
102
|
borderRadius: number
|
|
103
|
+
shadowSize: number
|
|
104
|
+
shadowColor: string
|
|
105
|
+
blurSize: number
|
|
103
106
|
}
|
|
104
107
|
>,
|
|
105
108
|
{},
|
|
@@ -150,14 +153,20 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
150
153
|
addressIntroVisible: boolean
|
|
151
154
|
distanceVisible: boolean
|
|
152
155
|
borderRadius: number
|
|
156
|
+
shadowSize: number
|
|
157
|
+
shadowColor: string
|
|
158
|
+
blurSize: number
|
|
153
159
|
}
|
|
154
160
|
>
|
|
155
161
|
>
|
|
156
162
|
>,
|
|
157
163
|
{
|
|
164
|
+
shadowColor: string
|
|
165
|
+
shadowSize: number
|
|
166
|
+
blurSize: number
|
|
158
167
|
borderRadius: number
|
|
159
|
-
layoutType: 'vertical' | 'horizontal'
|
|
160
168
|
titleLineClamp: number
|
|
169
|
+
layoutType: 'vertical' | 'horizontal'
|
|
161
170
|
tagOverflowWrap: boolean
|
|
162
171
|
priceUnit: any
|
|
163
172
|
scribePriceUnit: any
|