From 0c94a41eb94a83f2c7eecde14cd41146c2dbf4a8 Mon Sep 17 00:00:00 2001 From: Emre Kanatli Date: Mon, 18 Jan 2021 15:32:13 -0500 Subject: [PATCH 1/4] Upgrade big.js dependency Update BignumInput to use vanilla html input number element --- package.json | 2 +- src/App.vue | 15 ++++--- src/bignum_input.vue | 105 ++++++++++++++++++++++++++++--------------- yarn.lock | 5 +++ 4 files changed, 82 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index 476e7e9..40d0039 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@fortawesome/free-solid-svg-icons": "^5.12.1", "@fortawesome/vue-fontawesome": "^0.1.9", "@zxing/library": "^0.15.2", - "big.js": "^5.2.2", + "big.js": "6.0.3", "bn.js": "^5.1.1", "core-js": "^3.6.4", "vue": "^2.6.11", diff --git a/src/App.vue b/src/App.vue index e21e8d2..e7b3c48 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,16 +9,17 @@

Out: {{big_in_out.toString()}}

+

Denomination 9

MAX: {{big_max.toString()}}

@@ -56,13 +57,10 @@ computed: { big_max(){ // return null; - return new BN('1000000000000000'); + return new BN('36000000000000000'); }, stepSize(){ - // let expo = 9-3; - // expo = new BN(expo) - // let tens = new BN('10').pow(expo); - return new BN(1); + return new BN(1000000); } }, methods: { @@ -71,6 +69,9 @@ }, clearBigIn(){ this.$refs.big_in.clear(); + }, + maxOutBig(){ + this.$refs.big_in.maxout(); } }, created(){ diff --git a/src/bignum_input.vue b/src/bignum_input.vue index dfdc860..25899b4 100644 --- a/src/bignum_input.vue +++ b/src/bignum_input.vue @@ -1,29 +1,14 @@