style: format slider
parent
615b460ee4
commit
78f3531beb
|
@ -27,3 +27,6 @@ components/style/color/*.less
|
||||||
.png
|
.png
|
||||||
.npmrc.template
|
.npmrc.template
|
||||||
.huskyrc
|
.huskyrc
|
||||||
|
.gitmodules
|
||||||
|
*.png
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 48d6f869a283826b5ec7bc9a75ea76142d43186c
|
Subproject commit cf073b5456c67002c02d911b0d50f804d77ee6b1
|
|
@ -82,7 +82,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all .3s;
|
transition: all 0.3s;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&:last-child::after {
|
&:last-child::after {
|
||||||
|
|
|
@ -469,7 +469,7 @@
|
||||||
&-menu {
|
&-menu {
|
||||||
max-height: 250px;
|
max-height: 250px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
padding: @select-dropdown-edge-child-vertical-padding 0; //Change
|
padding: @select-dropdown-edge-child-vertical-padding 0; //Change
|
||||||
padding-left: 0; // Override default ul/ol
|
padding-left: 0; // Override default ul/ol
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
|
@ -71,27 +71,23 @@ const Range = {
|
||||||
watch: {
|
watch: {
|
||||||
value: {
|
value: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
const { min, max, bounds } = this;
|
const { bounds } = this;
|
||||||
this.setChangeValue(val || bounds, min, max);
|
this.setChangeValue(val || bounds);
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
min(val) {
|
min() {
|
||||||
const { value = bounds, max } = this;
|
const { value } = this;
|
||||||
this.setChangeValue(value, val, max);
|
this.setChangeValue(value || this.bounds);
|
||||||
},
|
},
|
||||||
max(val) {
|
max() {
|
||||||
const { value = bounds, min } = this;
|
const { value } = this;
|
||||||
this.setChangeValue(value, min, val);
|
this.setChangeValue(value || this.bounds);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setChangeValue(value, min, max) {
|
setChangeValue(value) {
|
||||||
const { bounds } = this;
|
const { bounds } = this;
|
||||||
const minAmaxProps = {
|
|
||||||
min,
|
|
||||||
max,
|
|
||||||
};
|
|
||||||
const nextBounds = value.map((v, i) =>
|
const nextBounds = value.map((v, i) =>
|
||||||
trimAlignValue({
|
trimAlignValue({
|
||||||
value: v,
|
value: v,
|
||||||
|
|
|
@ -41,26 +41,21 @@ const Slider = {
|
||||||
watch: {
|
watch: {
|
||||||
value: {
|
value: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
const { min, max } = this;
|
this.setChangeValue(val);
|
||||||
this.setChangeValue(val, min, max);
|
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
min(val) {
|
min() {
|
||||||
const { sValue, max } = this;
|
const { sValue } = this;
|
||||||
this.setChangeValue(sValue, val, max);
|
this.setChangeValue(sValue);
|
||||||
},
|
},
|
||||||
max(val) {
|
max() {
|
||||||
const { sValue, min } = this;
|
const { sValue } = this;
|
||||||
this.setChangeValue(sValue, min, val);
|
this.setChangeValue(sValue);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setChangeValue(value, min, max) {
|
setChangeValue(value) {
|
||||||
const minAmaxProps = {
|
|
||||||
min,
|
|
||||||
max,
|
|
||||||
};
|
|
||||||
const newValue = value !== undefined ? value : this.sValue;
|
const newValue = value !== undefined ? value : this.sValue;
|
||||||
const nextValue = this.trimAlignValue(newValue, this.$props);
|
const nextValue = this.trimAlignValue(newValue, this.$props);
|
||||||
if (nextValue === this.sValue) return;
|
if (nextValue === this.sValue) return;
|
||||||
|
|
Loading…
Reference in New Issue