Blame view

src/Empty/Empty.js 606 Bytes
3a3ecabe   Imshann   init
1
  import template from "./Empty.html";
1b6f912f   Imshann   优化
2
  import style from "antd/lib/empty/style/index.css";
3a3ecabe   Imshann   init
3
4
  
  class Empty {
d8d2d2b0   Imshann   优化empty组件
5
6
  
      useModules = ["esNgAntd"];
1b6f912f   Imshann   优化
7
8
9
10
11
  
      state = {
          image: this.props.image || "presented_image_default",
      };
  
d8d2d2b0   Imshann   优化empty组件
12
13
      constructor($element) {
          esNgAntd.clearAttribute($element[0], ["ng-class", "image"])
1b6f912f   Imshann   优化
14
15
          esNgAntd.createStyle("ant-empty", style);
      }
d8d2d2b0   Imshann   优化empty组件
16
17
18
19
  
      render() {
          return template;
      }
1b6f912f   Imshann   优化
20
21
  }
  
d8d2d2b0   Imshann   优化empty组件
22
23
24
25
  Empty.propTypes = {
      image: PropTypes.string,
  };
  
1b6f912f   Imshann   优化
26
27
28
29
  export default {
      PRESENTED_IMAGE_DEFAULT: "presented_image_default",
      PRESENTED_IMAGE_SIMPLE: "presented_image_simple",
  };