2015-11-15 08:23:16 +08:00
|
|
|
|
2016-06-17 07:23:49 +08:00
|
|
|
import {i18n} from 'Common/Translator';
|
2016-06-07 05:57:52 +08:00
|
|
|
import {defautOptionsAfterRender} from 'Common/Utils';
|
2015-11-15 08:23:16 +08:00
|
|
|
import {componentExportHelper} from 'Component/Abstract';
|
|
|
|
import {AbstractInput} from 'Component/AbstractInput';
|
|
|
|
|
|
|
|
class SelectComponent extends AbstractInput
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param {Object} params
|
|
|
|
*/
|
|
|
|
constructor(params) {
|
|
|
|
|
|
|
|
super(params);
|
|
|
|
|
|
|
|
this.options = params.options || '';
|
|
|
|
|
|
|
|
this.optionsText = params.optionsText || null;
|
|
|
|
this.optionsValue = params.optionsValue || null;
|
|
|
|
this.optionsCaption = params.optionsCaption || null;
|
|
|
|
|
|
|
|
if (this.optionsCaption)
|
|
|
|
{
|
2016-06-17 07:23:49 +08:00
|
|
|
this.optionsCaption = i18n(this.optionsCaption);
|
2015-11-15 08:23:16 +08:00
|
|
|
}
|
|
|
|
|
2016-06-07 05:57:52 +08:00
|
|
|
this.defautOptionsAfterRender = defautOptionsAfterRender;
|
2015-11-15 08:23:16 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-01 02:44:13 +08:00
|
|
|
export default componentExportHelper(SelectComponent, 'SelectComponent');
|