@tplc/business 0.4.181 → 0.4.183

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,15 @@
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.183](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.182...v0.4.183) (2025-08-02)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * update map ([236385e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/236385eec9d0ab18cb7cd52cca88d18e5816e61f))
11
+
12
+ ### [0.4.182](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.181...v0.4.182) (2025-08-01)
13
+
5
14
  ### [0.4.181](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.180...v0.4.181) (2025-08-01)
6
15
 
7
16
 
@@ -13,7 +13,6 @@
13
13
  @regionchange="onRegionChange"
14
14
  @callouttap="onCalloutTap"
15
15
  />
16
- {{ form.mapLatitude }}
17
16
  <image
18
17
  src="./images/2.png"
19
18
  class="w-36rpx h-66rpx absolute left-0 top-0 m-auto bottom-0 right-0"
@@ -82,7 +81,16 @@
82
81
 
83
82
  <script lang="ts" setup>
84
83
  import { FORM_KEY } from '@tplc/business/constants'
85
- import { reactive, inject, ref, useAttrs, watch, onMounted, getCurrentInstance } from 'vue'
84
+ import {
85
+ reactive,
86
+ inject,
87
+ ref,
88
+ useAttrs,
89
+ watch,
90
+ onMounted,
91
+ getCurrentInstance,
92
+ onUnmounted,
93
+ } from 'vue'
86
94
  import { getJsonFromStr, transformValueUnit } from '../../utils/transform'
87
95
  import { MapItem, MapMarker } from './types'
88
96
  import useAutoHeight from '../../hooks/useAutoHeight'
@@ -90,7 +98,7 @@ import { LcbListProps } from '@tplc/business/components/lcb-list/types'
90
98
  import { LcbListInfo } from '@tplc/business/components/lcb-list/api'
91
99
  import { debounce } from '@tplc/wot/components/common/util'
92
100
  import useLocation from '../../hooks/useLocation'
93
- const { height } = useAutoHeight()
101
+ const { height } = useAutoHeight('pagingTop', 500)
94
102
  defineOptions({
95
103
  name: 'LcbMap',
96
104
  options: {
@@ -301,6 +309,10 @@ onMounted(() => {
301
309
  mapContext.value = uni.createMapContext('map', proxy)
302
310
  getData()
303
311
  })
312
+
313
+ onUnmounted(() => {
314
+ mapContext.value = undefined
315
+ })
304
316
  </script>
305
317
  <style lang="scss">
306
318
  .icon {
@@ -2,7 +2,7 @@ import { getRect, isH5 } from '@tplc/wot/components/common/util'
2
2
  import { getCurrentInstance, onMounted, ref } from 'vue'
3
3
  import { getCurrentPage } from '../utils/utils'
4
4
 
5
- const useAutoHeight = (id = 'pagingTop') => {
5
+ const useAutoHeight = (id = 'pagingTop', timeOut = 200) => {
6
6
  const { proxy } = getCurrentInstance() as any
7
7
  const route = getCurrentPage().route
8
8
  const isTabBar = uni.$lcb.getIsTabbar(route)
@@ -19,7 +19,7 @@ const useAutoHeight = (id = 'pagingTop') => {
19
19
  height.value = `calc(${viewPageHeight - (res.top || 0)}px - var(--window-bottom) - env(safe-area-inset-bottom))`
20
20
  }
21
21
  })
22
- }, 200)
22
+ }, timeOut)
23
23
  })
24
24
  return { height, top }
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.181",
3
+ "version": "0.4.183",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -1,4 +1,7 @@
1
- declare const useAutoHeight: (id?: string) => {
1
+ declare const useAutoHeight: (
2
+ id?: string,
3
+ timeOut?: number,
4
+ ) => {
2
5
  height: import('vue').Ref<string>
3
6
  top: import('vue').Ref<number>
4
7
  }