Blame view

src/SelectOption/SelectOption.js 407 Bytes
3a3ecabe   Imshann   init
1
2
3
  /**
   * 选项
   */
dd962f77   Imshann   优化
4
5
6
7
  import template from "./SelectOption.html";
  
  class SelectOption {
      template = template;
3a3ecabe   Imshann   init
8
  
3a3ecabe   Imshann   init
9
10
11
12
13
14
      props = { value: String };
  
      state = {
          label: null,
      };
  
3a3ecabe   Imshann   init
15
16
17
18
      constructor(esSelect) {
          this.esSelect = esSelect.getContext();
          this.esSelect.addOption({
              value: this.props.value,
dd962f77   Imshann   优化
19
20
              label: null,
              element: $element,
3a3ecabe   Imshann   init
21
22
23
          });
      }
  }