mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 12:01:57 +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
|
// Get Formatted Price
|
||||||
export function formatPrice(number, currency) {
|
export function formatPrice(number, currency) {
|
||||||
if (this.isEmptyValue(number)) {
|
if (isEmptyValue(number)) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
if (this.isEmptyValue(currency)) {
|
if (isEmptyValue(currency)) {
|
||||||
currency = getCurrency()
|
currency = getCurrency()
|
||||||
}
|
}
|
||||||
// Get formatted number
|
// Get formatted number
|
||||||
@ -178,7 +178,7 @@ export function formatPrice(number, currency) {
|
|||||||
|
|
||||||
// Format Quantity
|
// Format Quantity
|
||||||
export function formatQuantity(number) {
|
export function formatQuantity(number) {
|
||||||
if (this.isEmptyValue(number)) {
|
if (isEmptyValue(number)) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
if (!Number.isInteger(number)) {
|
if (!Number.isInteger(number)) {
|
||||||
@ -190,7 +190,7 @@ export function formatQuantity(number) {
|
|||||||
|
|
||||||
// Format percentage based on Intl library
|
// Format percentage based on Intl library
|
||||||
export function formatPercent(number) {
|
export function formatPercent(number) {
|
||||||
if (this.isEmptyValue(number)) {
|
if (isEmptyValue(number)) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
// Get formatted number
|
// Get formatted number
|
||||||
|
Loading…
x
Reference in New Issue
Block a user