@tplc/business 0.4.71 → 0.4.73

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,27 @@
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.73](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.72...v0.4.73) (2025-04-17)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.1.82 ([2e0e855](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2e0e8552da56973441187066b53c7fa50b3f80be))
11
+
12
+
13
+ ### ✨ Features | 新功能
14
+
15
+ * 新增tabs字体粗细 ([314c20b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/314c20b7f512b7a7285b3543494e69e24b23d5b1))
16
+ * 调整form底部层级 ([0f0dffb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0f0dffb074033d4c270c7222c5ec4d76e172c374))
17
+ * 调整测试 ([987ae45](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/987ae45c379759df9b48f925e29f1f3be06a5de1))
18
+
19
+ ### [0.4.72](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.71...v0.4.72) (2025-04-13)
20
+
21
+
22
+ ### ✨ Features | 新功能
23
+
24
+ * 调整缓存策略 ([45900e3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/45900e3c2619ed2c5dadcfa49da3a98aa73d79f6))
25
+
5
26
  ### [0.4.71](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.70...v0.4.71) (2025-04-12)
6
27
 
7
28
  ### [0.4.70](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.81...v0.4.70) (2025-04-12)
@@ -327,7 +327,7 @@ watch(
327
327
  left: 0;
328
328
  right: 0;
329
329
  background-color: #fff;
330
- z-index: 1;
330
+ z-index: 5;
331
331
  box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
332
332
  }
333
333
  </style>
@@ -123,12 +123,21 @@ import useLocation from '../../hooks/useLocation'
123
123
  import { useTranslate } from '@tplc/wot'
124
124
  import { ChildHotAddress } from '../lcb-city-select/api'
125
125
  import { stringify } from 'qs'
126
- import { getHistoryCity } from '../../utils/history'
126
+ import { getHistoryCity, setHistoryCity } from '../../utils/history'
127
127
  import { FORM_KEY } from '../../constants'
128
128
  const dayRange = ref([dayjs().valueOf(), dayjs().add(1, 'day').valueOf()])
129
129
  const { translate } = useTranslate()
130
- const { getLocation, userLocation, locationIng } = useLocation()
130
+
131
131
  const addressCity = ref<ChildHotAddress | undefined>(getHistoryCity())
132
+ const { getLocation, userLocation, locationIng } = useLocation((location) => {
133
+ addressCity.value = {
134
+ addressName: location.showName || location.cityName,
135
+ areaId: location.areaId,
136
+ cityId: location.cityId,
137
+ provinceId: location.provinceId,
138
+ }
139
+ setHistoryCity(addressCity.value)
140
+ })
132
141
  getLocation()
133
142
  const nightCount = computed(() => {
134
143
  return dayjs(dayRange.value[1]).diff(dayRange.value[0], 'day')
@@ -92,6 +92,13 @@ const value = computed(() => {
92
92
 
93
93
  return itemProps?.[props?.prop]
94
94
  })
95
+
96
+ const coverImgWidth = computed(() => {
97
+ if (style.value.width) {
98
+ return style.value.width.replace('rpx', '')
99
+ }
100
+ return '100%'
101
+ })
95
102
  </script>
96
103
 
97
104
  <template>
@@ -103,7 +110,14 @@ const value = computed(() => {
103
110
  <!-- 图片 -->
104
111
  <block :value="value" v-if="prop === 'coverImg'">
105
112
  <view :class="`relative ${className}`" :style="style">
106
- <wd-img :src="value" mode="aspectFill" width="100%" height="100%" v-if="!$slots.coverImg" />
113
+ <wd-img
114
+ :src="value"
115
+ mode="aspectFill"
116
+ :width="coverImgWidth"
117
+ height="100%"
118
+ lazyLoad
119
+ v-if="!$slots.coverImg"
120
+ />
107
121
  <slot name="coverImg" :value="value" v-else />
108
122
  <!-- imgBottomIcon -->
109
123
  <view
@@ -3,7 +3,7 @@ import { ref } from 'vue'
3
3
  import { getUserLocation, UserLocation } from './useLocation.api'
4
4
  export const currentLocation = ref<UserLocation>()
5
5
  export const currentUserLatLon = ref<UniApp.GetLocationSuccess>()
6
- const useLocation = () => {
6
+ const useLocation = (onLocation?: (location: UserLocation) => void) => {
7
7
  const { translate } = useTranslate()
8
8
  // 正在获取经纬度
9
9
  const locationIng = ref(false)
@@ -63,6 +63,7 @@ const useLocation = () => {
63
63
  })
64
64
  .then((res) => {
65
65
  currentLocation.value = res.data
66
+ if (force) onLocation?.(res.data)
66
67
  })
67
68
  .finally(() => {
68
69
  locationIng.value = false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.71",
3
+ "version": "0.4.73",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "peerDependencies": {
13
13
  "vue": ">=3.2.47",
14
- "@tplc/wot": "0.1.81"
14
+ "@tplc/wot": "0.1.82"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",
@@ -1,7 +1,7 @@
1
1
  import { UserLocation } from './useLocation.api'
2
2
  export declare const currentLocation: import('vue').Ref<UserLocation | undefined>
3
3
  export declare const currentUserLatLon: import('vue').Ref<UniApp.GetLocationSuccess | undefined>
4
- declare const useLocation: () => {
4
+ declare const useLocation: (onLocation?: (location: UserLocation) => void) => {
5
5
  getLocation: (force?: boolean) => Promise<void>
6
6
  locationIng: import('vue').Ref<boolean>
7
7
  userLocation: import('vue').Ref<UserLocation | undefined>