@tplc/business 0.4.25 → 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 +2 -0
- package/components/lcb-list/api.ts +1 -0
- package/components/lcb-list/components/ComponentGroup/index.vue +1 -1
- package/components/lcb-list/components/FilterSlider/index.vue +6 -2
- package/package.json +1 -1
- package/types/components/lcb-list/api.d.ts +1 -0
- package/types/components/lcb-list/components/FilterSlider/index.vue.d.ts +31 -3
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.4.26](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.25...v0.4.26) (2025-03-26)
|
|
6
|
+
|
|
5
7
|
### [0.4.25](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.18...v0.4.25) (2025-03-26)
|
|
6
8
|
|
|
7
9
|
|
|
@@ -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="
|
|
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
|
}
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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<
|
|
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>
|