forked from fanruan/demo-tabledata-redis
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
import { shortcut } from '../../../../core/core'; |
|
import { EditorXtype } from 'ui'; |
|
import { input } from './input.service'; |
|
|
|
@shortcut() |
|
@input('formula') |
|
export class InputFormula extends BI.Widget { |
|
static xtype = 'plugin.report.json.components.parameter_input.formula' |
|
|
|
props = { |
|
value: '', |
|
} |
|
|
|
input: any; |
|
|
|
mounted() { |
|
|
|
} |
|
|
|
render() { |
|
const { value } = this.options; |
|
|
|
return { |
|
type: EditorXtype, |
|
height: 22, |
|
allowBlank: true, |
|
value, |
|
ref: (_ref: any) => { |
|
this.input = _ref; |
|
}, |
|
listeners: [{ |
|
eventName: BI.TextEditor.EVENT_CHANGE, |
|
action: () => { |
|
const value = this.input.getValue(); |
|
this.fireEvent('EVENT_CHANGE', value); |
|
}, |
|
}, { |
|
eventName: BI.TextEditor.EVENT_FOCUS, |
|
action: () => { |
|
this.fireEvent('EVENT_FOCUS'); |
|
}, |
|
}], |
|
}; |
|
} |
|
}
|
|
|