Blame view

src/Col/Col.js 1.24 KB
3a3ecabe   Imshann   init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  /**
   * 
   */
  import template from "./Col.html";
  import style from "antd/lib/grid/style/index.css";
  
  class Col {
  
      useModules = ["esNgAntd"];
  
      props = {
          span: String,
      };
  
      state = {
          className: ["ant-col"]
      };
  
      template = template;
  
81f8a467   Imshann   调整组件前缀
21
      constructor(antdRow) {
3a3ecabe   Imshann   init
22
23
24
25
26
          esNgAntd.createStyle("ant-grid", style);
          $element[0].removeAttribute("ng-style");
          $element[0].removeAttribute("ng-transclude");
          $element[0].removeAttribute("ng-class");
          $element[0].removeAttribute("span");
81f8a467   Imshann   调整组件前缀
27
28
          if (antdRow) {
              this.antdRow = antdRow.getContext();
3a3ecabe   Imshann   init
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
          }
          if (this.props.span) {
              this.state.className.push("ant-col-" + this.props.span);
          }
          // if (this.props.xs) {
          //     this.state.className.push("col-xs-" + this.props.xs);
          // }
          // if (this.props.sm) {
          //     this.state.className.push("col-sm-" + this.props.sm);
          // }
          // if (this.props.md) {
          //     this.state.className.push("col-md-" + this.props.md);
          // }
          // if (this.props.lg) {
          //     this.state.className.push("col-lg-" + this.props.lg);
          // }
          // this.state.className = this.state.className.join(" ");
      }
  }