Blame view

build/CheckableTag/CheckableTag.js 609 Bytes
3a3ecabe   Imshann   init
1
  import style from "antd/lib/tag/style/index.css";
ee8e8c09   Imshann   优化CheckableTag组件
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  import template from "./CheckableTag.html";
  angular.module("esNgAntd").directive("antdCheckableTag", ["esNgAntd", function (esNgAntd) {
    return {
      template: template,
      restrict: "E",
      replace: true,
      transclude: true,
      scope: {
        checked: "=",
        onChange: "&"
      },
      controller: function ($scope) {
        $scope.handleClick = function () {
          $scope.onChange({
            checked: !($scope.checked === true)
          });
        };
      },
      link: function ($scope) {
        esNgAntd.createStyle("ant-tag", style);
      }
    };
  }]);