@tplc/business 0.4.22 → 0.4.24

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,20 @@
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.24](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.23...v0.4.24) (2025-03-26)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 支持联动 ([6954a8a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6954a8a102218e67bfae301187d1739b9787f1eb))
11
+
12
+ ### [0.4.23](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.22...v0.4.23) (2025-03-26)
13
+
14
+
15
+ ### ✨ Features | 新功能
16
+
17
+ * 新增组件 ([af04c93](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/af04c93df2bdcf41fde656d5f0e5712539f243c1))
18
+
5
19
  ### [0.4.22](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.21...v0.4.22) (2025-03-26)
6
20
 
7
21
  ### [0.4.21](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.20...v0.4.21) (2025-03-26)
@@ -84,13 +84,7 @@ withDefaults(defineProps<LcbCalendarSearchProps>(), {
84
84
  icon: 'search',
85
85
  mode: 'search',
86
86
  })
87
- const urlParams = computed(() => {
88
- return stringify({
89
- startDate: form.value.startDate,
90
- endDate: form.value.endDate,
91
- keywords: form.value.keywords,
92
- })
93
- })
87
+
94
88
  const form = inject(FORM_KEY) as Ref<Record<string, any>>
95
89
  const addressCity = ref<LcbAddress | undefined>(
96
90
  (form.value.cityId || form.value.areaId || form.value.provinceId
@@ -101,6 +95,16 @@ const dayRange = ref([
101
95
  form.value.startDate ? dayjs(form.value.startDate).valueOf() : dayjs().valueOf(),
102
96
  form.value.endDate ? dayjs(form.value.endDate).valueOf() : dayjs().add(1, 'day').valueOf(),
103
97
  ])
98
+ const urlParams = computed(() => {
99
+ return stringify({
100
+ startDate: form.value.startDate,
101
+ endDate: form.value.endDate,
102
+ keywords: form.value.keywords,
103
+ provinceId: form.value.provinceId,
104
+ cityId: form.value.cityId,
105
+ areaId: form.value.areaId,
106
+ })
107
+ })
104
108
  const { translate } = useTranslate()
105
109
  const { getLocation, userLocation } = useLocation()
106
110
 
@@ -111,7 +111,7 @@
111
111
  </template>
112
112
 
113
113
  <script setup lang="ts">
114
- import { computed, ref, reactive, watchEffect, inject } from 'vue'
114
+ import { computed, ref, watchEffect, inject, Ref } from 'vue'
115
115
  import { LcbHomeSearch } from './types'
116
116
  import dayjs from 'dayjs/esm'
117
117
  import useLocation from '../../hooks/useLocation'
@@ -145,17 +145,7 @@ const props = withDefaults(defineProps<LcbHomeSearch>(), {
145
145
  })
146
146
 
147
147
  const current = ref(0)
148
- const form = inject(FORM_KEY, {
149
- categoryTags: '',
150
- keywords: '',
151
- startDate: '',
152
- endDate: '',
153
- cityId: '',
154
- areaId: '',
155
- provinceId: '',
156
- addressName: '',
157
- cityName: '',
158
- })
148
+ const form = inject(FORM_KEY) as Ref<Record<string, any>>
159
149
 
160
150
  // 今天 明天 后天 周...
161
151
  const getDayName = (time: number) => {
@@ -172,22 +162,22 @@ const getDayName = (time: number) => {
172
162
  }
173
163
 
174
164
  watchEffect(() => {
175
- form.categoryTags = props.tabs[current.value].value
165
+ form.value.categoryTags = props.tabs[current.value].value
176
166
  })
177
167
 
178
168
  watchEffect(() => {
179
- form.startDate = dayjs(dayRange.value[0]).format('YYYY-MM-DD')
180
- form.endDate = dayjs(dayRange.value[1]).format('YYYY-MM-DD')
169
+ form.value.startDate = dayjs(dayRange.value[0]).format('YYYY-MM-DD')
170
+ form.value.endDate = dayjs(dayRange.value[1]).format('YYYY-MM-DD')
181
171
  })
182
172
 
183
173
  watchEffect(() => {
184
174
  if (addressCity.value) {
185
- form.cityId = addressCity.value.cityId
186
- form.areaId = addressCity.value.areaId
187
- form.provinceId = addressCity.value.provinceId
188
- form.addressName = addressCity.value.addressName
175
+ form.value.cityId = addressCity.value.cityId
176
+ form.value.areaId = addressCity.value.areaId
177
+ form.value.provinceId = addressCity.value.provinceId
178
+ form.value.addressName = addressCity.value.addressName
189
179
  if (addressCity.value.keywords) {
190
- form.keywords = addressCity.value.keywords
180
+ form.value.keywords = addressCity.value.keywords
191
181
  }
192
182
  }
193
183
  })
@@ -6,7 +6,7 @@
6
6
  @query="queryList"
7
7
  :height="height"
8
8
  :fixed="false"
9
- :auto="recordType"
9
+ :auto="Boolean(recordType)"
10
10
  :use-page-scroll="false"
11
11
  >
12
12
  <lcb-block v-bind="$props" v-for="item in dataList" :key="item.distributorCommissionLogId">
@@ -65,10 +65,11 @@
65
65
  </template>
66
66
 
67
67
  <script lang="ts" setup>
68
- import { ref, watch } from 'vue'
68
+ import { ref, watch, inject, Ref } from 'vue'
69
69
  import { getRecordPageList, UserCommissionLog } from './api'
70
70
  import { LcbParticularsProps } from './types'
71
71
  import useAutoHeight from '../../hooks/useAutoHeight'
72
+ import { FORM_KEY } from '../../constants'
72
73
  defineOptions({
73
74
  name: 'LcbParticulars',
74
75
  options: {
@@ -78,6 +79,7 @@ defineOptions({
78
79
  },
79
80
  })
80
81
  const { height } = useAutoHeight('particularsTop')
82
+ const form = inject(FORM_KEY) as Ref<Record<string, any>>
81
83
  const props = withDefaults(defineProps<LcbParticularsProps>(), {
82
84
  textAlign: 'left',
83
85
  })
@@ -91,6 +93,7 @@ const queryList = async (page: number, limit: number) => {
91
93
  limit,
92
94
  page,
93
95
  },
96
+ ...form.value,
94
97
  })
95
98
  paging.value.complete(data)
96
99
  } catch (error) {
@@ -98,9 +101,12 @@ const queryList = async (page: number, limit: number) => {
98
101
  }
99
102
  }
100
103
  watch(
101
- () => props.recordType,
102
- (value) => {
103
- paging.value?.reload()
104
+ [() => props.recordType, form],
105
+ () => {
106
+ paging.value?.reload?.()
107
+ },
108
+ {
109
+ deep: true,
104
110
  },
105
111
  )
106
112
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.22",
3
+ "version": "0.4.24",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],