fix: fix indicator figures and calcParams override invalid issue

This commit is contained in:
liihuu 2024-09-05 23:54:32 +08:00
parent 4a5907f352
commit 6558650d58

View File

@ -373,6 +373,8 @@ export default class IndicatorImp<D = any> implements Indicator<D> {
shortName,
precision,
styles,
figures,
calcParams,
...others
} = indicator
if (!isString(this.name)) {
@ -388,6 +390,8 @@ export default class IndicatorImp<D = any> implements Indicator<D> {
this.styles ??= {}
merge(this.styles, styles)
}
this.figures = figures ?? this.figures
this.calcParams = calcParams ?? this.calcParams
merge(this, others)
}