@tplc/business 0.7.20 → 0.7.21

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.7.21](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.20...v0.7.21) (2025-12-17)
6
+
5
7
  ### [0.7.20](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.15...v0.7.20) (2025-12-17)
6
8
 
7
9
 
@@ -92,32 +92,28 @@ defineOptions({
92
92
  const props = defineProps<LcbOrderPaymentProps>()
93
93
  const emits = defineEmits(['onWalletPriceChange'])
94
94
  const payType = defineModel<string>()
95
- const groupValue = ref(payType.value)
95
+ const payCardId = defineModel<string>('payCardId')
96
+ const groupValue = ref(payCardId.value || payType.value)
96
97
  const message = useMessage()
97
- watch(
98
- () => payType.value,
99
- (val) => {
100
- groupValue.value = val
101
- },
102
- )
103
- watch(
104
- () => groupValue.value,
105
- (val) => {
106
- payType.value = val
107
- },
108
- )
98
+ // 同时监听payType payCardId俩个字段 来修改groupValue
99
+ watch([payType, payCardId], ([newPayType, newPayCardId]) => {
100
+ groupValue.value = newPayCardId || newPayType
101
+ })
102
+
109
103
  onMounted(() => {
110
104
  for (let i = 0; i < (props.data?.length || 0); i++) {
111
105
  const item = props.data![i]
112
106
  if (item.content || item.items) {
113
107
  const defaultChild = (item.content || item.items)?.find((child) => child.defaultChecked)
114
108
  if (defaultChild) {
115
- groupValue.value = defaultChild.payCardId
109
+ payCardId.value = defaultChild.payCardId
110
+ payType.value = item.type
116
111
  break
117
112
  }
118
113
  }
119
114
  if (item.defaultChecked) {
120
- groupValue.value = item.type
115
+ payType.value = item.type
116
+ payCardId.value = undefined
121
117
  break
122
118
  }
123
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.7.20",
3
+ "version": "0.7.21",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -2,6 +2,7 @@ import type { LcbOrderPaymentProps } from './types'
2
2
  declare let __VLS_typeProps: LcbOrderPaymentProps
3
3
  type __VLS_PublicProps = {
4
4
  modelValue?: string
5
+ payCardId?: string
5
6
  } & typeof __VLS_typeProps
6
7
  declare const _default: import('vue').DefineComponent<
7
8
  __VLS_TypePropsToOption<__VLS_PublicProps>,
@@ -13,6 +14,7 @@ declare const _default: import('vue').DefineComponent<
13
14
  import('vue').ComponentOptionsMixin,
14
15
  {
15
16
  'update:modelValue': (modelValue: string) => void
17
+ 'update:payCardId': (payCardId: string) => void
16
18
  onWalletPriceChange: (...args: any[]) => void
17
19
  },
18
20
  string,
@@ -20,6 +22,7 @@ declare const _default: import('vue').DefineComponent<
20
22
  Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
21
23
  'onUpdate:modelValue'?: ((modelValue: string) => any) | undefined
22
24
  onOnWalletPriceChange?: ((...args: any[]) => any) | undefined
25
+ 'onUpdate:payCardId'?: ((payCardId: string) => any) | undefined
23
26
  },
24
27
  {},
25
28
  {}