Blame view

build/Empty/Empty.js 917 Bytes
3a3ecabe   Imshann   init
1
  import template from "./Empty.html";
1b6f912f   Imshann   优化
2
  import style from "antd/lib/empty/style/index.css";
81f8a467   Imshann   调整组件前缀
3
  angular.module("esNgAntd").directive("antdEmpty", function (esNgAntd) {
3a3ecabe   Imshann   init
4
      return {
81f8a467   Imshann   调整组件前缀
5
          controllerAs: "antdEmpty",
3a3ecabe   Imshann   init
6
7
8
          restrict: "E",
          transclude: true,
          replace: true,
1b6f912f   Imshann   优化
9
10
11
          scope: {
              image: "@",
          },
3a3ecabe   Imshann   init
12
          template: template,
81f8a467   Imshann   调整组件前缀
13
          controller: function ($scope, $element, $attrs) {
1b6f912f   Imshann   优化
14
15
16
17
18
19
20
21
22
23
24
              this.getContext = function () {
                  return $scope;
              };
  
              $scope.state = {
                  image: $scope.image || "presented_image_default",
              };
          },
          link: function ($scope, $element, $attrs, $controllers, $transclude) {
              esNgAntd.createStyle("ant-empty", style);
          },
3a3ecabe   Imshann   init
25
26
      };
  });
1b6f912f   Imshann   优化
27
28
29
30
31
  
  export default {
      PRESENTED_IMAGE_DEFAULT: "presented_image_default",
      PRESENTED_IMAGE_SIMPLE: "presented_image_simple",
  };