Commit bcf21da6 by fukai

修复金额控件问题

parent 59d8ed60
......@@ -1139,6 +1139,11 @@
"integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=",
"dev": true
},
"bignumber.js": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz",
"integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA=="
},
"binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.2.0.tgz?cache=0&sync_timestamp=1610299293319&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbinary-extensions%2Fdownload%2Fbinary-extensions-2.2.0.tgz",
......
......@@ -16,7 +16,8 @@
"lodash": "^4.17.21",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
"vuex": "^3.4.0",
"bignumber.js": "^9.0.1"
},
"engines": {
"node": ">=6"
......
export default class BigNumber{
constructor(value) {
this.value = value;
}
static comparedTo(value){
if (this.value > value){
return 1;
}else if(this.value === value){
return 0;
}else{
return -1;
}
}
}
// module.exports = {
// 'name': 'bignumber',
// 'category': 'Construction',
// 'syntax': [
// 'bignumber(x)'
// ],
// method:{
// comparedTo(value){
// if (this.value > value){
// return 1;
// }else if(this.value === value){
// return 0;
// }else{
// return -1;
// }
// }
// },
// 'description':
// 'Create a big number from a number or string.',
// 'examples': [
// '0.1 + 0.2',
// 'bignumber(0.1) + bignumber(0.2)',
// 'bignumber("7.2")',
// 'bignumber("7.2e500")',
// 'bignumber([0.1, 0.2, 0.3])'
// ],
// 'seealso': [
// 'boolean', 'complex', 'fraction', 'index', 'matrix', 'string', 'unit'
// ]
// };
......@@ -13,7 +13,7 @@
</template>
<script>
import BigNumber from "./bignumber";
import BigNumber from "bignumber.js";
export default {
props: {
value: {
......@@ -42,7 +42,7 @@ export default {
},
id: {
type: String,
default: undefined
default: ""
}
},
data() {
......
......@@ -13,7 +13,7 @@
</template>
<script>
import BigNumber from "./bignumber";
import BigNumber from "bignumber.js";
export default {
props: {
value: {
......@@ -42,7 +42,7 @@ export default {
},
id: {
type: String,
default: undefined
default: ""
}
},
data() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment