mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-07 18:25:45 +08:00
fix: This is undefined in utils methods. (#965)
This commit is contained in:
parent
ef56a8a4f1
commit
3f234ea2b7
@ -163,10 +163,10 @@ export function formatDate(date, isTime = false) {
|
||||
|
||||
// Get Formatted Price
|
||||
export function formatPrice(number, currency) {
|
||||
if (this.isEmptyValue(number)) {
|
||||
if (isEmptyValue(number)) {
|
||||
return undefined
|
||||
}
|
||||
if (this.isEmptyValue(currency)) {
|
||||
if (isEmptyValue(currency)) {
|
||||
currency = getCurrency()
|
||||
}
|
||||
// Get formatted number
|
||||
@ -178,7 +178,7 @@ export function formatPrice(number, currency) {
|
||||
|
||||
// Format Quantity
|
||||
export function formatQuantity(number) {
|
||||
if (this.isEmptyValue(number)) {
|
||||
if (isEmptyValue(number)) {
|
||||
return undefined
|
||||
}
|
||||
if (!Number.isInteger(number)) {
|
||||
@ -190,7 +190,7 @@ export function formatQuantity(number) {
|
||||
|
||||
// Format percentage based on Intl library
|
||||
export function formatPercent(number) {
|
||||
if (this.isEmptyValue(number)) {
|
||||
if (isEmptyValue(number)) {
|
||||
return undefined
|
||||
}
|
||||
// Get formatted number
|
||||
|
Loading…
x
Reference in New Issue
Block a user