changes
This commit is contained in:
@@ -37,10 +37,10 @@ export default {
|
||||
},
|
||||
created() {
|
||||
if (this.defaultValue) {
|
||||
this.value = this.value !== undefined ? this.$numtoString(this.value) : this.$numtoString(0);
|
||||
this.value = this.value !== undefined ? this.$formatNum(this.value) : this.$formatNum(0);
|
||||
} else {
|
||||
if (this.value !== undefined && this.value !== null) {
|
||||
this.value = this.$numtoString(this.value);
|
||||
this.value = this.$formatNum(this.value);
|
||||
} else {
|
||||
this.value = "";
|
||||
}
|
||||
@@ -48,7 +48,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
record() {
|
||||
this.value = this.$numtoString(this.record[this.attr]);
|
||||
this.value = this.$formatNum(this.record[this.attr]);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -71,14 +71,14 @@ export default {
|
||||
getDisplayValue(recordValue) {
|
||||
if (this.defaultValue) {
|
||||
if (recordValue === null || recordValue === undefined || recordValue === "") {
|
||||
return this.$numtoString(0);
|
||||
return this.$formatNum(0);
|
||||
}
|
||||
return this.$numtoString(recordValue);
|
||||
return this.$formatNum(recordValue);
|
||||
} else {
|
||||
if (recordValue === null || recordValue === undefined || recordValue === "") {
|
||||
return "";
|
||||
}
|
||||
return this.$numtoString(recordValue);
|
||||
return this.$formatNum(recordValue);
|
||||
}
|
||||
},
|
||||
doCheck() {
|
||||
@@ -90,11 +90,11 @@ export default {
|
||||
},
|
||||
checkChange() {
|
||||
if (!this.$empty(this.value)) {
|
||||
this.value = this.$numtoString(this.$formatNumber(this.value));
|
||||
this.$emit("number", this.$formatNumber(this.value));
|
||||
this.value = this.$formatNum(this.$parseNum(this.value));
|
||||
this.$emit("number", this.$parseNum(this.value));
|
||||
} else {
|
||||
if (this.defaultValue) {
|
||||
this.value = this.$numtoString(0);
|
||||
this.value = this.$formatNum(0);
|
||||
this.$emit("number", 0);
|
||||
} else {
|
||||
this.value = "";
|
||||
|
||||
Reference in New Issue
Block a user