@tplc/business 0.7.33 → 0.7.35

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.7.35](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.34...v0.7.35) (2025-12-30)
6
+
7
+
8
+ ### 🐛 Bug Fixes | Bug 修复
9
+
10
+ * Update window information retrieval to use constantsStore for consistent access across components ([92b3a70](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/92b3a7025a82fa129646b904a90d3959cc177d26))
11
+
12
+ ### [0.7.34](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.21...v0.7.34) (2025-12-30)
13
+
5
14
  ### [0.7.33](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.31...v0.7.33) (2025-12-29)
6
15
 
7
16
 
package/action.d.ts CHANGED
@@ -69,12 +69,13 @@ export interface LcbGlobal {
69
69
  updateUser: (data: Record<string, any>, isLogin?: boolean) => void
70
70
  getUser: () => void
71
71
  }
72
- constantsStore?: () => {
72
+ constantsStore: () => {
73
73
  mainConfig?: Record<string, any>
74
74
  otherConfig?: Record<string, any>
75
75
  addressId?: string
76
76
  setAddressId: (addressId: string, switchType?: 'merchant' | 'address') => void
77
77
  getAddressId: () => string
78
+ windowInfo: Ref<UniNamespace.GetWindowInfoResult>
78
79
  }
79
80
  messageStore?: () => {
80
81
  messageCount: number
@@ -218,7 +218,7 @@ const onActionClick = async () => {
218
218
  /** 锚点跳转 */
219
219
  case '16':
220
220
  if (url) {
221
- const windowInfo = uni.getWindowInfo()
221
+ const windowInfo = uni.$lcb.constantsStore().windowInfo?.value
222
222
  const navbarHeight = (windowInfo.statusBarHeight || 0) + 44
223
223
  onPageScrollSelector(url, navbarHeight)
224
224
  }
@@ -108,7 +108,7 @@ const props = withDefaults(defineProps<LcbBannerProps>(), {
108
108
  })
109
109
  const scrollTop = ref(0)
110
110
 
111
- const pageHeight = uni.getWindowInfo().screenHeight
111
+ const pageHeight = uni.$lcb.constantsStore().windowInfo.value.screenHeight
112
112
  const showTabbar = inject(SHOW_TABBAR) as Ref<boolean>
113
113
 
114
114
  // Touch gesture handling
@@ -212,7 +212,7 @@ const handleTouchEnd = () => {
212
212
  isTouching.value = false
213
213
  }
214
214
  const handleScrollToBottom = () => {
215
- const statusBarHeight = uni.getWindowInfo().statusBarHeight
215
+ const statusBarHeight = uni.$lcb.constantsStore().windowInfo.value.statusBarHeight
216
216
  uni.pageScrollTo({
217
217
  scrollTop: pageHeight - statusBarHeight - 44,
218
218
  duration: 300,
@@ -152,7 +152,7 @@ defineOptions({
152
152
  styleIsolation: 'shared',
153
153
  },
154
154
  })
155
- const { statusBarHeight, windowWidth } = uni.getWindowInfo()
155
+ const { statusBarHeight, windowWidth } = uni.$lcb.constantsStore().windowInfo.value
156
156
  // 胶囊信息
157
157
  const boundingInfo = uni.getMenuButtonBoundingClientRect?.() || {
158
158
  width: 0,
@@ -35,7 +35,9 @@ const props = withDefaults(defineProps<LcbProductProps>(), {
35
35
  const { form } = useSyncForm(props.dynamicScope)
36
36
  const loading = ref(false)
37
37
  const renderList = ref<Record<string, any>[]>([])
38
- const screenWidth = isH5 ? window.innerWidth : uni.getWindowInfo().screenWidth
38
+ const screenWidth = isH5
39
+ ? window.innerWidth
40
+ : uni.$lcb.constantsStore().windowInfo.value.screenWidth
39
41
  watchEffect(() => {
40
42
  if (!props.filterList) return
41
43
  renderList.value = props.items as Record<string, any>[]
@@ -133,7 +133,7 @@ import Nums from './Nums/index.vue'
133
133
  import { computed } from 'vue'
134
134
  import { addUnit } from '@tplc/wot/components/common/util'
135
135
 
136
- const { statusBarHeight } = uni.getWindowInfo()
136
+ const { statusBarHeight } = uni.$lcb.constantsStore().windowInfo.value
137
137
  defineOptions({
138
138
  name: 'LcbUserTop',
139
139
  options: {
@@ -6,7 +6,9 @@ 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)
9
- const viewPageHeight = isH5 ? window.innerHeight : uni.getWindowInfo().screenHeight
9
+ const viewPageHeight = isH5
10
+ ? window.innerHeight
11
+ : uni.$lcb.constantsStore().windowInfo.value.screenHeight
10
12
  const height = ref('')
11
13
  const top = ref(0)
12
14
  onMounted(() => {
package/index.ts CHANGED
@@ -13,7 +13,7 @@ export const $lcb: LcbGlobal = {
13
13
  authPhone: '/pages/system/authPhone',
14
14
  userEdit: '/pages/user/edit',
15
15
  drawdown: '/pages/drawdown/drawdown',
16
- notification:'/pages-sub/notification/index',
16
+ notification: '/pages-sub/notification/index',
17
17
  },
18
18
  } as LcbGlobal
19
19
  uni.$lcb = $lcb
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.7.33",
3
+ "version": "0.7.35",
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": "1.0.17"
14
+ "@tplc/wot": "1.0.21"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",