@tplc/business 0.2.64 → 0.2.65
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.2.65](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.52...v0.2.65) (2025-01-05)
|
|
6
|
+
|
|
5
7
|
### [0.2.64](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.63...v0.2.64) (2025-01-05)
|
|
6
8
|
|
|
7
9
|
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="filter-slider">
|
|
3
3
|
<wd-slider
|
|
4
|
-
hide-label
|
|
4
|
+
:hide-label="!showLabel"
|
|
5
5
|
:max="max"
|
|
6
6
|
:min="min"
|
|
7
7
|
:minText="`${unit}${min}`"
|
|
8
8
|
:maxText="`${unit}${max}+`"
|
|
9
9
|
v-model="innerValue"
|
|
10
10
|
@dragend="onDragend"
|
|
11
|
+
@dragstart="onDragStart"
|
|
11
12
|
ref="slider"
|
|
12
13
|
custom-class="px-4"
|
|
13
14
|
custom-min-class="left-0 slider-text"
|
|
14
15
|
custom-max-class="right--2 slider-text"
|
|
15
16
|
:active-color="themeColor"
|
|
17
|
+
:step="50"
|
|
18
|
+
unit="¥"
|
|
16
19
|
/>
|
|
17
20
|
<view class="grid grid-cols-4 gap-4 mt-2" v-if="options.length">
|
|
18
21
|
<SelectTagView
|
|
@@ -41,6 +44,7 @@ defineOptions({
|
|
|
41
44
|
},
|
|
42
45
|
})
|
|
43
46
|
const themeColor = inject('theme-color', '#3875FF')
|
|
47
|
+
const showLabel = ref(false)
|
|
44
48
|
const slider = ref<SliderInstance>()
|
|
45
49
|
const props = defineProps<FilterSliderProps>()
|
|
46
50
|
const model = defineModel<number[]>()
|
|
@@ -59,6 +63,9 @@ const onItemClick = (value) => {
|
|
|
59
63
|
const onDropOpened = () => {
|
|
60
64
|
slider.value?.initSlider()
|
|
61
65
|
}
|
|
66
|
+
const onDragStart = () => {
|
|
67
|
+
showLabel.value = true
|
|
68
|
+
}
|
|
62
69
|
|
|
63
70
|
onMounted(() => {
|
|
64
71
|
uni.$on('drop-opened', onDropOpened)
|
|
@@ -78,6 +85,7 @@ watch(
|
|
|
78
85
|
{ immediate: true },
|
|
79
86
|
)
|
|
80
87
|
const onDragend = () => {
|
|
88
|
+
showLabel.value = false
|
|
81
89
|
if (innerValue.value?.[0] === props.max && innerValue.value?.[1] === props.max) {
|
|
82
90
|
model.value = [innerValue.value?.[0]]
|
|
83
91
|
} else {
|
|
@@ -96,14 +104,44 @@ const getChecked = (value) => {
|
|
|
96
104
|
}
|
|
97
105
|
</script>
|
|
98
106
|
<style lang="scss">
|
|
107
|
+
@import '@tplc/wot/components/common/abstracts/variable';
|
|
99
108
|
.filter-slider {
|
|
100
109
|
position: relative;
|
|
101
110
|
padding-top: 24rpx;
|
|
111
|
+
|
|
102
112
|
:deep(.slider-text) {
|
|
103
113
|
color: #999 !important;
|
|
104
114
|
font-size: 24rpx !important;
|
|
105
115
|
position: absolute;
|
|
106
116
|
margin-bottom: 100rpx;
|
|
107
117
|
}
|
|
118
|
+
|
|
119
|
+
:deep(.wd-slider__has-label) {
|
|
120
|
+
padding-top: 0rpx;
|
|
121
|
+
|
|
122
|
+
.wd-slider__label {
|
|
123
|
+
background: $-color-theme;
|
|
124
|
+
padding: 8rpx 16rpx;
|
|
125
|
+
border-radius: 48rpx;
|
|
126
|
+
color: #fff;
|
|
127
|
+
width: fit-content;
|
|
128
|
+
min-width: 30rpx;
|
|
129
|
+
font-size: 24rpx !important;
|
|
130
|
+
transform: translate3d(-25%, 0%, 0);
|
|
131
|
+
/** 底部中间一个三角 */
|
|
132
|
+
&:before {
|
|
133
|
+
content: '';
|
|
134
|
+
position: absolute;
|
|
135
|
+
left: 50%;
|
|
136
|
+
bottom: -6rpx;
|
|
137
|
+
width: 0;
|
|
138
|
+
height: 0;
|
|
139
|
+
border-left: 8rpx solid transparent;
|
|
140
|
+
border-right: 8rpx solid transparent;
|
|
141
|
+
border-top: 8rpx solid $-color-theme;
|
|
142
|
+
transform: translateX(-50%);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
108
146
|
}
|
|
109
147
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplc/business",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.65",
|
|
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": "0.1.
|
|
14
|
+
"@tplc/wot": "0.1.52"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18",
|