|
@@ -40,10 +40,15 @@
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- value(val) {
|
|
|
|
- this.inputValue = +val;
|
|
|
|
|
|
+ value(newVal,oldVal) {
|
|
|
|
+ console.log(newVal,oldVal,'000')
|
|
|
|
+ this.inputValue = +newVal;
|
|
|
|
+ if (+newVal !== +oldVal) {
|
|
|
|
+ this.$emit("change", newVal);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
inputValue(newVal, oldVal) {
|
|
inputValue(newVal, oldVal) {
|
|
|
|
+ console.log(newVal,oldVal,'111')
|
|
if (+newVal !== +oldVal) {
|
|
if (+newVal !== +oldVal) {
|
|
// this.$emit("change", newVal);
|
|
// this.$emit("change", newVal);
|
|
}
|
|
}
|
|
@@ -80,7 +85,6 @@
|
|
|
|
|
|
this.inputValue = String(value / scale);
|
|
this.inputValue = String(value / scale);
|
|
this.$emit('input',this.inputValue)
|
|
this.$emit('input',this.inputValue)
|
|
- this.$emit("change", this.inputValue);
|
|
|
|
},
|
|
},
|
|
_getDecimalScale() {
|
|
_getDecimalScale() {
|
|
let scale = 1;
|
|
let scale = 1;
|
|
@@ -104,8 +108,7 @@
|
|
}
|
|
}
|
|
this.inputValue = value;
|
|
this.inputValue = value;
|
|
this.$emit('input',this.inputValue)
|
|
this.$emit('input',this.inputValue)
|
|
- this.$emit("change", this.inputValue);
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -122,22 +125,16 @@
|
|
display: flex;
|
|
display: flex;
|
|
/* #endif */
|
|
/* #endif */
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
- height: $box-height;
|
|
|
|
- line-height: $box-height;
|
|
|
|
width: 120px;
|
|
width: 120px;
|
|
}
|
|
}
|
|
|
|
|
|
.uni-numbox__value {
|
|
.uni-numbox__value {
|
|
background-color: $uni-bg-color;
|
|
background-color: $uni-bg-color;
|
|
width: 40px;
|
|
width: 40px;
|
|
- height: 32px;
|
|
|
|
|
|
+ height: $box-height;
|
|
|
|
+ line-height: $box-height;
|
|
text-align: center;
|
|
text-align: center;
|
|
font-size: $uni-font-size-lg;
|
|
font-size: $uni-font-size-lg;
|
|
- border-width: 1rpx;
|
|
|
|
- border-style: solid;
|
|
|
|
- border-color: $uni-border-color;
|
|
|
|
- border-left-width: 0;
|
|
|
|
- border-right-width: 0;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.uni-numbox__minus {
|
|
.uni-numbox__minus {
|
|
@@ -149,17 +146,10 @@
|
|
justify-content: center;
|
|
justify-content: center;
|
|
width: $box-width;
|
|
width: $box-width;
|
|
height: $box-height;
|
|
height: $box-height;
|
|
- // line-height: $box-line-height;
|
|
|
|
- // text-align: center;
|
|
|
|
|
|
+ line-height: $box-height;
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
color: $uni-text-color;
|
|
color: $uni-text-color;
|
|
background-color: $uni-bg-color-grey;
|
|
background-color: $uni-bg-color-grey;
|
|
- border-width: 1rpx;
|
|
|
|
- border-style: solid;
|
|
|
|
- border-color: $uni-border-color;
|
|
|
|
- border-top-left-radius: $uni-border-radius-base;
|
|
|
|
- border-bottom-left-radius: $uni-border-radius-base;
|
|
|
|
- border-right-width: 0;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.uni-numbox__plus {
|
|
.uni-numbox__plus {
|
|
@@ -171,13 +161,8 @@
|
|
justify-content: center;
|
|
justify-content: center;
|
|
width: $box-width;
|
|
width: $box-width;
|
|
height: $box-height;
|
|
height: $box-height;
|
|
- border-width: 1rpx;
|
|
|
|
- border-style: solid;
|
|
|
|
- border-color: $uni-border-color;
|
|
|
|
- border-top-right-radius: $uni-border-radius-base;
|
|
|
|
- border-bottom-right-radius: $uni-border-radius-base;
|
|
|
|
|
|
+ line-height: $box-height;
|
|
background-color: $uni-bg-color-grey;
|
|
background-color: $uni-bg-color-grey;
|
|
- border-left-width: 0;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.uni-numbox--text {
|
|
.uni-numbox--text {
|