mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
code refactor
This commit is contained in:
@@ -66,7 +66,7 @@
|
|||||||
import { mapStores } from 'pinia';
|
import { mapStores } from 'pinia';
|
||||||
import { useUserStore } from '@/stores/user.js';
|
import { useUserStore } from '@/stores/user.js';
|
||||||
|
|
||||||
import { isNumber, removeAll } from '@/lib/common.js';
|
import { isString, isNumber, removeAll } from '@/lib/common.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: [
|
props: [
|
||||||
@@ -125,6 +125,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getStringValue(userStore, value) {
|
getStringValue(userStore, value) {
|
||||||
|
if (!isNumber(value) && !isString(value)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
let str = this.$locale.formatAmount(userStore, value);
|
let str = this.$locale.formatAmount(userStore, value);
|
||||||
|
|
||||||
const digitGroupingSymbol = this.$locale.getCurrentDigitGroupingSymbol(userStore);
|
const digitGroupingSymbol = this.$locale.getCurrentDigitGroupingSymbol(userStore);
|
||||||
|
|||||||
Reference in New Issue
Block a user