@tplc/business 0.4.36 → 0.4.38

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,32 @@
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.4.38](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.37...v0.4.38) (2025-03-30)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 新增标签 ([7fc17bb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7fc17bb599fb1fd57c522b0c34ef6ae5d33ba6c6))
11
+
12
+ ### [0.4.37](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.36...v0.4.37) (2025-03-30)
13
+
14
+
15
+ ### ✨ Features | 新功能
16
+
17
+ * action 支持view ([1e4eb10](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1e4eb108272db236548b3450aee3648f37beec4c))
18
+ * h5 不需要这样 ([6498ea3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6498ea38727aff5d9e1f2db95f83a5ad133f9e34))
19
+ * lcb-search zindex ([07277f4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/07277f4b15c3f7f0ba62e312b907a69fd9362134))
20
+ * 不能返回 ([946f96c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/946f96c28d154888dcc3af3865ffe7ccfecb1844))
21
+ * 支持颜色切换 ([b6cc634](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b6cc63429d2d307afa5efbd6fae34a5cf482c79e))
22
+ * 样式调整 ([be16331](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/be163315ece2f853a4996ec784dca2ac21fc27a2))
23
+
24
+
25
+ ### 🐛 Bug Fixes | Bug 修复
26
+
27
+ * fab 兼容ios ([354fd16](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/354fd16004779f1ecd192f524c680b63143117e5))
28
+ * 兼容瀑布流 ([0e1d50e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0e1d50edf49bc853f6da3d2f1c3ea33871b2475a))
29
+ * 胖头鱼 ([4a1b827](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4a1b8278d6a1b67b477cfd9c7a3576e345bad395))
30
+
5
31
  ### [0.4.36](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.35...v0.4.36) (2025-03-30)
6
32
 
7
33
  ### [0.4.35](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.34...v0.4.35) (2025-03-29)
@@ -50,7 +50,7 @@ export type LcbActionViewProps = {
50
50
  }
51
51
  | {
52
52
  jumpType: 30
53
- phoneNumber: string
53
+ phoneNumber?: string
54
54
  }
55
55
  | {
56
56
  jumpType: 17
@@ -1,17 +1,18 @@
1
1
  <template>
2
2
  <lcb-block v-bind="$props">
3
3
  <view class="flex justify-between items-center text-28rpx">
4
- <view
4
+ <lcb-action-view
5
5
  v-for="item in items"
6
6
  :key="item.title"
7
- class="flex flex-col items-center justify-center"
7
+ custom-class="flex flex-col items-center justify-center"
8
+ v-bind="item.link"
8
9
  >
9
10
  <view class="flex mb-12rpx">
10
11
  <view class="text-24rpx mr-4rpx mt-12rpx">{{ item.unit }}</view>
11
12
  <view class="font-500 text-36rpx">{{ pageInfo[item.key] || '0.00' }}</view>
12
13
  </view>
13
14
  <view>{{ item.title }}</view>
14
- </view>
15
+ </lcb-action-view>
15
16
  </view>
16
17
  </lcb-block>
17
18
  </template>
@@ -1,7 +1,9 @@
1
+ import { LcbActionViewProps } from '../lcb-action-view/types'
1
2
  export interface LcbDynamicDataProps {
2
3
  items: {
3
4
  title: string
4
5
  unit?: string
5
6
  key: string
7
+ link?: LcbActionViewProps
6
8
  }[]
7
9
  }
@@ -56,6 +56,7 @@ const customStyle = computed(() => {
56
56
  padding: `0 ${transformValueUnit(padding)}`,
57
57
  backgroundSize: '100% 100%',
58
58
  backgroundRepeat: 'no-repeat',
59
+ marginBottom: `var(--safe-bottom)`,
59
60
  }
60
61
  })
61
62
  </script>
@@ -58,15 +58,12 @@
58
58
  :size="iconSize + 'rpx'"
59
59
  :color="iconColor"
60
60
  />
61
- <img
62
- v-else
63
- class="block object-contain"
64
- :style="{
65
- borderRadius: iconRadius + 'rpx',
66
- height: iconSize + 'rpx',
67
- width: iconSize + 'rpx',
68
- }"
61
+ <wd-img
62
+ :width="iconSize + 'rpx'"
63
+ :height="iconSize + 'rpx'"
64
+ :radius="iconRadius + 'rpx'"
69
65
  :src="item[urlKey]"
66
+ mode="aspectFit"
70
67
  />
71
68
  </view>
72
69
  <view
@@ -25,7 +25,6 @@
25
25
  >
26
26
  <!-- 左边布局 -->
27
27
  <view class="navbar-left z-1">
28
- <!-- 返回按钮 -->
29
28
  <view
30
29
  v-if="(styleGroup === 3 || moreThanTwoPages() || !canBack) && capsuleList.length"
31
30
  class="navbar-capsule flex justify-center items-center"
@@ -229,7 +228,7 @@ const capsuleList = computed(() => {
229
228
  })
230
229
  }
231
230
  /** 如果超过俩个的层级的话并且支持返回 */
232
- if (moreThanTwoPages()) {
231
+ if (moreThanTwoPages() || (!uni.$lcb.getIsTabbar() && !canBack.value)) {
233
232
  list.push({
234
233
  icon: 'shouye_home1',
235
234
  action: 'home',
@@ -381,6 +381,7 @@ defineExpose({
381
381
  }
382
382
  :deep(.u-column) {
383
383
  overflow: initial;
384
+ width: 0;
384
385
  }
385
386
  }
386
387
  </style>
@@ -103,7 +103,7 @@
103
103
  </view>
104
104
  <view id="searchPagingTop"></view>
105
105
  <view
106
- class="fixed left-0 w-full z-1 bg-white"
106
+ class="fixed left-0 w-full z-2 bg-white"
107
107
  :style="{ height: height, top: top }"
108
108
  v-if="form?.keywords && productTypeList && top"
109
109
  >
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <view class="w-100vw">
3
+ <lcb-block v-bind="$props">
4
+ <view
5
+ :class="{
6
+ 'flex flex-wrap': tagsMode === 'tiled',
7
+ 'flex whitespace-nowrap overflow-x-auto': tagsMode === 'scroll',
8
+ }"
9
+ :style="{
10
+ gap: transformValueUnit(gap),
11
+ }"
12
+ >
13
+ <lcb-action-view
14
+ v-for="(item, index) in items"
15
+ :key="index"
16
+ :custom-class="{
17
+ 'lcb-tag': true,
18
+ 'inline-block': tagsMode === 'scroll',
19
+ }"
20
+ :custom-style="{
21
+ fontSize: transformValueUnit(itemFontSize),
22
+ backgroundColor: itemBackgroundColor,
23
+ borderRadius: transformValueUnit(itemRadius),
24
+ boxSizing: 'border-box',
25
+ padding: `${transformValueUnit(itemVerticalPadding)} ${transformValueUnit(itemHorizontalPadding)}`,
26
+ display: tagsMode === 'scroll' ? 'inline-block' : 'block',
27
+ borderWidth: transformValueUnit(itemBorderWidth),
28
+ borderColor: itemBorderColor,
29
+ borderStyle: 'solid',
30
+ }"
31
+ v-bind="item.link"
32
+ >
33
+ {{ item.title }}
34
+ </lcb-action-view>
35
+ </view>
36
+ </lcb-block>
37
+ </view>
38
+ </template>
39
+
40
+ <script setup lang="ts">
41
+ import { transformValueUnit } from '../../utils/transform'
42
+ import { LcbTagsProps } from './types'
43
+
44
+ defineOptions({
45
+ name: 'LcbTags',
46
+ options: {
47
+ addGlobalClass: true,
48
+ virtualHost: true,
49
+ styleIsolation: 'shared',
50
+ },
51
+ })
52
+ withDefaults(defineProps<LcbTagsProps>(), {
53
+ itemBackgroundColor: '#eeeeee',
54
+ itemRadius: 100,
55
+ itemFontSize: 28,
56
+ tagsMode: 'tiled',
57
+ gap: 16,
58
+ itemVerticalPadding: 8,
59
+ itemHorizontalPadding: 32,
60
+ })
61
+ </script>
@@ -0,0 +1,17 @@
1
+ import { LcbActionViewProps } from '../lcb-action-view/types'
2
+ import { LcbBlockProps } from '../lcb-block/types'
3
+ export interface LcbTagsProps extends LcbBlockProps {
4
+ tagsMode?: 'scroll' | 'tiled'
5
+ gap?: number
6
+ items: {
7
+ title: string
8
+ link?: LcbActionViewProps
9
+ }[]
10
+ itemFontSize?: number
11
+ itemBackgroundColor?: string
12
+ itemRadius?: number
13
+ itemBorderColor?: string
14
+ itemBorderWidth?: number
15
+ itemVerticalPadding?: number
16
+ itemHorizontalPadding?: number
17
+ }
package/global.d.ts CHANGED
@@ -37,6 +37,7 @@ declare module 'vue' {
37
37
  'lcb-search': (typeof import('@tplc/business/components/lcb-search/lcb-search.vue'))['default']
38
38
  'lcb-swiper': (typeof import('@tplc/business/components/lcb-swiper/lcb-swiper.vue'))['default']
39
39
  'lcb-tabs': (typeof import('@tplc/business/components/lcb-tabs/lcb-tabs.vue'))['default']
40
+ 'lcb-tags': (typeof import('@tplc/business/components/lcb-tags/lcb-tags.vue'))['default']
40
41
  'lcb-text': (typeof import('@tplc/business/components/lcb-text/lcb-text.vue'))['default']
41
42
  'lcb-title': (typeof import('@tplc/business/components/lcb-title/lcb-title.vue'))['default']
42
43
  'lcb-user-order': (typeof import('@tplc/business/components/lcb-user-order/lcb-user-order.vue'))['default']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.36",
3
+ "version": "0.4.38",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -47,7 +47,7 @@ export type LcbActionViewProps = {
47
47
  }
48
48
  | {
49
49
  jumpType: 30
50
- phoneNumber: string
50
+ phoneNumber?: string
51
51
  }
52
52
  | {
53
53
  jumpType: 17
@@ -1,7 +1,9 @@
1
+ import { LcbActionViewProps } from '../lcb-action-view/types'
1
2
  export interface LcbDynamicDataProps {
2
3
  items: {
3
4
  title: string
4
5
  unit?: string
5
6
  key: string
7
+ link?: LcbActionViewProps
6
8
  }[]
7
9
  }
@@ -163,7 +163,7 @@ declare const _default: import('vue').DefineComponent<
163
163
  renderMode?: 'view' | 'button'
164
164
  } & {
165
165
  jumpType: 30
166
- phoneNumber: string
166
+ phoneNumber?: string
167
167
  } & import('../lcb-block/types').LcbBlockProps
168
168
  >,
169
169
  {
@@ -0,0 +1,74 @@
1
+ import { LcbTagsProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbTagsProps>,
5
+ {
6
+ itemBackgroundColor: string
7
+ itemRadius: number
8
+ itemFontSize: number
9
+ tagsMode: string
10
+ gap: number
11
+ itemVerticalPadding: number
12
+ itemHorizontalPadding: number
13
+ }
14
+ >,
15
+ {},
16
+ unknown,
17
+ {},
18
+ {},
19
+ import('vue').ComponentOptionsMixin,
20
+ import('vue').ComponentOptionsMixin,
21
+ {},
22
+ string,
23
+ import('vue').PublicProps,
24
+ Readonly<
25
+ import('vue').ExtractPropTypes<
26
+ __VLS_WithDefaults<
27
+ __VLS_TypePropsToOption<LcbTagsProps>,
28
+ {
29
+ itemBackgroundColor: string
30
+ itemRadius: number
31
+ itemFontSize: number
32
+ tagsMode: string
33
+ gap: number
34
+ itemVerticalPadding: number
35
+ itemHorizontalPadding: number
36
+ }
37
+ >
38
+ >
39
+ >,
40
+ {
41
+ gap: number
42
+ itemRadius: number
43
+ itemVerticalPadding: number
44
+ itemHorizontalPadding: number
45
+ itemFontSize: number
46
+ tagsMode: 'scroll' | 'tiled'
47
+ itemBackgroundColor: string
48
+ },
49
+ {}
50
+ >
51
+ export default _default
52
+ type __VLS_WithDefaults<P, D> = {
53
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
54
+ ? __VLS_Prettify<
55
+ P[K] & {
56
+ default: D[K]
57
+ }
58
+ >
59
+ : P[K]
60
+ }
61
+ type __VLS_Prettify<T> = {
62
+ [K in keyof T]: T[K]
63
+ } & {}
64
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
65
+ type __VLS_TypePropsToOption<T> = {
66
+ [K in keyof T]-?: {} extends Pick<T, K>
67
+ ? {
68
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
69
+ }
70
+ : {
71
+ type: import('vue').PropType<T[K]>
72
+ required: true
73
+ }
74
+ }
@@ -0,0 +1,17 @@
1
+ import { LcbActionViewProps } from '../lcb-action-view/types'
2
+ import { LcbBlockProps } from '../lcb-block/types'
3
+ export interface LcbTagsProps extends LcbBlockProps {
4
+ tagsMode?: 'scroll' | 'tiled'
5
+ gap?: number
6
+ items: {
7
+ title: string
8
+ link?: LcbActionViewProps
9
+ }[]
10
+ itemFontSize?: number
11
+ itemBackgroundColor?: string
12
+ itemRadius?: number
13
+ itemBorderColor?: string
14
+ itemBorderWidth?: number
15
+ itemVerticalPadding?: number
16
+ itemHorizontalPadding?: number
17
+ }