Option.js
375 Bytes
/**
* 选项
*/
import template from "./Option.html";
class Option {
props = { value: String };
state = {
label: null,
};
template = template;
constructor(esSelect) {
this.esSelect = esSelect.getContext();
this.esSelect.addOption({
value: this.props.value,
label: $element.text(),
});
}
}