@tplc/business 0.2.84 → 0.2.86

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 CHANGED
@@ -2,6 +2,15 @@
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.86](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.85...v0.2.86) (2025-01-11)
6
+
7
+ ### [0.2.85](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.84...v0.2.85) (2025-01-11)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * img prodcut 阴影 ([14f2203](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/14f2203b835e6beccbc692a77cd7809035aafef8))
13
+
5
14
  ### [0.2.84](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.83...v0.2.84) (2025-01-11)
6
15
 
7
16
 
@@ -47,6 +47,9 @@ const props = withDefaults(defineProps<LcbBlockInnerProps>(), {
47
47
  // 透明度+颜色
48
48
  const innerBackgroundColor = computed(() => {
49
49
  if (!props.backgroundColor) return ''
50
- return props.backgroundColor + Math.floor(props.opacity * 255).toString(16)
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 class="relative overflow-hidden">
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%'}`"
@@ -18,11 +23,8 @@
18
23
  :enable-preview="enablePreview"
19
24
  :mode="imageHeight ? 'scaleToFill' : 'widthFix'"
20
25
  :height="imageHeight ? transformValueUnit(imageHeight) : 'auto'"
21
- :custom-class="`${styleGroup == 3 ? 'overflow-hidden' : 'overflow-hidden block'}`"
22
- :style="{
23
- borderRadius: transformValueUnit(imageRadius),
24
- display: 'block',
25
- }"
26
+ custom-class="overflow-hidden block"
27
+ :radius="transformValueUnit(imageRadius)"
26
28
  />
27
29
  </lcb-action-view>
28
30
  <view
@@ -68,7 +70,6 @@ function getRealSize(size: number = 0) {
68
70
  if (mode !== 3 && props.marginHorizontal) realWidth -= props.marginHorizontal * 2
69
71
  const imgSpan = props.imageMargin
70
72
  if (mode === 2 && imgSpan) realWidth -= (lens - 1) / 2
71
- // console.log('size', size, 'realWidth', realWidth, 'props.marginHorizontal', props.marginHorizontal)
72
73
  return (realWidth / 375) * size
73
74
  }
74
75
  </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
- <!-- <view v-for="(item, index) in items" :key="index" :class="styleGroup == 2 ? 'flex-1 relative' : 'relative'" :style="{
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="imageProps" />
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>
@@ -11,6 +11,9 @@ export interface LcbImageProps {
11
11
  imageMargin?: number
12
12
  imageSize?: number
13
13
  floatUp?: number
14
+ shadowColor?: string
15
+ shadowSize?: number
16
+ blurSize?: number
14
17
  marginBottom?: number
15
18
  imageHeight?: number
16
19
  }
@@ -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" />
@@ -108,4 +108,7 @@ export interface LcbProductItemProps {
108
108
  titleIconStyle?: CSSProperties
109
109
  userInteractionInfoStyle?: CSSProperties
110
110
  orderTipsStyle?: CSSProperties
111
+ blurSize?: number
112
+ shadowColor?: string
113
+ shadowSize?: number
111
114
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.84",
3
+ "version": "0.2.86",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -9,6 +9,9 @@ export interface LcbImageProps {
9
9
  imageMargin?: number
10
10
  imageSize?: number
11
11
  floatUp?: number
12
+ shadowColor?: string
13
+ shadowSize?: number
14
+ blurSize?: number
12
15
  marginBottom?: number
13
16
  imageHeight?: number
14
17
  }
@@ -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
@@ -103,4 +103,7 @@ export interface LcbProductItemProps {
103
103
  titleIconStyle?: CSSProperties
104
104
  userInteractionInfoStyle?: CSSProperties
105
105
  orderTipsStyle?: CSSProperties
106
+ blurSize?: number
107
+ shadowColor?: string
108
+ shadowSize?: number
106
109
  }