From c5f468843285ec11a42c11502d646bfe2afbddfd Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Tue, 3 Dec 2024 11:17:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tool/Instead/components/keyboard copy.vue | 2 +- .../tool/Instead/components/keyboard.vue | 46 ++++------ .../Instead/components/popup-weight-goods.vue | 90 ++++++++++--------- src/views/tool/Instead/index.vue | 21 +++-- 4 files changed, 85 insertions(+), 74 deletions(-) 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 { }; -