Skip to content

Commit 78f3531

Browse files
committed
style: format slider
1 parent 615b460 commit 78f3531

File tree

6 files changed

+23
-29
lines changed

6 files changed

+23
-29
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ components/style/color/*.less
2727
.png
2828
.npmrc.template
2929
.huskyrc
30+
.gitmodules
31+
*.png
32+

antdv-demo

components/date-picker/style/TimePicker.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
text-align: center;
8383
list-style: none;
8484
cursor: pointer;
85-
transition: all .3s;
85+
transition: all 0.3s;
8686
user-select: none;
8787

8888
&:last-child::after {

components/select/style/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@
469469
&-menu {
470470
max-height: 250px;
471471
margin-bottom: 0;
472-
padding: @select-dropdown-edge-child-vertical-padding 0; //Change
472+
padding: @select-dropdown-edge-child-vertical-padding 0; //Change
473473
padding-left: 0; // Override default ul/ol
474474
overflow: auto;
475475
list-style: none;

components/vc-slider/src/Range.jsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,23 @@ const Range = {
7171
watch: {
7272
value: {
7373
handler(val) {
74-
const { min, max, bounds } = this;
75-
this.setChangeValue(val || bounds, min, max);
74+
const { bounds } = this;
75+
this.setChangeValue(val || bounds);
7676
},
7777
deep: true,
7878
},
79-
min(val) {
80-
const { value = bounds, max } = this;
81-
this.setChangeValue(value, val, max);
79+
min() {
80+
const { value } = this;
81+
this.setChangeValue(value || this.bounds);
8282
},
83-
max(val) {
84-
const { value = bounds, min } = this;
85-
this.setChangeValue(value, min, val);
83+
max() {
84+
const { value } = this;
85+
this.setChangeValue(value || this.bounds);
8686
},
8787
},
8888
methods: {
89-
setChangeValue(value, min, max) {
89+
setChangeValue(value) {
9090
const { bounds } = this;
91-
const minAmaxProps = {
92-
min,
93-
max,
94-
};
9591
const nextBounds = value.map((v, i) =>
9692
trimAlignValue({
9793
value: v,

components/vc-slider/src/Slider.jsx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,21 @@ const Slider = {
4141
watch: {
4242
value: {
4343
handler(val) {
44-
const { min, max } = this;
45-
this.setChangeValue(val, min, max);
44+
this.setChangeValue(val);
4645
},
4746
deep: true,
4847
},
49-
min(val) {
50-
const { sValue, max } = this;
51-
this.setChangeValue(sValue, val, max);
48+
min() {
49+
const { sValue } = this;
50+
this.setChangeValue(sValue);
5251
},
53-
max(val) {
54-
const { sValue, min } = this;
55-
this.setChangeValue(sValue, min, val);
52+
max() {
53+
const { sValue } = this;
54+
this.setChangeValue(sValue);
5655
},
5756
},
5857
methods: {
59-
setChangeValue(value, min, max) {
60-
const minAmaxProps = {
61-
min,
62-
max,
63-
};
58+
setChangeValue(value) {
6459
const newValue = value !== undefined ? value : this.sValue;
6560
const nextValue = this.trimAlignValue(newValue, this.$props);
6661
if (nextValue === this.sValue) return;

0 commit comments

Comments
 (0)