@tplc/business 0.5.4 → 0.5.5

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.5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.4...v0.5.5) (2025-10-10)
6
+
5
7
  ### [0.5.4](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.3...v0.5.4) (2025-10-10)
6
8
 
7
9
  ### [0.5.3](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.1...v0.5.3) (2025-10-10)
@@ -20,7 +20,7 @@
20
20
  <script setup lang="ts">
21
21
  import { ref, watch } from 'vue'
22
22
  import { AddressCommunityProps } from '../types'
23
- import useLocation, { currentAddressId } from '../../../hooks/useLocation'
23
+ import useLocation from '../../../hooks/useLocation'
24
24
 
25
25
  defineOptions({
26
26
  name: 'AddressCommunity',
@@ -35,14 +35,14 @@ withDefaults(defineProps<AddressCommunityProps>(), {
35
35
  color: '#000',
36
36
  width: 240,
37
37
  })
38
- const { userLocation } = useLocation()
38
+ const { userLocation, userAddressId } = useLocation()
39
39
  const value = defineModel<string>('')
40
40
  const title = ref<string>('地址社区')
41
41
  const options = ref<{ addressName: string; addressId: string }[]>([])
42
42
 
43
43
  const handleChange = (e: any) => {
44
44
  title.value = e.selectedItem.label
45
- currentAddressId.value = e.selectedItem.addressId
45
+ userAddressId.value = e.selectedItem.addressId
46
46
  uni.$emit('lcb-city-select-change', e.selectedItem)
47
47
  }
48
48
  watch(
@@ -55,7 +55,7 @@ watch(
55
55
  const firstItem = data[0]
56
56
  title.value = firstItem.label
57
57
  value.value = firstItem.addressId
58
- currentAddressId.value = firstItem.addressId
58
+ userAddressId.value = firstItem.addressId
59
59
  uni.$emit('lcb-city-select-change', firstItem)
60
60
  }
61
61
  }
@@ -64,6 +64,13 @@ watch(
64
64
  immediate: true,
65
65
  },
66
66
  )
67
+
68
+ watch(
69
+ () => userAddressId.value,
70
+ (val) => {
71
+ console.log('userAddressId', val)
72
+ },
73
+ )
67
74
  </script>
68
75
 
69
76
  <style lang="scss" scoped>
@@ -197,7 +197,7 @@ const props = withDefaults(defineProps<NavProps>(), {
197
197
  fontWeight: 500,
198
198
  textColor: '#000000',
199
199
  keyFromUser: false,
200
- showAddressCommunity: true,
200
+ showAddressCommunity: false,
201
201
  })
202
202
  const navbarBgColor = computed(() => {
203
203
  return props.backgroundType === 'color' ? props.backColor : ''
@@ -96,7 +96,13 @@ const useLocation = (onLocation?: (location: UserLocation) => void) => {
96
96
  navigateToSettings(forceSetting)
97
97
  }
98
98
  }
99
- return { getLocation, locationIng, userLocation: currentLocation, userLatLon: currentUserLatLon }
99
+ return {
100
+ getLocation,
101
+ locationIng,
102
+ userLocation: currentLocation,
103
+ userLatLon: currentUserLatLon,
104
+ userAddressId: currentAddressId,
105
+ }
100
106
  }
101
107
 
102
108
  export default useLocation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -7,5 +7,6 @@ declare const useLocation: (onLocation?: (location: UserLocation) => void) => {
7
7
  locationIng: import('vue').Ref<boolean>
8
8
  userLocation: import('vue').Ref<UserLocation | undefined>
9
9
  userLatLon: import('vue').Ref<UniApp.GetLocationSuccess | undefined>
10
+ userAddressId: import('vue').Ref<string>
10
11
  }
11
12
  export default useLocation