Blame view

build/Empty/Empty.js 744 Bytes
3a3ecabe   Imshann   init
1
  import template from "./Empty.html";
1b6f912f   Imshann   优化
2
  import style from "antd/lib/empty/style/index.css";
d8d2d2b0   Imshann   优化empty组件
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  angular.module("esNgAntd").directive("antdEmpty", ["esNgAntd", function (esNgAntd) {
    return {
      template: template,
      restrict: "E",
      replace: true,
      transclude: true,
      scope: {
        image: "@"
      },
      controller: function ($scope, $element) {
        $scope.state = {
          image: $scope.image || "presented_image_default"
        };
      },
      link: function ($scope, $element) {
        esNgAntd.clearAttribute($element[0], ["ng-class", "image"]);
        esNgAntd.createStyle("ant-empty", style);
      }
    };
  }]);
1b6f912f   Imshann   优化
23
24
  
  export default {
d8d2d2b0   Imshann   优化empty组件
25
26
27
    PRESENTED_IMAGE_DEFAULT: "presented_image_default",
    PRESENTED_IMAGE_SIMPLE: "presented_image_simple"
  };