@tplc/business 0.5.6 → 0.5.7

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,8 @@
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.5.7](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.6...v0.5.7) (2025-10-10)
6
+
5
7
  ### [0.5.6](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.5...v0.5.6) (2025-10-10)
6
8
 
7
9
  ### [0.5.5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.4...v0.5.5) (2025-10-10)
@@ -20,8 +20,8 @@
20
20
  <script setup lang="ts">
21
21
  import { ref, watch } from 'vue'
22
22
  import { AddressCommunityProps } from '../types'
23
- import useLocation, { useCurrentAddressId } from '../../../hooks/useLocation'
24
-
23
+ import useLocation from '../../../hooks/useLocation'
24
+ import { AddressCommunity } from '../../../utils/addressCommunity'
25
25
  defineOptions({
26
26
  name: 'AddressCommunity',
27
27
  options: {
@@ -42,7 +42,7 @@ const options = ref<{ addressName: string; addressId: string }[]>([])
42
42
 
43
43
  const handleChange = (e: any) => {
44
44
  title.value = e.selectedItem.label
45
- useCurrentAddressId().value = e.selectedItem.addressId
45
+ AddressCommunity.setAddressId(e.selectedItem.addressId)
46
46
  }
47
47
  watch(
48
48
  () => userLocation.value,
@@ -54,7 +54,7 @@ watch(
54
54
  const firstItem = data[0]
55
55
  title.value = firstItem.label
56
56
  value.value = firstItem.addressId
57
- useCurrentAddressId().value = firstItem.addressId
57
+ AddressCommunity.setAddressId(firstItem.addressId)
58
58
  }
59
59
  }
60
60
  },
@@ -2,9 +2,7 @@ import { useTranslate } from '@tplc/wot'
2
2
  import { ref } from 'vue'
3
3
  import { getUserLocation, UserLocation } from './useLocation.api'
4
4
  export const currentLocation = ref<UserLocation>()
5
- const currentAddressId = ref<string>('')
6
5
  export const currentUserLatLon = ref<UniApp.GetLocationSuccess>()
7
- export const useCurrentAddressId = () => currentAddressId
8
6
  const useLocation = (onLocation?: (location: UserLocation) => void) => {
9
7
  const { translate } = useTranslate()
10
8
  // 正在获取经纬度
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -1,7 +1,6 @@
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
- export declare const useCurrentAddressId: () => import('vue').Ref<string>
5
4
  declare const useLocation: (onLocation?: (location: UserLocation) => void) => {
6
5
  getLocation: (force?: boolean, forceSetting?: boolean) => Promise<void>
7
6
  locationIng: import('vue').Ref<boolean>
@@ -0,0 +1,6 @@
1
+ export declare const AddressCommunity: {
2
+ setAddressId(newLang: string): void
3
+ getAddressId(): string
4
+ }
5
+ export declare const useCurrentAddressCommunity: () => import('vue').Ref<string>
6
+ export default AddressCommunity
@@ -0,0 +1,26 @@
1
+ /*
2
+ * @Author: weisheng
3
+ * @Date: 2024-01-25 23:06:48
4
+ * @LastEditTime: 2024-03-30 11:30:55
5
+ * @LastEditors: weisheng
6
+ * @Description:
7
+ * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/locale/index.ts
8
+ * 记得注释
9
+ */
10
+ import { ref } from 'vue'
11
+
12
+ const addressCommunity = ref<string>('')
13
+
14
+ export const AddressCommunity = {
15
+ setAddressId(newLang: string) {
16
+ addressCommunity.value = newLang
17
+ },
18
+
19
+ getAddressId() {
20
+ return addressCommunity.value
21
+ },
22
+ }
23
+
24
+ export const useCurrentAddressCommunity = () => addressCommunity
25
+
26
+ export default AddressCommunity