@tplc/business 0.4.54 → 0.4.55

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,21 @@
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.55](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.53...v0.4.55) (2025-04-04)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.4.54 ([acae241](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/acae24129c9295be4eecc6bb5d7a3ad3f2ef87fc))
11
+
12
+
13
+ ### ✨ Features | 新功能
14
+
15
+ * 按钮 ([b8a3b1e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b8a3b1ebd3dc695d939b8cd0af4da1df0dbf171a))
16
+ * 新增版本 ([408362b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/408362bc52c73180339cc30c050bbc572ef019d3))
17
+ * 星星默认颜色 ([f4582a4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f4582a42f29630bc7ef6e350261f4f4a913e3263))
18
+ * 部署按钮 ([1b783b3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1b783b3180b81f0f75ff46a5b41110d17d23baaa))
19
+
5
20
  ### [0.4.54](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.52...v0.4.54) (2025-04-03)
6
21
 
7
22
 
@@ -38,6 +38,7 @@
38
38
  @submit="onSearch"
39
39
  v-if="mode === 'search'"
40
40
  />
41
+
41
42
  <lcb-action-view
42
43
  v-else
43
44
  v-bind="inputLink"
@@ -67,8 +68,6 @@ import { LcbAddress } from '../lcb-city-select/api'
67
68
  import { FORM_KEY } from '../../constants'
68
69
  import { getHistoryCity } from '../../utils/history'
69
70
  import { stringify } from 'qs'
70
- import { cleanOutSizeKeys } from '../../utils/transform'
71
- import { getCurrentPage } from '../../utils/utils'
72
71
  defineOptions({
73
72
  name: 'LcbCalendarSearch',
74
73
  options: {
@@ -103,6 +102,7 @@ const urlParams = computed(() => {
103
102
  provinceId: form.value.provinceId,
104
103
  cityId: form.value.cityId,
105
104
  areaId: form.value.areaId,
105
+ addressName: form.value.addressName,
106
106
  })
107
107
  })
108
108
  const { translate } = useTranslate()
@@ -26,10 +26,7 @@
26
26
  <view
27
27
  class="flex justify-center items-center address-tag"
28
28
  :class="{
29
- 'current-address':
30
- modelValue &&
31
- `${modelValue.addressName},${modelValue.keywords}` ===
32
- `${city.addressName},${city.keywords}`,
29
+ 'current-address': modelValue?.addressName === city.addressName,
33
30
  [city.className || '']: true,
34
31
  }"
35
32
  v-for="city in item.childAddress"
@@ -37,6 +34,7 @@
37
34
  :style="{
38
35
  fontSize: city?.addressName?.length > 4 ? '20rpx' : '24rpx',
39
36
  }"
37
+ :key="city.areaId || city.cityId"
40
38
  >
41
39
  <view class="tag-view">
42
40
  <wd-icon v-if="city.icon" :name="city.icon" class="mr-0.5" />
@@ -132,15 +132,12 @@ watch(
132
132
  provinceId: val?.provinceId,
133
133
  addressName: val?.addressName,
134
134
  }
135
- // if (val.keywords) {
136
- // params.keywords = val.keywords
137
- // }
138
- const datas = cleanOutSizeKeys(form.value, Object.keys(getCurrentPage().options))
135
+
139
136
  form.value = {
140
- ...datas,
137
+ ...cleanOutSizeKeys(form.value, Object.keys(getCurrentPage().options)),
141
138
  ...params,
142
139
  }
143
- setHistoryCity(modelValue.value)
140
+ setHistoryCity(params as ChildHotAddress)
144
141
  show.value = false
145
142
  },
146
143
  )
@@ -79,8 +79,17 @@ const saveHistory = (keyword: ProductInfo) => {
79
79
  if (list.length > props.maxLength) {
80
80
  list.pop()
81
81
  }
82
+ const cacheKey = ['productName', 'productType', 'link']
82
83
  // 保存到本地存储
83
- uni.setStorageSync(props.storageKey, list)
84
+ uni.setStorageSync(
85
+ props.storageKey,
86
+ list.map((v) => {
87
+ return cacheKey.reduce((acc, key) => {
88
+ acc[key] = v[key]
89
+ return acc
90
+ }, {})
91
+ }),
92
+ )
84
93
  historyList.value = list
85
94
  } catch (error) {
86
95
  console.error('保存搜索历史失败:', error)
@@ -198,7 +198,7 @@ const onSearch = async () => {
198
198
  }
199
199
  }
200
200
  const onSelect = (keyword: ProductInfo) => {
201
- if (keyword.productInfoId) {
201
+ if (keyword.link) {
202
202
  searchHistoryRef.value?.saveHistory(keyword)
203
203
  }
204
204
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.54",
3
+ "version": "0.4.55",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],