Skip to content

Commit dd839a4

Browse files
authored
fix(slider): 完成组件自检清单,修复输入框限制问题和最小值样式问题 (#93)
1 parent 5e6886a commit dd839a4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/devui-vue/devui/slider/src/slider.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
.devui-min_count {
107107
position: absolute;
108108
top: 15px;
109+
left: 0;
109110
font-size: $devui-font-size;
110111
color: $devui-text;
111112
}

packages/devui-vue/devui/slider/src/slider.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,8 @@ export default defineComponent({
132132
inputValue.value = props.min;
133133
percentDispaly.value = '0%';
134134
} else {
135-
if (inputValue.value < props.min) {
136-
inputValue.value = props.min;
137-
}
138-
if (inputValue.value > props.max) {
139-
inputValue.value = props.max;
135+
if (inputValue.value < props.min || inputValue.value > props.max) {
136+
return
140137
}
141138
const re = /^(?:[1-9]?\d|100)$/;
142139
if (re.test(`${inputValue.value}`)) {

0 commit comments

Comments
 (0)