diff --git a/src/views/tool/Instead/components/keyboard copy.vue b/src/views/tool/Instead/components/keyboard copy.vue index 8436f1f..7e23b71 100644 --- a/src/views/tool/Instead/components/keyboard copy.vue +++ b/src/views/tool/Instead/components/keyboard copy.vue @@ -27,7 +27,7 @@
- +
0
0
-
- +
+ + fill="#333333" p-id="1468">
@@ -80,7 +66,7 @@ export default { default: false, }, max: { - type: [Number,String], + type: [Number, String], default: Infinity, }, value: { @@ -108,22 +94,23 @@ export default { }, methods: { clearFunction() { - if(this.isFloat){ + if (this.isFloat) { return this.keyboradAdd('.') } - this.$emit("clear", this.number); + // this.$emit("clear", this.number); }, keyboradAdd(n) { - if(n=='.'&& `${this.number}`.includes('.')){ + if (n == '.' && `${this.number}`.includes('.')) { return } if (Number(this.number) == 0) { - return (this.number = n); + if (n == '.') { + return (this.number = 0 + n); + } } const newval = this.number + n; - console.log(newval) - if (newval*1 > this.max*1) { - return this.$message( this.maxTips); + if (newval * 1 > this.max * 1) { + return this.$message(this.maxTips); } this.number = newval; }, @@ -143,7 +130,7 @@ export default { }; -