add unit config
This commit is contained in:
parent
baeafe243f
commit
840fd8ef9c
|
@ -83,6 +83,11 @@ export default {
|
||||||
* @type {Number}
|
* @type {Number}
|
||||||
*/
|
*/
|
||||||
digitalFlopToFixed: 0,
|
digitalFlopToFixed: 0,
|
||||||
|
/**
|
||||||
|
* @description Digital flop unit
|
||||||
|
* @type {String}
|
||||||
|
*/
|
||||||
|
digitalFlopUnit: '',
|
||||||
/**
|
/**
|
||||||
* @description CRender animationCurve
|
* @description CRender animationCurve
|
||||||
* @type {String}
|
* @type {String}
|
||||||
|
@ -122,7 +127,8 @@ export default {
|
||||||
digitalFlopStyle,
|
digitalFlopStyle,
|
||||||
digitalFlopToFixed,
|
digitalFlopToFixed,
|
||||||
data,
|
data,
|
||||||
showOriginValue
|
showOriginValue,
|
||||||
|
digitalFlopUnit
|
||||||
} = mergedConfig
|
} = mergedConfig
|
||||||
|
|
||||||
const value = data.map(({ value }) => value)
|
const value = data.map(({ value }) => value)
|
||||||
|
@ -140,7 +146,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content: showOriginValue ? '{nt}' : '{nt}%',
|
content: showOriginValue ? `{nt}${digitalFlopUnit}` : `{nt}${digitalFlopUnit || '%'}`,
|
||||||
number: [displayValue],
|
number: [displayValue],
|
||||||
style: digitalFlopStyle,
|
style: digitalFlopStyle,
|
||||||
toFixed: digitalFlopToFixed
|
toFixed: digitalFlopToFixed
|
||||||
|
|
Loading…
Reference in New Issue