@tplc/business 0.7.46 → 0.7.48

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,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.7.48](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.47...v0.7.48) (2026-01-06)
6
+
7
+
8
+ ### ♻️ Code Refactoring | 代码重构
9
+
10
+ * **lcb-img-nav, lcb-tags:** restructure item properties for enhanced customization and consistency ([f669990](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/f6699906d64889c1582a15daf5b965fd00d42814))
11
+
12
+
13
+ ### ✨ Features | 新功能
14
+
15
+ * **lcb-nav:** enhance navigation behavior for Alipay mini program with fallback icon and capsule offset adjustments ([1f72adc](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/1f72adc1cf8ee7b33f6619bf4923bb032e2c2a0c))
16
+
17
+ ### [0.7.47](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.46...v0.7.47) (2026-01-05)
18
+
19
+
20
+ ### ✨ Features | 新功能
21
+
22
+ * **lcb-img-nav:** add multi-line horizontal card layout with icon border customization ([34d1f27](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/34d1f27d0d8073eefcf3867ef6cc608d297de84c))
23
+
24
+
25
+ ### ♻️ Code Refactoring | 代码重构
26
+
27
+ * **lcb-img-nav:** update item styling properties to use rowItemProps for better customization ([8709982](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8709982e6e81f907bdabcc1c004d56ea31ff1645))
28
+
5
29
  ### [0.7.46](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.44...v0.7.46) (2026-01-05)
6
30
 
7
31
 
@@ -36,14 +36,15 @@
36
36
  <view
37
37
  class="!flex justify-center items-center item"
38
38
  :style="{
39
- backgroundColor: itemBgColor,
40
- borderRadius: transformValueUnit(itemRadius),
39
+ backgroundColor: rowItemProps?.backgroundColor,
40
+ borderRadius: rowItemProps?.borderRadius ? `${rowItemProps?.borderRadius}px` : '',
41
41
  padding: `${transformValueUnit(itemVerticalPadding)} ${transformValueUnit(itemHorizontalPadding)}`,
42
42
  flexDirection: styleGroup === 3 ? 'row' : itemFlexMode,
43
43
  gap: transformValueUnit(iconTextMargin),
44
- boxShadow: itemShadowColor
45
- ? `0 0 ${transformValueUnit(itemBlurSize)} ${transformValueUnit(itemShadowSize)} ${itemShadowColor}`
46
- : '',
44
+ boxShadow:
45
+ rowItemProps?.shadowColor && rowItemProps?.shadowSize
46
+ ? `0px 0px ${rowItemProps?.blurSize}px ${rowItemProps?.shadowSize}px ${rowItemProps?.shadowColor}`
47
+ : '',
47
48
  marginRight: styleGroup === 1 ? transformValueUnit(itemGap) : 0,
48
49
  }"
49
50
  :class="{
@@ -55,12 +56,12 @@
55
56
  :style="{
56
57
  width: iconSize + 'rpx',
57
58
  height: iconSize + 'rpx',
58
- borderRadius: transformValueUnit(iconRadius),
59
+ borderRadius: iconRadius + 'px',
59
60
  border:
60
61
  iconBorderColor && iconBorderWidth
61
- ? `${transformValueUnit(iconBorderWidth)} solid ${iconBorderColor}`
62
+ ? `${iconBorderWidth}px solid ${iconBorderColor}`
62
63
  : '',
63
- padding: transformValueUnit(iconPadding),
64
+ padding: iconPadding + 'px',
64
65
  boxSizing: 'border-box',
65
66
  display: 'flex',
66
67
  alignItems: 'center',
@@ -185,12 +186,8 @@ const renderItems = computed(() => {
185
186
  }
186
187
 
187
188
  .mutil-row {
188
- :deep(.item) {
189
- justify-content: flex-start;
190
- }
191
189
  :deep(.title) {
192
- flex: 1;
193
- text-align: start;
190
+ flex: initial;
194
191
  }
195
192
  }
196
193
  .cell {
@@ -201,7 +198,6 @@ const renderItems = computed(() => {
201
198
  flex-direction: row;
202
199
  }
203
200
  :deep(.title) {
204
- flex: 1;
205
201
  text-align: start;
206
202
  margin-left: 24rpx;
207
203
  }
@@ -58,16 +58,18 @@ export interface LcbImgNavProps extends LcbBlockProps {
58
58
  titleKey?: string
59
59
  titleBottom?: number
60
60
 
61
- itemBgColor?: string
62
- itemRadius?: number
63
61
  itemVerticalPadding?: number
64
62
  itemHorizontalPadding?: number
65
63
  itemGap?: number
66
64
  itemFlexMode?: 'row' | 'column'
67
- /** 阴影颜色 */
68
- itemShadowColor?: string
69
- /** 阴影大小 */
70
- itemShadowSize?: number
71
- /** 模糊大小 */
72
- itemBlurSize?: number
65
+ rowItemProps?: {
66
+ /** 阴影颜色 */
67
+ shadowColor?: string
68
+ /** 阴影大小 */
69
+ shadowSize?: number
70
+ /** 模糊大小 */
71
+ blurSize?: number
72
+ backgroundColor?: string
73
+ borderRadius?: number
74
+ }
73
75
  }
@@ -35,6 +35,7 @@
35
35
  :class="[capsuleMode]"
36
36
  :style="{
37
37
  height: boudingHeight,
38
+ marginLeft: capsuleLeftOffset,
38
39
  }"
39
40
  >
40
41
  <view
@@ -76,7 +77,7 @@
76
77
  </lcb-action-view>
77
78
  </view>
78
79
  </view>
79
- <template v-else-if="canBack">
80
+ <template v-else-if="showFallbackBackIcon">
80
81
  <wd-icon
81
82
  class-prefix="lcb"
82
83
  :name="isLastPage() ? 'shouye_home' : 'zuo_left'"
@@ -159,6 +160,10 @@ defineOptions({
159
160
  styleIsolation: 'shared',
160
161
  },
161
162
  })
163
+ let isMpAlipay = false
164
+ // #ifdef MP-ALIPAY
165
+ isMpAlipay = true
166
+ // #endif
162
167
  const { statusBarHeight, windowWidth } = uni.getWindowInfo
163
168
  ? uni.getWindowInfo()
164
169
  : uni.getSystemInfoSync()
@@ -276,18 +281,26 @@ const paddingTop = computed(() => {
276
281
  const canBack = computed(() => {
277
282
  return props.back || !isLastPage()
278
283
  })
284
+ /** 支付宝小程序自带 home/back(且返回按钮无法去掉),避免重复渲染我们自己的返回/首页按钮 */
285
+ const showFallbackBackIcon = computed(() => {
286
+ return canBack.value && !isMpAlipay
287
+ })
288
+ /** 支付宝小程序:胶囊内容整体往后移一点,避开系统返回按钮 */
289
+ const capsuleLeftOffset = computed(() => {
290
+ return isMpAlipay ? '44px' : '0px'
291
+ })
279
292
 
280
293
  const pageInfo = inject(PAGE_PROVIDE_KEY) as Ref<Record<string, any>>
281
294
  const capsuleList = computed(() => {
282
295
  const list: ICapsule[] = []
283
- if (canBack.value) {
296
+ if (canBack.value && !isMpAlipay) {
284
297
  list.push({
285
298
  icon: 'zuo_left',
286
299
  action: 'back',
287
300
  })
288
301
  }
289
302
  /** 如果超过俩个的层级的话并且支持返回 */
290
- if (moreThanTwoPages() || (!uni.$lcb.getIsTabbar(route) && !canBack.value)) {
303
+ if (!isMpAlipay && (moreThanTwoPages() || (!uni.$lcb.getIsTabbar(route) && !canBack.value))) {
291
304
  list.push({
292
305
  icon: 'shouye_home1',
293
306
  action: 'home',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.7.46",
3
+ "version": "0.7.48",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -53,16 +53,18 @@ export interface LcbImgNavProps extends LcbBlockProps {
53
53
  urlKey?: string
54
54
  titleKey?: string
55
55
  titleBottom?: number
56
- itemBgColor?: string
57
- itemRadius?: number
58
56
  itemVerticalPadding?: number
59
57
  itemHorizontalPadding?: number
60
58
  itemGap?: number
61
59
  itemFlexMode?: 'row' | 'column'
62
- /** 阴影颜色 */
63
- itemShadowColor?: string
64
- /** 阴影大小 */
65
- itemShadowSize?: number
66
- /** 模糊大小 */
67
- itemBlurSize?: number
60
+ rowItemProps?: {
61
+ /** 阴影颜色 */
62
+ shadowColor?: string
63
+ /** 阴影大小 */
64
+ shadowSize?: number
65
+ /** 模糊大小 */
66
+ blurSize?: number
67
+ backgroundColor?: string
68
+ borderRadius?: number
69
+ }
68
70
  }
@@ -39,12 +39,12 @@ declare const _default: import('vue').DefineComponent<
39
39
  >,
40
40
  {
41
41
  gap: number
42
- itemRadius: number
43
42
  itemVerticalPadding: number
44
43
  itemHorizontalPadding: number
45
44
  itemFontSize: number
46
45
  tagsMode: 'scroll' | 'tiled'
47
46
  itemBackgroundColor: string
47
+ itemRadius: number
48
48
  },
49
49
  {}
50
50
  >