formula: add split option
This commit is contained in:
parent
c8110deeaa
commit
3b65f4f7a6
1 changed files with 3 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ module.exports = class Formula extends _widgets_base {
|
|||
|
||||
precision:2,
|
||||
address:'auto',
|
||||
split:[]
|
||||
preArgs:[],
|
||||
target:[]
|
||||
}
|
||||
|
|
@ -46,6 +47,8 @@ module.exports = class Formula extends _widgets_base {
|
|||
|
||||
super(...arguments, widgetHtml)
|
||||
|
||||
this.split = typeof widgetData.split == 'object' && widgetData.split.length ? widgetData.split : false
|
||||
|
||||
this.input = this.widget.find('.input').fakeInput({align:'center', disabled:true})
|
||||
|
||||
this.linkedWidgets = widgetData.formula.match(/\$\{([^\}]*)\}/g) == null ? [] : widgetData.formula.match(/\$\{([^\}]*)\}/g).map((a)=>{return a.substr(2, a.length - 3)})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue