@tplc/business 0.2.69 → 0.2.71

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,53 @@
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.71](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.70...v0.2.71) (2025-01-06)
6
+
7
+ ### [0.2.70](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.56...v0.2.70) (2025-01-06)
8
+
9
+
10
+ ### 🐛 Bug Fixes | Bug 修复
11
+
12
+ * headerinfo 卡顿 ([dd7049e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dd7049ea008d0e6863de93979d331b078e4a14fe))
13
+ * 修复双列点击没有 ([33a0161](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/33a01615f99fed3ccbc2a41b90663edecbe1661b))
14
+ * 金额没对齐问题调整 ([3870681](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/38706811038fa18709a5916d1e30c3e25c8ce321))
15
+
16
+
17
+ ### 🚀 Chore | 构建/工程依赖/工具
18
+
19
+ * **release:** 0.1.51 ([da7388c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/da7388c14ac043049b282b05b90a448cab8d57c5))
20
+ * **release:** 0.1.52 ([be3c579](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/be3c57907e7ef4d5849c2a1e90217ef1e90e06e3))
21
+ * **release:** 0.2.57 ([f05c0bd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f05c0bd11d05d0ddad48f3752eedeebad08b1cc1))
22
+ * **release:** 0.2.58 ([1840c54](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1840c5432bf3d3abbbe66c1dac86e9f90b2582b2))
23
+ * **release:** 0.2.59 ([1b19cc8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1b19cc8fd4e36d41c61e68f3ff8583a9436a5a99))
24
+ * **release:** 0.2.60 ([e0df949](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e0df94949ecba4c3219cb20904497e740ad49538))
25
+ * **release:** 0.2.61 ([57807da](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/57807da1235243d1f7da4b2cf9e0a43a463b8942))
26
+ * **release:** 0.2.62 ([d21caa6](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d21caa604b62f2f0a7c0e3cfb8f9e2cb74f64670))
27
+ * **release:** 0.2.63 ([3dfe42a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3dfe42a6926c2288b73dc12e828f0f6cc64fa314))
28
+ * **release:** 0.2.64 ([da70e24](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/da70e2444072ce9bd6ad16be86f3449f047f9ef5))
29
+ * **release:** 0.2.65 ([ec37cb3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ec37cb398a968caa72c5a3da0980cf6ac54a363d))
30
+ * **release:** 0.2.66 ([571d2b1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/571d2b1a6b9a946c52b35141039d40c8b961e7f0))
31
+ * **release:** 0.2.67 ([c5ccf81](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c5ccf81c1ba8904d8e5a22929f6b56eb275d37a9))
32
+ * **release:** 0.2.68 ([be890b1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/be890b138cd663afa9c241e8f5c89365c4d3d22b))
33
+ * **release:** 0.2.69 ([cc00e5d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/cc00e5db93ab5e11dce050f4966f5175e8b3ebad))
34
+
35
+
36
+ ### ✨ Features | 新功能
37
+
38
+ * product 属性新增 ([7f27bc5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7f27bc5e8fd88f25a8af1b54f4834ddc5c41e20f))
39
+ * product组件切换为接口 ([520f1ca](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/520f1cad1ce517ee9de12845a513678396039e43))
40
+ * slider 改造 ([d472ee7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d472ee7a24b8539ec93defd27ab94cef14938d1f))
41
+ * 兼容地图 ([b189928](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b18992884c5e1a6dce947c5f7dbbb6750f5dfb5f))
42
+ * 城市回显 ([2ae514e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2ae514e8ba68fdceacf4ef3f2db66fe733ed97fc))
43
+ * 城市选择回显 ([eacf6d9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/eacf6d9cdfe56d7ac7c90c1cf3096de14c861ad5))
44
+ * 支持业务组件地址切换 ([83912ed](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/83912ede332299ad4b46d0018336883eaf0788a1))
45
+ * 新增切换模式 ([a8849df](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a8849df2d7ee55127f0b40c2c47f9e5c75cccab0))
46
+ * 新增配置 ([3f75c1f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3f75c1f75f1f86d1f5049700bef7af0b1d1185cd))
47
+ * 治理部分属性失效 ([d743827](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d743827467d0d1e666241327dbfbc5982b955ddf))
48
+ * 调整rate 数据类型 ([9809c85](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9809c8517514103ed8266ad68894701dc25c4252))
49
+ * 调整地图搜索 ([d8fe5fd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d8fe5fd3bd08e68cf39f76ca19e2419c6d747608))
50
+ * 调整布局 ([a4f75f4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a4f75f4bed928fb9d04b90184f9a4feb67a5457f))
51
+
5
52
  ### [0.2.69](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.68...v0.2.69) (2025-01-05)
6
53
 
7
54
 
@@ -25,6 +25,15 @@
25
25
  ...list[current],
26
26
  ...attrs,
27
27
  }"
28
+ :layoutType="layoutType"
29
+ :coverImgStyle="{
30
+ width: layoutType === 'vertical' ? '100%' : transformValueUnit(imageWidth),
31
+ height: layoutType === 'vertical' ? transformValueUnit(imageHeight) : undefined,
32
+ minHeight: layoutType !== 'vertical' ? transformValueUnit(imageHeight) : undefined,
33
+ borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
34
+ ...(attrs?.coverImgStyle ?? {}),
35
+ }"
36
+ :titleLineClamp="titleLineClamp"
28
37
  />
29
38
  </lcb-action-view>
30
39
  <wd-icon
@@ -51,10 +60,12 @@
51
60
  <script lang="ts" setup>
52
61
  import { FORM_KEY } from '@tplc/business/constants'
53
62
  import { reactive, inject, ref, useAttrs, watch } from 'vue'
54
- import { LcbListInfo } from '../lcb-list/api'
55
63
  import { getPageOptions } from '../../utils/utils'
64
+ import { transformValueUnit } from '../../utils/transform'
56
65
  import { MapItem, MapMarker } from './types'
57
66
  import useAutoHeight from '../../hooks/useAutoHeight'
67
+ import { LcbListProps } from '@tplc/business/components/lcb-list/types'
68
+ import { LcbListInfo } from '@tplc/business/components/lcb-list/api'
58
69
  const height = useAutoHeight()
59
70
  defineOptions({
60
71
  name: 'LcbMap',
@@ -65,7 +76,7 @@ defineOptions({
65
76
  },
66
77
  })
67
78
  const attrs = useAttrs()
68
- const props = defineProps<LcbListInfo>()
79
+ const props = defineProps<LcbListProps & LcbListInfo>()
69
80
  const scaleRadius: Record<string, number> = {
70
81
  3: 1_000_000,
71
82
  4: 500_000,
@@ -1,8 +1,10 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, useAttrs, watch, computed } from 'vue'
3
3
  import UWaterfall from 'uview-plus/components/u-waterfall/u-waterfall.vue'
4
+ import ULazyLoad from 'uview-plus/components/u-lazy-load/u-lazy-load.vue'
4
5
  import { LcbProductProps } from './types'
5
6
  import { transformValueUnit } from '../../utils/transform'
7
+ import { getPreviewImageUrl } from '../../utils/utils'
6
8
 
7
9
  const uWaterfallRef = ref()
8
10
  defineOptions({
@@ -43,6 +45,7 @@ const getData = async () => {
43
45
  list.value = []
44
46
  }
45
47
  }
48
+
46
49
  watch(() => props.items, getData, { immediate: true, deep: true })
47
50
  const renderList = computed(() => {
48
51
  return props.filterList ? props.items : list.value
@@ -137,14 +140,23 @@ const renderList = computed(() => {
137
140
  ...item,
138
141
  }"
139
142
  />
143
+
140
144
  <lcb-product-item
141
- v-else
142
145
  v-bind="{ ...item, ...$props, ...attrs }"
143
146
  layoutType="vertical"
144
147
  tag-overflow-wrap
148
+ v-else
145
149
  >
146
150
  <template #coverImg="{ value }">
147
- <image :src="value" class="w-full" mode="widthFix" />
151
+ <u-lazy-load
152
+ threshold="-450"
153
+ :border-radius="imageRadius"
154
+ :image="value"
155
+ :is-effect="false"
156
+ :loading-img="getPreviewImageUrl(value)"
157
+ :index="index"
158
+ />
159
+ <!-- <wd-img :src="value" width="100%" lazyPlaceWidth="250" height="auto" mode="widthFix" /> -->
148
160
  </template>
149
161
  </lcb-product-item>
150
162
  </slot>
@@ -176,7 +188,14 @@ const renderList = computed(() => {
176
188
  tag-overflow-wrap
177
189
  >
178
190
  <template #coverImg="{ value }">
179
- <image :src="value" class="w-full" mode="widthFix" />
191
+ <u-lazy-load
192
+ threshold="-450"
193
+ :border-radius="imageRadius"
194
+ :image="value"
195
+ :index="index"
196
+ :is-effect="false"
197
+ :loading-img="getPreviewImageUrl(value)"
198
+ />
180
199
  </template>
181
200
  </lcb-product-item>
182
201
  </slot>
@@ -96,9 +96,10 @@ const value = computed(() => {
96
96
  "
97
97
  >
98
98
  <!-- 图片 -->
99
- <slot :value="value" v-if="prop === 'coverImg'" name="coverImg">
99
+ <block :value="value" v-if="prop === 'coverImg'">
100
100
  <view :class="`relative ${className}`" :style="style">
101
- <wd-img :src="value" mode="aspectFill" width="100%" height="100%" />
101
+ <wd-img :src="value" mode="aspectFill" width="100%" height="100%" v-if="!$slots.coverImg" />
102
+ <slot name="coverImg" :value="value" v-else />
102
103
  <!-- imgBottomIcon -->
103
104
  <view class="absolute bottom-0 left-0 w-full" v-if="itemProps.imgBottomIcon">
104
105
  <wd-img
@@ -121,7 +122,7 @@ const value = computed(() => {
121
122
  </view>
122
123
  <slot></slot>
123
124
  </view>
124
- </slot>
125
+ </block>
125
126
 
126
127
  <!-- 标题 -->
127
128
  <slot :value="value" v-if="prop === 'productName'" name="productName">
@@ -86,8 +86,6 @@ defineSlots<{
86
86
  coverImgSection(): any
87
87
  contentSection(): any
88
88
  }>()
89
-
90
- // console.log('attrs', attrs)
91
89
  </script>
92
90
 
93
91
  <template>
@@ -250,7 +248,7 @@ defineSlots<{
250
248
  <ItemValue
251
249
  v-if="!!$slots?.['coverImg']"
252
250
  prop="coverImg"
253
- customClass="overflow-hidden relative"
251
+ customClass="overflow-hidden relative bg-gray-100 "
254
252
  >
255
253
  <template #default>
256
254
  <slot name="coverImgSection" />
@@ -259,7 +257,7 @@ defineSlots<{
259
257
  <slot name="coverImg" :value="value" />
260
258
  </template>
261
259
  </ItemValue>
262
- <ItemValue v-else prop="coverImg" customClass="overflow-hidden relative">
260
+ <ItemValue v-else prop="coverImg" customClass=" bg-gray-100 overflow-hidden relative">
263
261
  <template #default>
264
262
  <slot name="coverImgSection" />
265
263
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.69",
3
+ "version": "0.2.71",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -1,6 +1,7 @@
1
- import { LcbListInfo } from '../lcb-list/api'
1
+ import { LcbListProps } from '@tplc/business/components/lcb-list/types'
2
+ import { LcbListInfo } from '@tplc/business/components/lcb-list/api'
2
3
  declare const _default: import('vue').DefineComponent<
3
- __VLS_TypePropsToOption<LcbListInfo>,
4
+ __VLS_TypePropsToOption<LcbListProps & LcbListInfo>,
4
5
  {},
5
6
  unknown,
6
7
  {},
@@ -10,7 +11,7 @@ declare const _default: import('vue').DefineComponent<
10
11
  {},
11
12
  string,
12
13
  import('vue').PublicProps,
13
- Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<LcbListInfo>>>,
14
+ Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<LcbListProps & LcbListInfo>>>,
14
15
  {},
15
16
  {}
16
17
  >
@@ -5,3 +5,4 @@ export declare const getPageOptions: () => Record<string, any>
5
5
  /** 合并url参数 url = /pages/data/index?id=1&name=2 urlParams = id=1&name=2&type=1 */
6
6
  export declare const getFinalUrl: (url: string, urlParams?: string) => string
7
7
  export declare const onPageScrollSelector: (selector: string) => void
8
+ export declare const getPreviewImageUrl: (url: string, width?: number) => string
package/utils/utils.ts CHANGED
@@ -42,3 +42,11 @@ export const onPageScrollSelector = (selector: string) => {
42
42
  selector: `${prefix}${selector}`,
43
43
  })
44
44
  }
45
+
46
+ export const getPreviewImageUrl = (url: string, width = 200) => {
47
+ const isctyun = url?.indexOf('.ctyun') >= 0
48
+ const sym = url?.indexOf('?') > 0 ? '&' : '?'
49
+ return isctyun
50
+ ? `${sym}x-amz-process=image/resize,w_${width},m_lfit`
51
+ : `${sym}x-oss-process=image/resize,m_mfit,w_${width}&imageView2/2/w/${width}`
52
+ }