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