@tplc/business 0.4.24 → 0.4.26

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,29 @@
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.26](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.25...v0.4.26) (2025-03-26)
6
+
7
+ ### [0.4.25](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.18...v0.4.25) (2025-03-26)
8
+
9
+
10
+ ### 🚀 Chore | 构建/工程依赖/工具
11
+
12
+ * **release:** 0.4.19 ([8ba303d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8ba303dba4f3459fb3358f4e1be28c311e757657))
13
+ * **release:** 0.4.20 ([58e3599](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/58e3599d5aa5ee73d9017b1c9ac62556ebe45934))
14
+ * **release:** 0.4.21 ([8ebc53f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8ebc53ff0bd70b82f2227248b62bbead71df3b96))
15
+ * **release:** 0.4.22 ([2b9f34c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2b9f34c3ac0108ccc70f1bff1d64d927b4779444))
16
+ * **release:** 0.4.23 ([1922bc3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1922bc35e565230d937c8bca8da898ddd13e055a))
17
+ * **release:** 0.4.24 ([6bf6493](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6bf6493d59608fe30f573edb77b2bd032afc8a1a))
18
+
19
+
20
+ ### ✨ Features | 新功能
21
+
22
+ * search 调整 ([62102ae](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/62102ae0d4dbc56a910aa95264550df796a8cf55))
23
+ * 同步字段 ([706fd2b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/706fd2bbd2f52f6e3e1c4d994e099fc64631d998))
24
+ * 支持联动 ([6954a8a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6954a8a102218e67bfae301187d1739b9787f1eb))
25
+ * 支持过滤 ([7fd93ce](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7fd93ce323e2276b4a8e837340eeda1fe1926981))
26
+ * 新增组件 ([af04c93](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/af04c93df2bdcf41fde656d5f0e5712539f243c1))
27
+
5
28
  ### [0.4.24](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.23...v0.4.24) (2025-03-26)
6
29
 
7
30
 
@@ -55,6 +55,7 @@ export interface FilterTagsProps {
55
55
  apiPath: string
56
56
  options: Option[]
57
57
  unit?: string
58
+ step?: number
58
59
  }
59
60
 
60
61
  interface BtnComponent {
@@ -81,7 +81,7 @@ const getSliderTitle = (value?: number[], max = 0, min = 0) => {
81
81
  const [start, end] = value
82
82
  if (start === min && end === max) {
83
83
  return translate('不限')
84
- } else if (end === max) {
84
+ } else if (end === max || end === undefined) {
85
85
  return `¥${start}` + translate('以上')
86
86
  } else if (start === min) {
87
87
  return `¥${end}` + translate('以下')
@@ -14,7 +14,7 @@
14
14
  custom-min-class="left-0 slider-text"
15
15
  custom-max-class="right--2 slider-text"
16
16
  :active-color="themeColor"
17
- :step="50"
17
+ :step="step"
18
18
  unit="¥"
19
19
  />
20
20
  <view class="grid grid-cols-4 gap-4 mt-2" v-if="options.length">
@@ -46,7 +46,9 @@ defineOptions({
46
46
  const themeColor = inject('theme-color', '#3875FF')
47
47
  const showLabel = ref(false)
48
48
  const slider = ref<SliderInstance>()
49
- const props = defineProps<FilterSliderProps>()
49
+ const props = withDefaults(defineProps<FilterSliderProps>(), {
50
+ step: 100,
51
+ })
50
52
  const model = defineModel<number[]>()
51
53
  const innerValue = ref<number[]>()
52
54
  const onItemClick = (value) => {
@@ -90,6 +92,8 @@ const onDragend = () => {
90
92
  showLabel.value = false
91
93
  if (innerValue.value?.[0] === props.max && innerValue.value?.[1] === props.max) {
92
94
  model.value = [innerValue.value?.[0]]
95
+ } else if (innerValue.value?.[0] === props.min && innerValue.value?.[1] === props.max) {
96
+ model.value = undefined
93
97
  } else {
94
98
  model.value = innerValue.value
95
99
  }
@@ -10,7 +10,7 @@
10
10
  >
11
11
  <template #top>
12
12
  <view class="p-2 box-border bg-[#f5f5f5] text-left text-#969696 text-3 mt-2">
13
- 当前目的地及周边查询结果(酒店起价为参考价)
13
+ 当前目的地及周边查询结果(起价为参考价)
14
14
  </view>
15
15
  </template>
16
16
  <view
@@ -178,10 +178,10 @@ const onSearch = async (e: { detail: { value: string } }) => {
178
178
  const onSelect = (keyword: ProductInfo) => {
179
179
  searchHistoryRef.value?.saveHistory(keyword)
180
180
  const [path, query] = keyword.link.jumpUrl.split('?')
181
- let queryParams = query ? parse(query) : {}
181
+ const params = parse(query)
182
+ let queryParams = query ? params : {}
182
183
  const options = getCurrentPage().options
183
184
  queryParams = {
184
- keywords: form?.value?.keywords,
185
185
  endDate: options.endDate,
186
186
  startDate: options.startDate,
187
187
  cityName: options.cityName,
@@ -197,6 +197,7 @@ const onSelect = (keyword: ProductInfo) => {
197
197
  delete queryParams[key]
198
198
  }
199
199
  })
200
+ queryParams.keywords = params.keywords
200
201
  if (!options.jumpPageType) {
201
202
  uni.$emit(`${getPreviousPageId()}_filter_change`, queryParams)
202
203
  uni.navigateBack()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.24",
3
+ "version": "0.4.26",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -50,6 +50,7 @@ export interface FilterTagsProps {
50
50
  apiPath: string
51
51
  options: Option[]
52
52
  unit?: string
53
+ step?: number
53
54
  }
54
55
  interface BtnComponent {
55
56
  postRequest: string
@@ -4,7 +4,12 @@ type __VLS_PublicProps = {
4
4
  modelValue?: number[]
5
5
  } & typeof __VLS_typeProps
6
6
  declare const _default: import('vue').DefineComponent<
7
- __VLS_TypePropsToOption<__VLS_PublicProps>,
7
+ __VLS_WithDefaults<
8
+ __VLS_TypePropsToOption<__VLS_PublicProps>,
9
+ {
10
+ step: number
11
+ }
12
+ >,
8
13
  {},
9
14
  unknown,
10
15
  {},
@@ -16,13 +21,36 @@ declare const _default: import('vue').DefineComponent<
16
21
  },
17
22
  string,
18
23
  import('vue').PublicProps,
19
- Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
24
+ Readonly<
25
+ import('vue').ExtractPropTypes<
26
+ __VLS_WithDefaults<
27
+ __VLS_TypePropsToOption<__VLS_PublicProps>,
28
+ {
29
+ step: number
30
+ }
31
+ >
32
+ >
33
+ > & {
20
34
  'onUpdate:modelValue'?: ((modelValue: number[]) => any) | undefined
21
35
  },
22
- {},
36
+ {
37
+ step: number
38
+ },
23
39
  {}
24
40
  >
25
41
  export default _default
42
+ type __VLS_WithDefaults<P, D> = {
43
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
44
+ ? __VLS_Prettify<
45
+ P[K] & {
46
+ default: D[K]
47
+ }
48
+ >
49
+ : P[K]
50
+ }
51
+ type __VLS_Prettify<T> = {
52
+ [K in keyof T]: T[K]
53
+ } & {}
26
54
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
27
55
  type __VLS_TypePropsToOption<T> = {
28
56
  [K in keyof T]-?: {} extends Pick<T, K>