@tplc/business 0.7.32 → 0.7.34

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.7.34](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.21...v0.7.34) (2025-12-30)
6
+
7
+ ### [0.7.33](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.31...v0.7.33) (2025-12-29)
8
+
9
+
10
+ ### ♻️ Code Refactoring | 代码重构
11
+
12
+ * remove unused imports from ProductSkeleton and SkeletonItem components ([c04e392](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c04e392e5baa3d7739d96192c4604798db116723))
13
+ * remove unused type definitions and components from business package ([2bd79a4](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/2bd79a4c6c546a1c079ca4e291c73bd9d49a8f23))
14
+
15
+
16
+ ### 🚀 Chore | 构建/工程依赖/工具
17
+
18
+ * **release:** 0.7.32 ([80cf1d3](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/80cf1d33766e510be6990e4f721448cab806f9ae))
19
+ * **release:** 1.0.17 ([f987a45](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/f987a454c73379be440ffc75f8fd06d55da2632a))
20
+
21
+
22
+ ### ✨ Features | 新功能
23
+
24
+ * add button type to SelectPicker and implement remote search functionality ([2e09dea](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/2e09dea2be7087b925d732b0211641d2e1039424))
25
+
5
26
  ### [0.7.32](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.24...v0.7.32) (2025-12-27)
6
27
 
7
28
 
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
@@ -11,11 +11,12 @@
11
11
  <lcb-custom-content v-bind="dataInfo?.customContent" v-if="dataInfo?.customContent" />
12
12
  <lcb-order-payment
13
13
  v-model="form.payType"
14
+ v-model:payCardId="form.payCardId"
14
15
  :data="dataInfo?.commitPagePaymentMethod"
15
16
  @onWalletPriceChange="onWalletPriceChange"
16
17
  v-if="dataInfo?.commitPagePaymentMethod"
17
18
  />
18
- <view class="flex gap-5 mt-4">
19
+ <view class="flex gap-5 mt-4 justify-center items-center">
19
20
  <wd-button plain @click="onCancel">取消</wd-button>
20
21
  <wd-button @click="pay" type="primary">支付</wd-button>
21
22
  </view>
@@ -39,6 +40,7 @@ defineOptions({
39
40
  const form = ref({
40
41
  payType: '',
41
42
  useWalletPrice: 84,
43
+ payCardId: '',
42
44
  toStoreFlag: false,
43
45
  walletAccountId: '' as string | undefined,
44
46
  })
@@ -51,17 +53,14 @@ const [pay] = usePay(() =>
51
53
  )
52
54
 
53
55
  watch(
54
- () => form.value?.payType,
55
- (val) => {
56
- if (val) {
57
- if (val === 'toStore') {
56
+ () => [form.value?.payType, form.value?.payCardId],
57
+ ([newPayType]) => {
58
+ if (newPayType) {
59
+ if (newPayType === 'toStore') {
58
60
  form.value.toStoreFlag = true
59
- form.value.walletAccountId = undefined
60
- } else if (val !== 'wechat') {
61
- form.value.walletAccountId = val
61
+ } else if (newPayType !== 'wechat') {
62
62
  form.value.toStoreFlag = false
63
63
  } else {
64
- form.value.walletAccountId = undefined
65
64
  form.value.toStoreFlag = false
66
65
  }
67
66
  }
@@ -91,7 +90,6 @@ watch(
91
90
  props.requestInfo.requestUrl,
92
91
  props.requestInfo.requestParams,
93
92
  )) as any
94
- // form.value.payType = data.commitPagePaymentMethod.find((v) => v.defaultChecked)?.type
95
93
  dataInfo.value = data
96
94
  }
97
95
  },
@@ -92,6 +92,7 @@ import { useTranslate } from '@tplc/wot'
92
92
  import { PAGE_PROVIDE_KEY, USER_BASIC_INFO } from '../../constants'
93
93
  import { getTemplateMessageList, TemplateMessage } from '../../api/user'
94
94
  import PayPopup from './components/PayPopup/index.vue'
95
+ import { $lcb } from 'index'
95
96
  const { translate } = useTranslate()
96
97
  defineOptions({
97
98
  name: 'LcbActionView',
@@ -218,7 +219,7 @@ const onActionClick = async () => {
218
219
  /** 锚点跳转 */
219
220
  case '16':
220
221
  if (url) {
221
- const windowInfo = uni.getWindowInfo()
222
+ const windowInfo = $lcb.constantsStore().windowInfo?.value
222
223
  const navbarHeight = (windowInfo.statusBarHeight || 0) + 44
223
224
  onPageScrollSelector(url, navbarHeight)
224
225
  }
@@ -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.32",
3
+ "version": "0.7.34",
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.16"
14
+ "@tplc/wot": "1.0.21"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",
@@ -0,0 +1,7 @@
1
+ import { LcbGlobal } from './action'
2
+ export declare const $lcb: LcbGlobal
3
+ export declare const setup: (params: Partial<LcbGlobal>) => void
4
+ declare const _default: {
5
+ install: (Vue: any) => void
6
+ }
7
+ export default _default