Commit 81f8a467b6d48bfd2c40074659dbfea48fb8c8f5

Authored by Imshann
1 parent 6f87698a

调整组件前缀

Showing 90 changed files with 505 additions and 477 deletions   Show diff stats
build/..js 0 → 100644
build/Alert/Alert.html
1 1 <div ng-class="'ant-alert'+(type?' ant-alert-'+type:'')+(!showIcon?' ant-alert-no-icon':'')+(description?' ant-alert-with-description':'')">
2   - <span ng-if="showIcon&&type==='warning'" class="anticon ant-alert-icon"><es-icon type="ExclamationCircleFilled"></es-icon></span>
3   - <span ng-if="showIcon&&type==='success'" class="anticon ant-alert-icon"><es-icon type="CheckCircleFilled"></es-icon></span>
4   - <span ng-if="showIcon&&type==='info'" class="anticon ant-alert-icon"><es-icon type="InfoCircleFilled"></es-icon></span>
5   - <span ng-if="showIcon&&type==='error'" class="anticon ant-alert-icon"><es-icon type="CloseCircleFilled"></es-icon></span>
  2 + <span ng-if="showIcon&&type==='warning'" class="anticon ant-alert-icon"><antd-icon type="ExclamationCircleFilled"></antd-icon></span>
  3 + <span ng-if="showIcon&&type==='success'" class="anticon ant-alert-icon"><antd-icon type="CheckCircleFilled"></antd-icon></span>
  4 + <span ng-if="showIcon&&type==='info'" class="anticon ant-alert-icon"><antd-icon type="InfoCircleFilled"></antd-icon></span>
  5 + <span ng-if="showIcon&&type==='error'" class="anticon ant-alert-icon"><antd-icon type="CloseCircleFilled"></antd-icon></span>
6 6 <div class="ant-alert-content">
7 7 <div class="ant-alert-message">{{message}}</div>
8   - <div ng-if="description" class="ant-alert-description"><es-slot content="{{description}}"></es-slot></div>
  8 + <div ng-if="description" class="ant-alert-description"><antd-slot content="{{description}}"></antd-slot></div>
9 9 </div>
10 10 </div>
11 11 \ No newline at end of file
... ...
build/Alert/Alert.js
1 1 import template from "./Alert.html";
2 2 import style from "antd/lib/alert/style/index.css";
3   -angular.module("esNgAntd").directive("esAlert", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdAlert", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esAlert",
  5 + controllerAs: "antdAlert",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ...
build/Breadcrumb/Breadcrumb.js
1 1 import template from "./Breadcrumb.html";
2 2 import style from "antd/lib/breadcrumb/style/index.css";
3   -angular.module("esNgAntd").directive("esBreadcrumb", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdBreadcrumb", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esBreadcrumb",
  5 + controllerAs: "antdBreadcrumb",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ...
build/BreadcrumbItem/BreadcrumbItem.js
1 1 import template from "./BreadcrumbItem.html";
2   -angular.module("esNgAntd").directive("esBreadcrumbItem", function () {
  2 +angular.module("esNgAntd").directive("antdBreadcrumbItem", function () {
3 3 return {
4   - controllerAs: "esBreadcrumbItem",
  4 + controllerAs: "antdBreadcrumbItem",
5 5 restrict: "E",
6 6 transclude: true,
7 7 replace: true,
... ...
build/Button/Button.html
1 1 <button ng-class="state.className">
2 2 <span ng-if="loading" class="ant-btn-loading-icon">
3 3 <span class="anticon anticon-loading anticon-spin">
4   - <es-icon type="LoadingOutlined"></es-icon>
  4 + <antd-icon type="LoadingOutlined"></antd-icon>
5 5 </span>
6 6 </span>
7 7 <span ng-transclude></span>
... ...
build/Button/Button.js
1 1 import template from "./Button.html";
2 2 import style from "antd/lib/button/style/index.css";
3   -angular.module("esNgAntd").directive("esButton", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdButton", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esButton",
  5 + controllerAs: "antdButton",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ...
build/Card/Card.html
... ... @@ -3,7 +3,7 @@
3 3 <div class="ant-card-head-wrapper">
4 4 <div class="ant-card-head-title">{{title}}</div>
5 5 <div ng-if="extra" class="ant-card-extra">
6   - <es-slot content="{{extra}}" context="esCard.getContext().$parent"></es-slot>
  6 + <antd-slot content="{{extra}}" context="antdCard.getContext().$parent"></antd-slot>
7 7 </div>
8 8 </div>
9 9 </div>
... ...
build/Card/Card.js
1 1 import template from "./Card.html";
2 2 import style from "antd/lib/card/style/index.css";
3   -angular.module("esNgAntd").directive("esCard", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdCard", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esCard",
  5 + controllerAs: "antdCard",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ... @@ -12,7 +12,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esCard&quot;, function (esNgAntd) {
12 12 bordered: "@",
13 13 },
14 14 template: template,
15   - controller: function ($scope, $element) {
  15 + controller: function ($scope, $element, $attrs) {
16 16 this.getContext = function () {
17 17 return $scope;
18 18 };
... ...
build/Cascader/Cascader.html
1 1 <span>
2   - <input placeholder="请选择" class="ant-input ant-cascader-input" readonly autocomplete="off" type="text" ng-focus="handleFocus()" ng-blur="handleBlur()" />
  2 + <input placeholder="请选择" class="ant-input ant-cascader-input" readonly autocomplete="off" type="text" onFocus="handleFocus()" onBlur="handleBlur()" />
3 3 <div class="ant-cascader-menus">
4   - <ul class="ant-cascader-menu" ng-repeat="menu in state.menus track by $index">
  4 + <ul class="ant-cascader-menu" for="menu in state.menus track by $index">
5 5 <li class="ant-cascader-menu-item" ng-mouseover="handleExpand(item.value)" ng-repeat="item in menu track by $index">
6 6 {{item.label}}
7 7 <span class="ant-cascader-menu-item-expand-icon">
... ...
build/Cascader/Cascader.js
... ... @@ -7,16 +7,16 @@
7 7 * @LastEditTime: 2021-08-04 11:00:19
8 8 * @Copyright: Copyright 2021-2021, all rights reserved. Essa.cn
9 9 */
10   -angular.module("esNgAntd").directive("esCascader", function () {
  10 +angular.module("esNgAntd").directive("antdCascader", function () {
11 11 return {
12   - controllerAs: "esCascader",
  12 + controllerAs: "antdCascader",
13 13 restrict: "E",
14 14 transclude: true,
15 15 replace: true,
16 16 scope: {
17 17 options: "=",
18 18 },
19   - controller: function ($scope, $element) {
  19 + controller: function ($scope, $element, $attrs) {
20 20 this.getContext = function () {
21 21 return $scope;
22 22 };
... ...
build/CheckableTag/CheckableTag.js
1 1 import template from "./CheckableTag.html";
2 2 import style from "antd/lib/tag/style/index.css";
3   -angular.module("esNgAntd").directive("esCheckableTag", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdCheckableTag", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esCheckableTag",
  5 + controllerAs: "antdCheckableTag",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ... @@ -11,7 +11,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esCheckableTag&quot;, function (esNgAntd) {
11 11 onChange: "&",
12 12 },
13 13 template: template,
14   - controller: function ($scope, $element) {
  14 + controller: function ($scope, $element, $attrs) {
15 15 this.getContext = function () {
16 16 return $scope;
17 17 };
... ...
build/Checkbox/Checkbox.js
1 1 import template from "./Checkbox.html";
2 2 import style from "antd/lib/checkbox/style/index.css";
3   -angular.module("esNgAntd").directive("esCheckbox", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdCheckbox", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esCheckbox",
  5 + controllerAs: "antdCheckbox",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ... @@ -13,14 +13,14 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esCheckbox&quot;, function (esNgAntd) {
13 13 onChange: "&",
14 14 },
15 15 template: template,
16   - controller: function ($scope, $element) {
  16 + controller: function ($scope, $element, $attrs) {
17 17 this.getContext = function () {
18 18 return $scope;
19 19 };
20 20  
21 21 $scope.state = {
22 22 checked: $scope.checked || $scope.defaultChecked,
23   - disabled: $scope.disabled,
  23 + disabled: false,
24 24 };
25 25 $scope.watch = {
26 26 checked: function (newValue) {
... ... @@ -31,7 +31,10 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esCheckbox&quot;, function (esNgAntd) {
31 31 },
32 32 disabled: function (newValue) {
33 33 if (newValue !== undefined) {
34   - $scope.state.disabled = newValue;
  34 + $scope.state.disabled =
  35 + newValue === "true" || newValue === "disabled"
  36 + ? true
  37 + : false;
35 38 }
36 39 },
37 40 };
... ...
build/Col/Col.html
1   -<div ng-class="'ant-col'+(span?' ant-col-'+span:'')" ng-style="{paddingLeft:esRow.state.gutterHalf+'px',paddingRight:esRow.state.gutterHalf+'px'}" ng-transclude></div>
2 1 \ No newline at end of file
  2 +<div ng-class="'ant-col'+(span?' ant-col-'+span:'')" ng-style="{paddingLeft:antdRow.state.gutterHalf+'px',paddingRight:antdRow.state.gutterHalf+'px'}" ng-transclude></div>
3 3 \ No newline at end of file
... ...
build/Col/Col.js
... ... @@ -3,9 +3,9 @@
3 3 */
4 4 import template from "./Col.html";
5 5 import style from "antd/lib/grid/style/index.css";
6   -angular.module("esNgAntd").directive("esCol", function (esNgAntd) {
  6 +angular.module("esNgAntd").directive("antdCol", function (esNgAntd) {
7 7 return {
8   - controllerAs: "esCol",
  8 + controllerAs: "antdCol",
9 9 restrict: "E",
10 10 transclude: true,
11 11 replace: true,
... ... @@ -13,7 +13,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esCol&quot;, function (esNgAntd) {
13 13 span: "@",
14 14 },
15 15 template: template,
16   - controller: function ($scope, $element) {
  16 + controller: function ($scope, $element, $attrs) {
17 17 this.getContext = function () {
18 18 return $scope;
19 19 };
... ... @@ -22,17 +22,17 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esCol&quot;, function (esNgAntd) {
22 22 className: ["ant-col"],
23 23 };
24 24 },
25   - require: ["?^esRow"],
  25 + require: ["?^antdRow"],
26 26 link: function ($scope, $element, $attrs, $controllers, $transclude) {
27   - let [esRow] = $controllers;
  27 + let [antdRow] = $controllers;
28 28 esNgAntd.createStyle("ant-grid", style);
29 29 $element[0].removeAttribute("ng-style");
30 30 $element[0].removeAttribute("ng-transclude");
31 31 $element[0].removeAttribute("ng-class");
32 32 $element[0].removeAttribute("span");
33 33  
34   - if (esRow) {
35   - $scope.esRow = esRow.getContext();
  34 + if (antdRow) {
  35 + $scope.antdRow = antdRow.getContext();
36 36 }
37 37  
38 38 if ($scope.span) {
... ...
build/Descriptions/Descriptions.html 0 → 100644
build/Descriptions/Descriptions.js
1   -class Descriptions {
2   - props = {};
3   -}
  1 +angular.module("esNgAntd").directive("antdDescriptions", function () {
  2 + return {
  3 + controllerAs: "antdDescriptions",
  4 + restrict: "E",
  5 + transclude: true,
  6 + replace: true,
  7 + scope: {},
  8 + };
  9 +});
... ...
build/Divider/Divider.js
1 1 import template from "./Divider.html";
2 2 import style from "antd/lib/divider/style/index.css";
3   -angular.module("esNgAntd").directive("esDivider", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdDivider", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esDivider",
  5 + controllerAs: "antdDivider",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ...
build/Empty/Empty.js
1 1 import template from "./Empty.html";
2 2 import style from "antd/lib/empty/style/index.css";
3   -angular.module("esNgAntd").directive("esEmpty", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdEmpty", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esEmpty",
  5 + controllerAs: "antdEmpty",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ... @@ -10,7 +10,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esEmpty&quot;, function (esNgAntd) {
10 10 image: "@",
11 11 },
12 12 template: template,
13   - controller: function ($scope, $element) {
  13 + controller: function ($scope, $element, $attrs) {
14 14 this.getContext = function () {
15 15 return $scope;
16 16 };
... ...
build/Form/Form.js
1 1 import template from "./Form.html";
2 2 import style from "antd/lib/form/style/index.css";
3   -angular.module("esNgAntd").directive("esForm", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdForm", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esForm",
  5 + controllerAs: "antdForm",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ... @@ -40,7 +40,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esForm&quot;, function (esNgAntd) {
40 40 $scope.handleSubmit = function () {
41 41 let values = {};
42 42 $scope.state.formItems.forEach(function (item) {
43   - let name = item.esFormItem && item.esFormItem.name;
  43 + let name = item.antdFormItem && item.antdFormItem.name;
44 44 let value = item.value || item.state.value || null;
45 45 values[name] = value;
46 46 });
... ...
build/FormItem/FormItem.html
1 1 <div class="ant-row ant-form-item">
2   - <es-col span="{{state.labelCol}}" class="ant-form-item-label">
  2 + <antd-col span="{{state.labelCol}}" class="ant-form-item-label">
3 3 <label ng-if="label" ng-class="''+required==='true'?'ant-form-item-required':''">{{label}}</label>
4   - </es-col>
5   - <es-col span="{{state.wrapperCol}}" class="ant-form-item-control">
  4 + </antd-col>
  5 + <antd-col span="{{state.wrapperCol}}" class="ant-form-item-control">
6 6 <div class="ant-form-item-control-input">
7 7 <span class="ant-form-item-control-input-content" ng-transclude></span>
8 8 </div>
9   - </es-col>
  9 + </antd-col>
10 10 </div>
11 11 \ No newline at end of file
... ...
build/FormItem/FormItem.js
... ... @@ -9,9 +9,9 @@
9 9 * @Copyright: Copyright 2021-2021, all rights reserved. Essa.cn
10 10 */
11 11 import template from "./FormItem.html";
12   -angular.module("esNgAntd").directive("esFormItem", function () {
  12 +angular.module("esNgAntd").directive("antdFormItem", function () {
13 13 return {
14   - controllerAs: "esFormItem",
  14 + controllerAs: "antdFormItem",
15 15 restrict: "E",
16 16 transclude: true,
17 17 replace: true,
... ... @@ -23,7 +23,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esFormItem&quot;, function () {
23 23 required: "@",
24 24 },
25 25 template: template,
26   - controller: function ($scope, $element) {
  26 + controller: function ($scope, $element, $attrs) {
27 27 this.getContext = function () {
28 28 return $scope;
29 29 };
... ... @@ -33,24 +33,27 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esFormItem&quot;, function () {
33 33 wrapperCol: null,
34 34 };
35 35 },
36   - require: ["?^esForm"],
  36 + require: ["?^antdForm"],
37 37 link: function ($scope, $element, $attrs, $controllers, $transclude) {
38   - let [esForm] = $controllers;
39   - $scope.esForm = esForm.getContext();
  38 + let [antdForm] = $controllers;
  39 + $scope.antdForm = antdForm.getContext();
40 40  
41 41 if ($scope.labelCol && $scope.labelCol.span) {
42 42 $scope.state.labelCol = $scope.labelCol.span;
43   - } else if ($scope.esForm.labelCol && $scope.esForm.labelCol.span) {
44   - $scope.state.labelCol = $scope.esForm.labelCol.span;
  43 + } else if (
  44 + $scope.antdForm.labelCol &&
  45 + $scope.antdForm.labelCol.span
  46 + ) {
  47 + $scope.state.labelCol = $scope.antdForm.labelCol.span;
45 48 }
46 49  
47 50 if ($scope.wrapperCol && $scope.wrapperCol.span) {
48 51 $scope.state.wrapperCol = $scope.wrapperCol.span;
49 52 } else if (
50   - $scope.esForm.wrapperCol &&
51   - $scope.esForm.wrapperCol.span
  53 + $scope.antdForm.wrapperCol &&
  54 + $scope.antdForm.wrapperCol.span
52 55 ) {
53   - $scope.state.wrapperCol = $scope.esForm.wrapperCol.span;
  56 + $scope.state.wrapperCol = $scope.antdForm.wrapperCol.span;
54 57 }
55 58 },
56 59 };
... ...
build/Icon/Icon.js
1 1 import * as iconsSvg from "@ant-design/icons-svg";
2 2 import { renderIconDefinitionToSVGElement } from "@ant-design/icons-svg/es/helpers";
3   -angular.module("esNgAntd").directive("esIcon", function ($compile) {
  3 +angular.module("esNgAntd").directive("antdIcon", function ($compile) {
4 4 return {
5   - controllerAs: "esIcon",
  5 + controllerAs: "antdIcon",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ...
build/Image/Image.js
... ... @@ -2,9 +2,9 @@ import template from &quot;./Image.html&quot;;
2 2 import style from "antd/lib/image/style/index.css";
3 3 angular
4 4 .module("esNgAntd")
5   - .directive("esImage", function ($timeout, esNgAntd, $compile) {
  5 + .directive("antdImage", function ($timeout, esNgAntd, $compile) {
6 6 return {
7   - controllerAs: "esImage",
  7 + controllerAs: "antdImage",
8 8 restrict: "E",
9 9 transclude: true,
10 10 replace: true,
... ... @@ -16,13 +16,13 @@ angular
16 16 preview: "@",
17 17 },
18 18 template: template,
19   - controller: function ($scope, $element) {
  19 + controller: function ($scope, $element, $attrs) {
20 20 this.getContext = function () {
21 21 return $scope;
22 22 };
23 23  
24 24 $scope.state = {
25   - src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEeg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KNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",
  25 + src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElA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JRU5ErkJggg==",
26 26 // 可见性
27 27 visible: false,
28 28 // 有图片?
... ... @@ -32,8 +32,8 @@ angular
32 32 };
33 33  
34 34 $scope.handleOpen = function () {
35   - if ($scope.esImagePreviewGroup) {
36   - $scope.esImagePreviewGroup.handleOpen(
  35 + if ($scope.antdImagePreviewGroup) {
  36 + $scope.antdImagePreviewGroup.handleOpen(
37 37 $scope.state.index
38 38 );
39 39 return;
... ... @@ -58,7 +58,7 @@ angular
58 58 <ul class="ant-image-preview-operations">
59 59 <li class="ant-image-preview-operations-operation">
60 60 <span class="anticon anticon-close ant-image-preview-operations-icon" ng-click="handleClose()">
61   - <es-icon type="CloseOutlined"></es-icon>
  61 + <antd-icon type="CloseOutlined"></antd-icon>
62 62 </span>
63 63 </li>
64 64 </ul>
... ... @@ -75,7 +75,7 @@ angular
75 75 $compile(div)($scope);
76 76 };
77 77 },
78   - require: ["?^esImagePreviewGroup"],
  78 + require: ["?^antdImagePreviewGroup"],
79 79 link: function (
80 80 $scope,
81 81 $element,
... ... @@ -83,7 +83,7 @@ angular
83 83 $controllers,
84 84 $transclude
85 85 ) {
86   - let [esImagePreviewGroup] = $controllers;
  86 + let [antdImagePreviewGroup] = $controllers;
87 87 esNgAntd.createStyle("ant-image", style);
88 88 let src = $scope.state.src;
89 89  
... ... @@ -104,15 +104,14 @@ angular
104 104 $scope.state.src = $scope.dSrc;
105 105 }
106 106  
107   - if (esImagePreviewGroup) {
108   - $scope.esImagePreviewGroup =
109   - esImagePreviewGroup.getContext();
  107 + if (antdImagePreviewGroup) {
  108 + $scope.antdImagePreviewGroup =
  109 + antdImagePreviewGroup.getContext();
110 110 $scope.state.index =
111   - $scope.esImagePreviewGroup.addChildren($scope);
  111 + $scope.antdImagePreviewGroup.addChildren($scope);
112 112 } else {
113 113 $scope.handlePreview();
114 114 }
115 115 },
116 116 };
117 117 });
118   -
... ...
build/ImagePreviewGroup/ImagePreviewGroup.js
1 1 import template from "./ImagePreviewGroup.html";
2 2 angular
3 3 .module("esNgAntd")
4   - .directive("esImagePreviewGroup", function (esNgAntd) {
  4 + .directive("antdImagePreviewGroup", function (esNgAntd) {
5 5 return {
6   - controllerAs: "esImagePreviewGroup",
  6 + controllerAs: "antdImagePreviewGroup",
7 7 restrict: "E",
8 8 transclude: true,
9 9 replace: true,
... ... @@ -96,7 +96,7 @@ angular
96 96 <ul class="ant-image-preview-operations">
97 97 <li class="ant-image-preview-operations-operation">
98 98 <span class="anticon anticon-close ant-image-preview-operations-icon" ng-click="handleClose()">
99   - <es-icon type="CloseOutlined"></es-icon>
  99 + <antd-icon type="CloseOutlined"></antd-icon>
100 100 </span>
101 101 </li>
102 102 </ul>
... ... @@ -104,10 +104,10 @@ angular
104 104 <img class="ant-image-preview-img" ng-src="{{state.src}}"/>
105 105 </div>
106 106 <div ng-class="{'ant-image-preview-switch-left': true, 'ant-image-preview-switch-left-disabled': state.current===0}" ng-click="handlePrev()">
107   - <es-icon type="LeftOutlined"></es-icon>
  107 + <antd-icon type="LeftOutlined"></antd-icon>
108 108 </div>
109 109 <div ng-class="{'ant-image-preview-switch-right': true,'ant-image-preview-switch-right-disabled': (state.childrens.length-1)===state.current}" ng-click="handleNext()">
110   - <es-icon type="RightOutlined"></es-icon>
  110 + <antd-icon type="RightOutlined"></antd-icon>
111 111 </div>
112 112 </div>
113 113 </div>
... ...
build/Input/Input.html
... ... @@ -3,7 +3,7 @@
3 3 <span ng-if="addonBefore||addonAfter" class="ant-input-group-wrapper">
4 4 <span class="ant-input-wrapper ant-input-group">
5 5 <span ng-if="addonBefore" class="ant-input-group-addon">{{addonBefore}}</span>
6   - <input type="text" class="ant-input" ng-value="{{value}}" ng-change="onChange()" ng-model="default" id="{{esFormItem.name}}" />
  6 + <input type="text" class="ant-input" ng-value="{{value}}" ng-change="onChange()" ng-model="default" id="{{antdFormItem.name}}" />
7 7 <span ng-if="addonAfter" class="ant-input-group-addon">{{addonAfter}}</span>
8 8 </span>
9 9 </span>
... ...
build/Input/Input.js
1 1 import style from "antd/lib/input/style/index.css";
2   -angular.module("esNgAntd").directive("esInput", function ($compile, esNgAntd) {
3   - return {
4   - controllerAs: "esInput",
5   - restrict: "E",
6   - transclude: true,
7   - replace: true,
8   - scope: {
9   - value: "@",
10   - placeholder: "@",
11   - addonBefore: "@",
12   - addonAfter: "@",
13   - disabled: "@",
14   - onChange: "&",
15   - maxLength: "@",
16   - },
17   - controller: function ($scope, $element) {
18   - this.getContext = function () {
19   - return $scope;
20   - };
  2 +angular
  3 + .module("esNgAntd")
  4 + .directive("antdInput", function ($compile, esNgAntd) {
  5 + return {
  6 + controllerAs: "antdInput",
  7 + restrict: "E",
  8 + transclude: true,
  9 + replace: true,
  10 + scope: {
  11 + value: "@",
  12 + placeholder: "@",
  13 + addonBefore: "@",
  14 + addonAfter: "@",
  15 + disabled: "@",
  16 + onChange: "&",
  17 + maxLength: "@",
  18 + },
  19 + controller: function ($scope, $element, $attrs) {
  20 + this.getContext = function () {
  21 + return $scope;
  22 + };
21 23  
22   - $scope.state = {
23   - inputEventTarget: null,
24   - };
  24 + $scope.state = {
  25 + inputEventTarget: null,
  26 + };
25 27  
26   - $scope.handleClick = function (event) {
27   - $scope.state.inputEventTarget = event;
28   - };
  28 + $scope.handleClick = function (event) {
  29 + $scope.state.inputEventTarget = event;
  30 + };
29 31  
30   - $scope.handleChange = function () {
31   - $scope.onChange({
32   - event: $scope.state.inputEventTarget,
33   - });
34   - };
  32 + $scope.handleChange = function () {
  33 + $scope.onChange({
  34 + event: $scope.state.inputEventTarget,
  35 + });
  36 + };
35 37  
36   - $scope.getTemplate = function () {
37   - let maxLengthAttribute = "";
38   - let styleAttribute = "";
39   - let idAttribute = "";
  38 + $scope.getTemplate = function () {
  39 + let maxLengthAttribute = "";
  40 + let styleAttribute = "";
  41 + let idAttribute = "";
40 42  
41   - if ($scope.maxLength) {
42   - maxLengthAttribute = `maxlength="${$scope.maxLength}"`;
43   - }
  43 + if ($scope.maxLength) {
  44 + maxLengthAttribute = `maxlength="${$scope.maxLength}"`;
  45 + }
44 46  
45   - if ($scope.style) {
46   - styleAttribute = `style="${$scope.style}"`;
47   - }
  47 + if ($scope.style) {
  48 + styleAttribute = `style="${$scope.style}"`;
  49 + }
48 50  
49   - if ($scope.esFormItem && $scope.esFormItem.name) {
50   - idAttribute = `id="${$scope.esFormItem.name}"`;
51   - }
  51 + if ($scope.antdFormItem && $scope.antdFormItem.name) {
  52 + idAttribute = `id="${$scope.antdFormItem.name}"`;
  53 + }
52 54  
53   - let templates = [
54   - `<input type="text" class="ant-input" placeholder={{placeholder}} ng-change="handleChange()" ng-model="value" ng-focus="handleClick($event)" ng-disabled="disabled==='true'" ${styleAttribute} ${maxLengthAttribute} ${idAttribute}/>`,
55   - `<span class="ant-input-group-wrapper" ng-if="addonBefore||addonAfter">
  55 + let templates = [
  56 + `<input type="text" class="ant-input" placeholder={{placeholder}} ng-change="handleChange()" ng-model="value" ng-focus="handleClick($event)" ng-disabled="disabled==='true'" ${styleAttribute} ${maxLengthAttribute} ${idAttribute}/>`,
  57 + `<span class="ant-input-group-wrapper" ng-if="addonBefore||addonAfter">
56 58 <span class="ant-input-wrapper ant-input-group" style="">
57 59 <span class="ant-input-group-addon" ng-if="addonBefore">{{addonBefore}}</span>
58 60 <input type="text" class="ant-input" ng-change="handleChange()" ng-model="value" ng-focus="handleClick($event)" ng-disabled="disabled==='true'" style="${$scope.style}" ${styleAttribute} ${maxLengthAttribute} ${idAttribute}/>
59 61 <span class="ant-input-group-addon" ng-if="addonAfter">{{addonAfter}}</span>
60 62 </span>
61 63 </span>`,
62   - ];
  64 + ];
63 65  
64   - if ($scope.addonBefore || $scope.addonAfter) {
65   - return templates[1];
66   - } else {
67   - return templates[0];
68   - }
69   - };
70   - },
71   - require: ["?^esFormItem", "?^esForm"],
72   - link: function ($scope, $element, $attrs, $controllers, $transclude) {
73   - let [esFormItem, esForm] = $controllers;
74   - esNgAntd.createStyle("ant-input", style); // 上下文
  66 + if ($scope.addonBefore || $scope.addonAfter) {
  67 + return templates[1];
  68 + } else {
  69 + return templates[0];
  70 + }
  71 + };
  72 + },
  73 + require: ["?^antdFormItem", "?^antdForm"],
  74 + link: function (
  75 + $scope,
  76 + $element,
  77 + $attrs,
  78 + $controllers,
  79 + $transclude
  80 + ) {
  81 + let [antdFormItem, antdForm] = $controllers;
  82 + esNgAntd.createStyle("ant-input", style); // 上下文
75 83  
76   - if (esForm) {
77   - $scope.esForm = esForm.getContext();
78   - $scope.esForm.state.formItems.push($scope);
79   - }
  84 + if (antdForm) {
  85 + $scope.antdForm = antdForm.getContext();
  86 + $scope.antdForm.state.formItems.push($scope);
  87 + }
80 88  
81   - if (esFormItem) {
82   - $scope.esFormItem = esFormItem.getContext();
83   - }
  89 + if (antdFormItem) {
  90 + $scope.antdFormItem = antdFormItem.getContext();
  91 + }
84 92  
85   - $scope.style = $attrs.style;
86   - $element.replaceWith($compile($scope.getTemplate())($scope));
87   - },
88   - };
89   -});
  93 + $scope.style = $attrs.style;
  94 + $element.replaceWith($compile($scope.getTemplate())($scope));
  95 + },
  96 + };
  97 + });
... ...
build/InputGroup/InputGroup.js
1 1 import template from "./InputGroup.html";
2   -angular.module("esNgAntd").directive("esInputGroup", function () {
  2 +angular.module("esNgAntd").directive("antdInputGroup", function () {
3 3 return {
4   - controllerAs: "esInputGroup",
  4 + controllerAs: "antdInputGroup",
5 5 restrict: "E",
6 6 transclude: true,
7 7 replace: true,
... ...
build/InputNumber/InputNumber.js
1 1 import template from "./InputNumber.html";
2   -angular.module("esNgAntd").directive("esInputNumber", function () {
  2 +angular.module("esNgAntd").directive("antdInputNumber", function () {
3 3 return {
4   - controllerAs: "esInputNumber",
  4 + controllerAs: "antdInputNumber",
5 5 restrict: "E",
6 6 transclude: true,
7 7 replace: true,
... ... @@ -18,7 +18,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esInputNumber&quot;, function () {
18 18 parser: "&",
19 19 disabled: "@",
20 20 },
21   - controller: function ($scope, $element) {
  21 + controller: function ($scope, $element, $attrs) {
22 22 this.getContext = function () {
23 23 return $scope;
24 24 };
... ...
build/InputSearch/InputSearch.html
1 1 <span class="ant-input-group-wrapper ant-input-search">
2 2 <span class="ant-input-wrapper ant-input-group">
3   - <es-input placeholder="{{placeholder}}" on-change="handleChange(event)"></es-input>
  3 + <antd-input placeholder="{{placeholder}}" on-change="handleChange(event)"></antd-input>
4 4 <span class="ant-input-group-addon" ng-click="onSearch({value:state.value})">
5   - <es-button html-type="button" class="ant-btn-icon-only ant-input-search-button">
6   - <es-icon type="SearchOutlined"></es-icon>
7   - </es-button>
  5 + <antd-button html-type="button" class="ant-btn-icon-only ant-input-search-button">
  6 + <antd-icon type="SearchOutlined"></antd-icon>
  7 + </antd-button>
8 8 </span>
9 9 </span>
10 10 </span>
11 11 \ No newline at end of file
... ...
build/InputSearch/InputSearch.js
... ... @@ -2,9 +2,9 @@ import template from &quot;./InputSearch.html&quot;;
2 2 import style from "antd/lib/input/style/index.css";
3 3 angular
4 4 .module("esNgAntd")
5   - .directive("esInputSearch", function ($compile, esNgAntd) {
  5 + .directive("antdInputSearch", function ($compile, esNgAntd) {
6 6 return {
7   - controllerAs: "esInputSearch",
  7 + controllerAs: "antdInputSearch",
8 8 restrict: "E",
9 9 transclude: true,
10 10 replace: true,
... ... @@ -14,7 +14,7 @@ angular
14 14 onSearch: "&",
15 15 },
16 16 template: template,
17   - controller: function ($scope, $element) {
  17 + controller: function ($scope, $element, $attrs) {
18 18 this.getContext = function () {
19 19 return $scope;
20 20 };
... ...
build/List/List.html
1 1 <div class="ant-list ant-list-split ant-list-something-after-last-item">
2   - <div class="ant-list-header" ng-if="header">{{header}}</div>
  2 + <div class="ant-list-header" if="header">{{header}}</div>
3 3 <div class="ant-spin-nested-loading">
4 4 <div class="ant-spin-container">
5 5 <ul class="ant-list-items">
... ... @@ -8,5 +8,5 @@
8 8 </ul>
9 9 </div>
10 10 </div>
11   - <div class="ant-list-footer" ng-if="footer">{{footer}}</div>
  11 + <div class="ant-list-footer" if="footer">{{footer}}</div>
12 12 </div>
13 13 \ No newline at end of file
... ...
build/List/List.js
1 1 import template from "./List.html";
2   -angular.module("esNgAntd").directive("esList", function ($compile) {
  2 +angular.module("esNgAntd").directive("antdList", function ($compile) {
3 3 return {
4   - controllerAs: "esList",
  4 + controllerAs: "antdList",
5 5 restrict: "E",
6 6 transclude: true,
7 7 replace: true,
... ...
build/ListItem/ListItem.js
1 1 import template from "./ListItem.html";
2   -angular.module("esNgAntd").directive("esListItem", function () {
  2 +angular.module("esNgAntd").directive("antdListItem", function () {
3 3 return {
4   - controllerAs: "esListItem",
  4 + controllerAs: "antdListItem",
5 5 restrict: "E",
6 6 transclude: true,
7 7 replace: true,
... ...
build/Message/Message.js
... ... @@ -31,7 +31,7 @@ angular
31 31 error: "CloseCircleFilled",
32 32 warning: "InfoCircleFilled",
33 33 };
34   - return `<div class="ant-message-notice"><div class="ant-message-notice-content"><div class="ant-message-custom-content ant-message-${type}"><es-icon type="${icon[type]}"></es-icon><span>${content}</span></div></div></div>`;
  34 + return `<div class="ant-message-notice"><div class="ant-message-notice-content"><div class="ant-message-custom-content ant-message-${type}"><antd-icon type="${icon[type]}"></antd-icon><span>${content}</span></div></div></div>`;
35 35 };
36 36  
37 37 return {
... ...
build/Modal/Modal.html
... ... @@ -6,7 +6,7 @@
6 6 <div class="ant-modal-content">
7 7 <button ng-if="title" type="button" class="ant-modal-close" ng-click="handleClose()">
8 8 <span class="ant-modal-close-x">
9   - <es-icon type="CloseOutlined"></es-icon>
  9 + <antd-icon type="CloseOutlined"></antd-icon>
10 10 </span>
11 11 </button>
12 12 <div ng-if="title" class="ant-modal-header">
... ... @@ -15,12 +15,12 @@
15 15 <div class="ant-modal-body" ng-transclude></div>
16 16 <div ng-if="footer===undefined" class="ant-modal-footer">
17 17 <div>
18   - <es-button ng-click="onCancel()">{{state.cancelText}}</es-button>
19   - <es-button type="primary" ng-click="onOk()">{{state.okText}}</es-button>
  18 + <antd-button ng-click="onCancel()">{{state.cancelText}}</antd-button>
  19 + <antd-button type="primary" ng-click="onOk()">{{state.okText}}</antd-button>
20 20 </div>
21 21 </div>
22 22 <div ng-if="footer!==undefined" class="ant-modal-footer">
23   - <es-slot content="{{footer}}" context="esModal.getContext().$parent"></es-slot>
  23 + <antd-slot content="{{footer}}" context="antdModal.getContext().$parent"></antd-slot>
24 24 </div>
25 25 </div>
26 26 </div>
... ...
build/Modal/Modal.js
1 1 import template from "./Modal.html";
2 2 import style from "antd/lib/modal/style/index.css";
3   -angular.module("esNgAntd").directive("esModal", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdModal", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esModal",
  5 + controllerAs: "antdModal",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ... @@ -17,7 +17,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esModal&quot;, function (esNgAntd) {
17 17 footer: "@",
18 18 },
19 19 template: template,
20   - controller: function ($scope, $element) {
  20 + controller: function ($scope, $element, $attrs) {
21 21 this.getContext = function () {
22 22 return $scope;
23 23 };
... ...
build/Pagination/Pagination.html
... ... @@ -2,31 +2,31 @@
2 2 <li ng-if="showTotal()" class="ant-pagination-total-text">{{handleShowTotal()}}</li>
3 3 <li ng-class="'ant-pagination-prev'+(state.current===1?' ant-pagination-disabled':'')" ng-click="handlePrev()">
4 4 <button type="button" class="ant-pagination-item-link">
5   - <es-icon type="LeftOutlined"></es-icon>
  5 + <antd-icon type="LeftOutlined"></antd-icon>
6 6 </button>
7 7 </li>
8 8 <li ng-repeat="(key, value) in state.pageNumList track by key" ng-class="''+getItemLinkClassName(value)" ng-click="handleClick(value)">
9 9 <a ng-if="value!=='prev'&&value!=='next'">{{value}}</a>
10 10 <a ng-if="value==='prev'||value==='next'" class="ant-pagination-item-link">
11 11 <div class="ant-pagination-item-container">
12   - <es-icon ng-if="value==='prev'" type="DoubleLeftOutlined" class="ant-pagination-item-link-icon"></es-icon>
13   - <es-icon ng-if="value==='next'" type="DoubleRightOutlined" class="ant-pagination-item-link-icon"></es-icon>
  12 + <antd-icon ng-if="value==='prev'" type="DoubleLeftOutlined" class="ant-pagination-item-link-icon"></antd-icon>
  13 + <antd-icon ng-if="value==='next'" type="DoubleRightOutlined" class="ant-pagination-item-link-icon"></antd-icon>
14 14 <span class="ant-pagination-item-ellipsis">•••</span>
15 15 </div>
16 16 </a>
17 17 </li>
18 18 <li ng-class="'ant-pagination-next'+(state.current===state.pageNum?' ant-pagination-disabled':'')" ng-click="handleNext()">
19 19 <button type="button" class="ant-pagination-item-link">
20   - <es-icon type="RightOutlined"></es-icon>
  20 + <antd-icon type="RightOutlined"></antd-icon>
21 21 </button>
22 22 </li>
23 23 <li class="ant-pagination-options">
24   - <es-select ng-if="showSizeChanger==='true'" class="ant-pagination-options-size-changer" size="{{size}}" value="{{state.defaultPageSize}}" get-popup-container="getPopupContainer" on-change="handleSelectChange(value)">
25   - <es-select-option value="10">10 条/页</es-select-option>
26   - <es-select-option value="20">20 条/页</es-select-option>
27   - <es-select-option value="50">50 条/页</es-select-option>
28   - <es-select-option value="100">100 条/页</es-select-option>
29   - </es-select>
  24 + <antd-select ng-if="showSizeChanger==='true'" class="ant-pagination-options-size-changer" size="{{size}}" value="{{state.defaultPageSize}}" get-popup-container="getPopupContainer" on-change="handleSelectChange(value)">
  25 + <antd-select-option value="10">10 条/页</antd-select-option>
  26 + <antd-select-option value="20">20 条/页</antd-select-option>
  27 + <antd-select-option value="50">50 条/页</antd-select-option>
  28 + <antd-select-option value="100">100 条/页</antd-select-option>
  29 + </antd-select>
30 30 <div ng-if="showQuickJumper==='true'" class="ant-pagination-options-quick-jumper">
31 31 跳至<input type="text" ng-blur="handleBlur($event)" ng-keypress="onKeyPress($event)" />页
32 32 </div>
... ...
build/Pagination/Pagination.js
1 1 import template from "./Pagination.html";
2 2 import style from "antd/lib/pagination/style/index.css";
3   -angular.module("esNgAntd").directive("esPagination", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdPagination", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esPagination",
  5 + controllerAs: "antdPagination",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ...
build/Popover/Popover.js
... ... @@ -2,9 +2,9 @@ import template from &quot;./Popover.html&quot;;
2 2 import style from "antd/lib/popover/style/index.css";
3 3 angular
4 4 .module("esNgAntd")
5   - .directive("esPopover", function ($compile, $timeout, esNgAntd) {
  5 + .directive("antdPopover", function ($compile, $timeout, esNgAntd) {
6 6 return {
7   - controllerAs: "esPopover",
  7 + controllerAs: "antdPopover",
8 8 restrict: "E",
9 9 transclude: true,
10 10 replace: true,
... ... @@ -160,7 +160,7 @@ angular
160 160 }
161 161 };
162 162 },
163   - require: ["?^esTable"],
  163 + require: ["?^antdTable"],
164 164 link: function (
165 165 $scope,
166 166 $element,
... ... @@ -168,7 +168,7 @@ angular
168 168 $controllers,
169 169 $transclude
170 170 ) {
171   - let [esTable] = $controllers;
  171 + let [antdTable] = $controllers;
172 172 esNgAntd.createStyle("ant-popover", style);
173 173 $scope.state.target = $element[0];
174 174 let title = $scope.title
... ... @@ -216,7 +216,7 @@ angular
216 216 div.querySelector(".ant-popover-inner-content").innerHTML =
217 217 $scope.state.content;
218 218  
219   - if (!esTable) {
  219 + if (!antdTable) {
220 220 $compile(div.querySelector(".ant-popover-inner-content"))(
221 221 $scope.$parent
222 222 );
... ...
build/Radio/Radio.js
1 1 import template from "./Radio.html";
2 2 import style from "antd/lib/radio/style/index.css";
3   -angular.module("esNgAntd").directive("esRadio", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdRadio", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esRadio",
  5 + controllerAs: "antdRadio",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ... @@ -12,7 +12,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esRadio&quot;, function (esNgAntd) {
12 12 disabled: "@",
13 13 },
14 14 template: template,
15   - controller: function ($scope, $element) {
  15 + controller: function ($scope, $element, $attrs) {
16 16 this.getContext = function () {
17 17 return $scope;
18 18 };
... ... @@ -23,14 +23,14 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esRadio&quot;, function (esNgAntd) {
23 23  
24 24 $scope.handleClick = function (event) {
25 25 event.preventDefault();
26   - $scope.esRadioGroup.setValue(event);
  26 + $scope.antdRadioGroup.setValue(event);
27 27 };
28 28 },
29   - require: ["?^esRadioGroup"],
  29 + require: ["?^antdRadioGroup"],
30 30 link: function ($scope, $element, $attrs, $controllers, $transclude) {
31   - let [esRadioGroup] = $controllers;
32   - $scope.esRadioGroup = esRadioGroup.getContext();
33   - $scope.esRadioGroup.state.childrens.push($scope);
  31 + let [antdRadioGroup] = $controllers;
  32 + $scope.antdRadioGroup = antdRadioGroup.getContext();
  33 + $scope.antdRadioGroup.state.childrens.push($scope);
34 34 esNgAntd.createStyle("ant-radio", style);
35 35 },
36 36 };
... ...
build/RadioButton/RadioButton.html
1   -<label ng-class="'ant-radio-button-wrapper'+(esRadioGroup.state.value===value?' ant-radio-button-wrapper-checked':'')">
  1 +<label ng-class="'ant-radio-button-wrapper'+(antdRadioGroup.state.value===value?' ant-radio-button-wrapper-checked':'')">
2 2 <span class="ant-radio-button">
3 3 <input type="radio" class="ant-radio-button-input" ng-value="{{value}}" ng-click="handleClick($event)" />
4 4 <span class="ant-radio-button-inner"></span>
... ...
build/RadioButton/RadioButton.js
1 1 import template from "./RadioButton.html";
2   -angular.module("esNgAntd").directive("esRadioButton", function () {
  2 +angular.module("esNgAntd").directive("antdRadioButton", function () {
3 3 return {
4   - controllerAs: "esRadioButton",
  4 + controllerAs: "antdRadioButton",
5 5 restrict: "E",
6 6 transclude: true,
7 7 replace: true,
8 8 scope: {
9 9 value: "@",
10 10 },
11   - controller: function ($scope, $element) {
  11 + controller: function ($scope, $element, $attrs) {
12 12 this.getContext = function () {
13 13 return $scope;
14 14 };
... ... @@ -18,13 +18,13 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esRadioButton&quot;, function () {
18 18 };
19 19  
20 20 $scope.handleClick = function (event) {
21   - $scope.esRadioGroup.setValue(event);
  21 + $scope.antdRadioGroup.setValue(event);
22 22 };
23 23 },
24   - require: ["?^esRadioGroup"],
  24 + require: ["?^antdRadioGroup"],
25 25 link: function ($scope, $element, $attrs, $controllers, $transclude) {
26   - let [esRadioGroup] = $controllers;
27   - $scope.esRadioGroup = esRadioGroup.getContext();
  26 + let [antdRadioGroup] = $controllers;
  27 + $scope.antdRadioGroup = antdRadioGroup.getContext();
28 28 $element.removeAttr("value");
29 29 },
30 30 };
... ...
build/RadioGroup/RadioGroup.js
1 1 import template from "./RadioGroup.html";
2   -angular.module("esNgAntd").directive("esRadioGroup", function () {
  2 +angular.module("esNgAntd").directive("antdRadioGroup", function () {
3 3 return {
4   - controllerAs: "esRadioGroup",
  4 + controllerAs: "antdRadioGroup",
5 5 restrict: "E",
6 6 transclude: true,
7 7 replace: true,
... ... @@ -11,7 +11,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esRadioGroup&quot;, function () {
11 11 onChange: "&",
12 12 },
13 13 template: template,
14   - controller: function ($scope, $element) {
  14 + controller: function ($scope, $element, $attrs) {
15 15 this.getContext = function () {
16 16 return $scope;
17 17 };
... ...
build/Row/Row.js
1 1 import template from "./Row.html";
2 2 import style from "antd/lib/grid/style/index.css";
3   -angular.module("esNgAntd").directive("esRow", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdRow", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esRow",
  5 + controllerAs: "antdRow",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ... @@ -10,7 +10,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esRow&quot;, function (esNgAntd) {
10 10 gutter: "@",
11 11 },
12 12 template: template,
13   - controller: function ($scope, $element) {
  13 + controller: function ($scope, $element, $attrs) {
14 14 this.getContext = function () {
15 15 return $scope;
16 16 };
... ...
build/Select/Select.html
... ... @@ -3,7 +3,7 @@
3 3 <span class="ant-select-selection-item">{{state.label}}</span>
4 4 </div>
5 5 <span class="ant-select-arrow">
6   - <es-icon type="DownOutlined"></es-icon>
  6 + <antd-icon type="DownOutlined"></antd-icon>
7 7 </span>
8 8 <span hidden ng-transclude></span>
9 9 </div>
10 10 \ No newline at end of file
... ...
build/Select/Select.js
... ... @@ -2,9 +2,9 @@ import template from &quot;./Select.html&quot;;
2 2 import style from "antd/lib/select/style/index.css";
3 3 angular
4 4 .module("esNgAntd")
5   - .directive("esSelect", function ($compile, $timeout, esNgAntd) {
  5 + .directive("antdSelect", function ($compile, $timeout, esNgAntd) {
6 6 return {
7   - controllerAs: "esSelect",
  7 + controllerAs: "antdSelect",
8 8 restrict: "E",
9 9 transclude: true,
10 10 replace: true,
... ... @@ -143,7 +143,7 @@ angular
143 143 $scope.handleBlur();
144 144 };
145 145 },
146   - require: ["?^esForm", "?^esFormItem"],
  146 + require: ["?^antdForm", "?^antdFormItem"],
147 147 link: function (
148 148 $scope,
149 149 $element,
... ... @@ -151,16 +151,16 @@ angular
151 151 $controllers,
152 152 $transclude
153 153 ) {
154   - let [esForm, esFormItem] = $controllers;
  154 + let [antdForm, antdFormItem] = $controllers;
155 155 esNgAntd.createStyle("ant-select", style);
156 156  
157   - if (esForm) {
158   - $scope.esForm = esForm.getContext();
159   - $scope.esForm.state.formItems.push($scope);
  157 + if (antdForm) {
  158 + $scope.antdForm = antdForm.getContext();
  159 + $scope.antdForm.state.formItems.push($scope);
160 160 }
161 161  
162   - if (esFormItem) {
163   - $scope.esFormItem = esFormItem.getContext();
  162 + if (antdFormItem) {
  163 + $scope.antdFormItem = antdFormItem.getContext();
164 164 }
165 165  
166 166 $timeout(function () {
... ...
build/SelectOption/SelectOption.js
... ... @@ -2,9 +2,9 @@
2 2 * 选项
3 3 */
4 4 import template from "./SelectOption.html";
5   -angular.module("esNgAntd").directive("esSelectOption", function () {
  5 +angular.module("esNgAntd").directive("antdSelectOption", function () {
6 6 return {
7   - controllerAs: "esSelectOption",
  7 + controllerAs: "antdSelectOption",
8 8 restrict: "E",
9 9 transclude: true,
10 10 replace: true,
... ... @@ -12,7 +12,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esSelectOption&quot;, function () {
12 12 value: "@",
13 13 },
14 14 template: template,
15   - controller: function ($scope, $element) {
  15 + controller: function ($scope, $element, $attrs) {
16 16 this.getContext = function () {
17 17 return $scope;
18 18 };
... ... @@ -21,11 +21,11 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esSelectOption&quot;, function () {
21 21 label: null,
22 22 };
23 23 },
24   - require: ["?^esSelect"],
  24 + require: ["?^antdSelect"],
25 25 link: function ($scope, $element, $attrs, $controllers, $transclude) {
26   - let [esSelect] = $controllers;
27   - $scope.esSelect = esSelect.getContext();
28   - $scope.esSelect.addOption({
  26 + let [antdSelect] = $controllers;
  27 + $scope.antdSelect = antdSelect.getContext();
  28 + $scope.antdSelect.addOption({
29 29 value: $scope.value,
30 30 label: null,
31 31 element: $element,
... ...
build/Slot/Slot.js
1   -angular.module("esNgAntd").directive("esSlot", function ($compile) {
  1 +angular.module("esNgAntd").directive("antdSlot", function ($compile) {
2 2 return {
3   - controllerAs: "esSlot",
  3 + controllerAs: "antdSlot",
4 4 restrict: "E",
5 5 transclude: true,
6 6 replace: true,
... ...
build/Space/Space.js
1 1 import template from "./Space.html";
2 2 import style from "antd/lib/space/style/index.css";
3   -angular.module("esNgAntd").directive("esSpace", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdSpace", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esSpace",
  5 + controllerAs: "antdSpace",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ...
build/Spin/Spin.js
1 1 import template from "./Spin.html";
2   -angular.module("esNgAntd").directive("esSpin", function () {
  2 +angular.module("esNgAntd").directive("antdSpin", function () {
3 3 return {
4   - controllerAs: "esSpin",
  4 + controllerAs: "antdSpin",
5 5 restrict: "E",
6 6 transclude: true,
7 7 replace: true,
... ...
build/TabPane/TabPane.js
1 1 import template from "./TabPane.html";
2   -angular.module("esNgAntd").directive("esTabPane", function () {
  2 +angular.module("esNgAntd").directive("antdTabPane", function () {
3 3 return {
4   - controllerAs: "esTabPane",
  4 + controllerAs: "antdTabPane",
5 5 restrict: "E",
6 6 transclude: true,
7 7 replace: true,
... ... @@ -10,7 +10,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esTabPane&quot;, function () {
10 10 tab: "@",
11 11 },
12 12 template: template,
13   - controller: function ($scope, $element) {
  13 + controller: function ($scope, $element, $attrs) {
14 14 this.getContext = function () {
15 15 return $scope;
16 16 };
... ... @@ -22,7 +22,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esTabPane&quot;, function () {
22 22 $scope.watch = {
23 23 tab: function (newVal, oldVal) {
24 24 if (newVal !== oldVal) {
25   - let item = $scope.esTabs.state.labels.find(function (
  25 + let item = $scope.antdTabs.state.labels.find(function (
26 26 item
27 27 ) {
28 28 return item.key === $scope.key;
... ... @@ -39,16 +39,16 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esTabPane&quot;, function () {
39 39 $scope.$watch(key, $scope.watch[key], true);
40 40 }
41 41 },
42   - require: ["?^esTabs"],
  42 + require: ["?^antdTabs"],
43 43 link: function ($scope, $element, $attrs, $controllers, $transclude) {
44   - let [esTabs] = $controllers;
45   - $scope.esTabs = esTabs.getContext();
46   - $scope.esTabs.state.labels.push({
  44 + let [antdTabs] = $controllers;
  45 + $scope.antdTabs = antdTabs.getContext();
  46 + $scope.antdTabs.state.labels.push({
47 47 name: $scope.tab,
48 48 key: $scope.key,
49 49 });
50   - $scope.esTabs.state.childrens.push($scope);
51   - $scope.state.activeKey = $scope.esTabs.state.activeKey;
  50 + $scope.antdTabs.state.childrens.push($scope);
  51 + $scope.state.activeKey = $scope.antdTabs.state.activeKey;
52 52 },
53 53 };
54 54 });
... ...
build/Table/Table.html
1 1 <div class="ant-table-wrapper">
2   - <es-spin spinning="{{loading}}">
3   - <div ng-class="'ant-table ant-table-'+state.size">
4   - <div class="ant-table-content">
5   - <table>
6   - <thead class="ant-table-thead">
7   - <tr>
8   - <th ng-if="rowSelection" class="ant-table-selection-column">
9   - <span class="ant-table-header-column">
10   - <div>
11   - <span class="ant-table-column-title">
12   - <div class="ant-table-selection">
13   - <es-checkbox on-change="handleSelectAll(event)" checked="{{state.isSelectAll}}" />
14   - </div>
  2 + <div ng-class="'ant-table ant-table-'+state.size">
  3 + <div class="ant-table-content">
  4 + <table>
  5 + <thead class="ant-table-thead">
  6 + <tr>
  7 + <th ng-if="rowSelection" class="ant-table-selection-column">
  8 + <span class="ant-table-header-column">
  9 + <div>
  10 + <span class="ant-table-column-title">
  11 + <div class="ant-table-selection">
  12 + <antd-checkbox on-change="handleSelectAll(event)" checked="{{state.isSelectAll}}" />
  13 + </div>
  14 + </span>
  15 + </div>
  16 + </span>
  17 + </th>
  18 + <th ng-repeat="(key, column) in columns" class="ant-table-cell ant-table-column-has-sorters" ng-style="{width:column.width}">
  19 + <span ng-if="!column.sorter">{{column.title}}</span>
  20 + <div ng-if="column.sorter" class="ant-table-column-sorters" ng-click="handleSorter(column.key)">
  21 + <span class="ant-table-column-title">{{column.title}}</span>
  22 + <span class="ant-table-column-sorter ant-table-column-sorter-full">
  23 + <span class="ant-table-column-sorter-inner">
  24 + <antd-icon type="CaretUpOutlined" ng-class="'ant-table-column-sorter-up'+(state.sorter.field===column.key&&state.sorter.order==='ascend'?' active':'')"></antd-icon>
  25 + <antd-icon type="CaretDownOutlined" ng-class="'ant-table-column-sorter-down'+(state.sorter.field===column.key&&state.sorter.order==='descend'?' active':'')"></antd-icon>
15 26 </span>
16   - </div>
17   - </span>
  27 + </span>
  28 + </div>
18 29 </th>
19   - <th ng-repeat="(key, column) in columns track by key" class="ant-table-cell ant-table-column-has-sorters" ng-style="{width:column.width}">
20   - <span ng-if="!column.sorter">{{column.title}}</span>
21   - <div ng-if="column.sorter" class="ant-table-column-sorters" ng-click="handleSorter(column.key)">
22   - <span class="ant-table-column-title">{{column.title}}</span>
23   - <span class="ant-table-column-sorter ant-table-column-sorter-full">
24   - <span class="ant-table-column-sorter-inner">
25   - <es-icon type="CaretUpOutlined" ng-class="'ant-table-column-sorter-up'+(state.sorter.field===column.key&&state.sorter.order==='ascend'?' active':'')"></es-icon>
26   - <es-icon type="CaretDownOutlined" ng-class="'ant-table-column-sorter-down'+(state.sorter.field===column.key&&state.sorter.order==='descend'?' active':'')"></es-icon>
27   - </span>
28   - </span>
29   - </div>
30   - </th>
31   - </tr>
32   - </thead>
33   - <tbody class="ant-table-tbody">
34   - <tr ng-repeat="(key, record) in state.dataSource track by record[state.rowKey]" class="ant-table-row">
35   - <td ng-if="rowSelection" class="ant-table-selection-column">
36   - <span>
37   - <es-checkbox checked="record.checked" disabled="record.disabled" on-change="handleSelect(event,$index)" />
38   - </span>
39   - </td>
40   - <td ng-repeat="(key, column) in columns track by key" data-key="{{column.key}}">
41   - <es-slot content="{{record[column.key]}}" context="esTable.getContext().$parent" />
42   - </td>
43   - </tr>
44   - <tr ng-if="state.dataSource.length===0" class="ant-table-placeholder">
45   - <td colspan="{{rowSelection?columns.length+1:columns.length}}">
46   - <es-empty image="presented_image_simple"></es-empty>
47   - </td>
48   - </tr>
49   - </tbody>
50   - </table>
51   - </div>
  30 + </tr>
  31 + </thead>
  32 + <tbody class="ant-table-tbody">
  33 + <tr ng-repeat="(key, record) in state.dataSource track by record[state.rowKey]" class="ant-table-row">
  34 + <td ng-if="rowSelection" class="ant-table-selection-column">
  35 + <span>
  36 + <antd-checkbox checked="{{record.checked}}" disabled="{{record.disabled}}" on-change="handleSelect(event,$index)" />
  37 + </span>
  38 + </td>
  39 + <td ng-repeat="(key, column) in columns track by key" data-key="{{column.key}}">
  40 + <antd-slot content="{{record[column.key]}}" context="antdTable.getContext().$parent" />
  41 + </td>
  42 + </tr>
  43 + <tr ng-if="state.dataSource.length===0" class="ant-table-placeholder">
  44 + <td colspan="{{rowSelection?columns.length+1:columns.length}}">
  45 + <antd-empty image="presented_image_simple"></antd-empty>
  46 + </td>
  47 + </tr>
  48 + </tbody>
  49 + </table>
52 50 </div>
53   - </es-spin>
  51 + </div>
54 52 </div>
55 53 \ No newline at end of file
... ...
build/Table/Table.js
1 1 import template from "./Table.html";
2 2 import style from "antd/lib/table/style/index.css";
3   -angular.module("esNgAntd").directive("esTable", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdTable", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esTable",
  5 + controllerAs: "antdTable",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ...
build/Tabs/Tabs.js
1 1 import template from "./Tabs.html";
2 2 import style from "antd/lib/tabs/style/index.css";
3   -angular.module("esNgAntd").directive("esTabs", function (esNgAntd) {
  3 +angular.module("esNgAntd").directive("antdTabs", function (esNgAntd) {
4 4 return {
5   - controllerAs: "esTabs",
  5 + controllerAs: "antdTabs",
6 6 restrict: "E",
7 7 transclude: true,
8 8 replace: true,
... ... @@ -11,7 +11,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esTabs&quot;, function (esNgAntd) {
11 11 onChange: "&",
12 12 },
13 13 template: template,
14   - controller: function ($scope, $element) {
  14 + controller: function ($scope, $element, $attrs) {
15 15 this.getContext = function () {
16 16 return $scope;
17 17 };
... ...
build/Tag/Tag.html 0 → 100644
build/Tag/Tag.js
1 1 import template from "./Tag.html";
2   -
3   -class Tag {}
  2 +angular.module("esNgAntd").directive("antdTag", function () {
  3 + return {
  4 + controllerAs: "antdTag",
  5 + restrict: "E",
  6 + transclude: true,
  7 + replace: true,
  8 + };
  9 +});
... ...
build/Textarea/Textarea.html
1 1 <div>
2   - <textarea class="ant-input" rows="4" ng-model="state.value" ng-change="handleChange()" placeholder="{{placeholder}}" ng-keyup="handleKeyup($event)" ng-click="handleClick($event)" maxlength="{{state.maxLength}}"></textarea>
  2 + <textarea class="ant-input" rows="4" ng-model="state.value" on-change="handleChange()" placeholder="{{placeholder}}" ng-keyup="handleKeyup($event)" ng-click="handleClick($event)" maxlength="{{state.maxLength}}"></textarea>
3 3 </div>
4 4 \ No newline at end of file
... ...
build/Textarea/Textarea.js
... ... @@ -3,9 +3,9 @@
3 3 */
4 4 import template from "./Textarea.html";
5 5 import style from "antd/lib/input/style/index.css";
6   -angular.module("esNgAntd").directive("esTextarea", function () {
  6 +angular.module("esNgAntd").directive("antdTextarea", function () {
7 7 return {
8   - controllerAs: "esTextarea",
  8 + controllerAs: "antdTextarea",
9 9 restrict: "E",
10 10 transclude: true,
11 11 replace: true,
... ... @@ -18,7 +18,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;esTextarea&quot;, function () {
18 18 value: "@",
19 19 },
20 20 template: template,
21   - controller: function ($scope, $element) {
  21 + controller: function ($scope, $element, $attrs) {
22 22 this.getContext = function () {
23 23 return $scope;
24 24 };
... ...
dist/ng-antd.js
... ... @@ -82,7 +82,7 @@ eval(&quot;__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Che
82 82 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
83 83  
84 84 "use strict";
85   -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Checkbox_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Checkbox.html */ \"./build/Checkbox/Checkbox.html\");\n/* harmony import */ var antd_lib_checkbox_style_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/checkbox/style/index.css */ \"./node_modules/antd/lib/checkbox/style/index.css\");\n\n\nangular.module(\"esNgAntd\").directive(\"esCheckbox\", function (esNgAntd) {\n return {\n controllerAs: \"esCheckbox\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n defaultChecked: \"@\",\n checked: \"@\",\n disabled: \"@\",\n onChange: \"&\",\n },\n template: _Checkbox_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n checked: $scope.checked || $scope.defaultChecked,\n disabled: $scope.disabled,\n };\n $scope.watch = {\n checked: function (newValue) {\n if (newValue !== undefined) {\n $scope.state.checked =\n newValue === \"true\" ? true : false;\n }\n },\n disabled: function (newValue) {\n if (newValue !== undefined) {\n $scope.state.disabled = newValue;\n }\n },\n };\n\n for (const key in $scope.watch) {\n $scope.$watch(key, $scope.watch[key], true);\n }\n\n $scope.handleClick = function ($event) {\n $scope.state.checked = !$scope.state.checked;\n $scope.onChange({\n event: $event,\n });\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-checkbox\", antd_lib_checkbox_style_index_css__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Checkbox/Checkbox.js?");
  85 +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Checkbox_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Checkbox.html */ \"./build/Checkbox/Checkbox.html\");\n/* harmony import */ var antd_lib_checkbox_style_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/checkbox/style/index.css */ \"./node_modules/antd/lib/checkbox/style/index.css\");\n\n\nangular.module(\"esNgAntd\").directive(\"esCheckbox\", function (esNgAntd) {\n return {\n controllerAs: \"esCheckbox\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n defaultChecked: \"@\",\n checked: \"@\",\n disabled: \"@\",\n onChange: \"&\",\n },\n template: _Checkbox_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element, $attrs) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n checked: $scope.checked || $scope.defaultChecked,\n disabled: false,\n };\n $scope.watch = {\n checked: function (newValue) {\n if (newValue !== undefined) {\n $scope.state.checked =\n newValue === \"true\" ? true : false;\n }\n },\n disabled: function (newValue) {\n if (newValue !== undefined) {\n $scope.state.disabled =\n newValue === \"true\" || newValue === \"disabled\"\n ? true\n : false;\n }\n },\n };\n\n for (const key in $scope.watch) {\n $scope.$watch(key, $scope.watch[key], true);\n }\n\n $scope.handleClick = function ($event) {\n $scope.state.checked = !$scope.state.checked;\n $scope.onChange({\n event: $event,\n });\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-checkbox\", antd_lib_checkbox_style_index_css__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Checkbox/Checkbox.js?");
86 86  
87 87 /***/ }),
88 88  
... ... @@ -9771,7 +9771,7 @@ eval(&quot;__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
9771 9771 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9772 9772  
9773 9773 "use strict";
9774   -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"<div class=\\\"ant-table-wrapper\\\">\\n <es-spin spinning=\\\"{{loading}}\\\">\\n <div ng-class=\\\"'ant-table ant-table-'+state.size\\\">\\n <div class=\\\"ant-table-content\\\">\\n <table>\\n <thead class=\\\"ant-table-thead\\\">\\n <tr>\\n <th ng-if=\\\"rowSelection\\\" class=\\\"ant-table-selection-column\\\">\\n <span class=\\\"ant-table-header-column\\\">\\n <div>\\n <span class=\\\"ant-table-column-title\\\">\\n <div class=\\\"ant-table-selection\\\">\\n <es-checkbox on-change=\\\"handleSelectAll(event)\\\" checked=\\\"{{state.isSelectAll}}\\\" />\\n </div>\\n </span>\\n </div>\\n </span>\\n </th>\\n <th ng-repeat=\\\"(key, column) in columns track by key\\\" class=\\\"ant-table-cell ant-table-column-has-sorters\\\" ng-style=\\\"{width:column.width}\\\">\\n <span ng-if=\\\"!column.sorter\\\">{{column.title}}</span>\\n <div ng-if=\\\"column.sorter\\\" class=\\\"ant-table-column-sorters\\\" ng-click=\\\"handleSorter(column.key)\\\">\\n <span class=\\\"ant-table-column-title\\\">{{column.title}}</span>\\n <span class=\\\"ant-table-column-sorter ant-table-column-sorter-full\\\">\\n <span class=\\\"ant-table-column-sorter-inner\\\">\\n <es-icon type=\\\"CaretUpOutlined\\\" ng-class=\\\"'ant-table-column-sorter-up'+(state.sorter.field===column.key&&state.sorter.order==='ascend'?' active':'')\\\"></es-icon>\\n <es-icon type=\\\"CaretDownOutlined\\\" ng-class=\\\"'ant-table-column-sorter-down'+(state.sorter.field===column.key&&state.sorter.order==='descend'?' active':'')\\\"></es-icon>\\n </span>\\n </span>\\n </div>\\n </th>\\n </tr>\\n </thead>\\n <tbody class=\\\"ant-table-tbody\\\">\\n <tr ng-repeat=\\\"(key, record) in state.dataSource track by record[state.rowKey]\\\" class=\\\"ant-table-row\\\">\\n <td ng-if=\\\"rowSelection\\\" class=\\\"ant-table-selection-column\\\">\\n <span>\\n <es-checkbox checked=\\\"record.checked\\\" disabled=\\\"record.disabled\\\" on-change=\\\"handleSelect(event,$index)\\\" />\\n </span>\\n </td>\\n <td ng-repeat=\\\"(key, column) in columns track by key\\\" data-key=\\\"{{column.key}}\\\">\\n <es-slot content=\\\"{{record[column.key]}}\\\" context=\\\"esTable.getContext().$parent\\\" />\\n </td>\\n </tr>\\n <tr ng-if=\\\"state.dataSource.length===0\\\" class=\\\"ant-table-placeholder\\\">\\n <td colspan=\\\"{{rowSelection?columns.length+1:columns.length}}\\\">\\n <es-empty image=\\\"presented_image_simple\\\"></es-empty>\\n </td>\\n </tr>\\n </tbody>\\n </table>\\n </div>\\n </div>\\n </es-spin>\n</div>\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Table/Table.html?");
  9774 +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"<div class=\\\"ant-table-wrapper\\\">\\n <div ng-class=\\\"'ant-table ant-table-'+state.size\\\">\\n <div class=\\\"ant-table-content\\\">\\n <table>\\n <thead class=\\\"ant-table-thead\\\">\\n <tr>\\n <th ng-if=\\\"rowSelection\\\" class=\\\"ant-table-selection-column\\\">\\n <span class=\\\"ant-table-header-column\\\">\\n <div>\\n <span class=\\\"ant-table-column-title\\\">\\n <div class=\\\"ant-table-selection\\\">\\n <es-checkbox on-change=\\\"handleSelectAll(event)\\\" checked=\\\"{{state.isSelectAll}}\\\" />\\n </div>\\n </span>\\n </div>\\n </span>\\n </th>\\n <th ng-repeat=\\\"(key, column) in columns\\\" class=\\\"ant-table-cell ant-table-column-has-sorters\\\" ng-style=\\\"{width:column.width}\\\">\\n <span ng-if=\\\"!column.sorter\\\">{{column.title}}</span>\\n <div ng-if=\\\"column.sorter\\\" class=\\\"ant-table-column-sorters\\\" ng-click=\\\"handleSorter(column.key)\\\">\\n <span class=\\\"ant-table-column-title\\\">{{column.title}}</span>\\n <span class=\\\"ant-table-column-sorter ant-table-column-sorter-full\\\">\\n <span class=\\\"ant-table-column-sorter-inner\\\">\\n <es-icon type=\\\"CaretUpOutlined\\\" ng-class=\\\"'ant-table-column-sorter-up'+(state.sorter.field===column.key&&state.sorter.order==='ascend'?' active':'')\\\"></es-icon>\\n <es-icon type=\\\"CaretDownOutlined\\\" ng-class=\\\"'ant-table-column-sorter-down'+(state.sorter.field===column.key&&state.sorter.order==='descend'?' active':'')\\\"></es-icon>\\n </span>\\n </span>\\n </div>\\n </th>\\n </tr>\\n </thead>\\n <tbody class=\\\"ant-table-tbody\\\">\\n <tr ng-repeat=\\\"(key, record) in state.dataSource track by record[state.rowKey]\\\" class=\\\"ant-table-row\\\">\\n <td ng-if=\\\"rowSelection\\\" class=\\\"ant-table-selection-column\\\">\\n <span>\\n <es-checkbox checked=\\\"{{record.checked}}\\\" disabled=\\\"{{record.disabled}}\\\" on-change=\\\"handleSelect(event,$index)\\\" />\\n </span>\\n </td>\\n <td ng-repeat=\\\"(key, column) in columns track by key\\\" data-key=\\\"{{column.key}}\\\">\\n <es-slot content=\\\"{{record[column.key]}}\\\" context=\\\"esTable.getContext().$parent\\\" />\\n </td>\\n </tr>\\n <tr ng-if=\\\"state.dataSource.length===0\\\" class=\\\"ant-table-placeholder\\\">\\n <td colspan=\\\"{{rowSelection?columns.length+1:columns.length}}\\\">\\n <es-empty image=\\\"presented_image_simple\\\"></es-empty>\\n </td>\\n </tr>\\n </tbody>\\n </table>\\n </div>\\n </div>\n</div>\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Table/Table.html?");
9775 9775  
9776 9776 /***/ }),
9777 9777  
... ...
example/modal.html
... ... @@ -10,9 +10,10 @@
10 10 <div ng-app="esNgAntd" ng-controller="mainCtrl">
11 11 <div class="container" style="padding: 50px">
12 12 <button ng-click="showModal()">Open Modal</button>
13   - <es-modal visible="{{visible}}" title="Modal" footer="footer" on-cancel="handleCancel()" on-ok="handleOk()">
14   - <div>I am div.</div>
15   - </es-modal>
  13 + <es-table columns="columns" ng-if="visible"></es-table>
  14 + <!-- <es-modal visible="{{visible}}" title="Modal" on-cancel="handleCancel()" on-ok="handleOk()">
  15 + <es-button>123123</es-button>
  16 + </es-modal> -->
16 17 </div>
17 18 </div>
18 19 <script src="https://cdn.staticfile.org/angular.js/1.2.28/angular.min.js"></script>
... ... @@ -21,10 +22,14 @@
21 22 angular
22 23 .module("esNgAntd")
23 24 .controller("mainCtrl", function ($scope) {
  25 + $scope.columns = [{
  26 + title: "AAA",
  27 + key: "aaa"
  28 + }]
24 29 $scope.visible = true;
25 30 $scope.footer = `<es-button ng-click="handleCancel()">确认可以</es-button>`;
26 31 $scope.showModal = function () {
27   - $scope.visible = true;
  32 + $scope.visible = !$scope.visible;
28 33 }
29 34 $scope.handleCancel = function() {
30 35 $scope.visible = false;
... ...
src/.DS_Store deleted
No preview for this file type
src/Alert/Alert.html
1 1 <div className={'ant-alert' + (type ? " ant-alert-" + type : "") + (!showIcon ? " ant-alert-no-icon" : "") + (description?" ant-alert-with-description":"")}>
2   - {showIcon && type === 'warning' && <span className="anticon ant-alert-icon"><es-icon type="ExclamationCircleFilled"></es-icon></span>}
3   - {showIcon && type === 'success' && <span className="anticon ant-alert-icon"><es-icon type="CheckCircleFilled"></es-icon></span>}
4   - {showIcon && type === 'info' && <span className="anticon ant-alert-icon"><es-icon type="InfoCircleFilled"></es-icon></span>}
5   - {showIcon && type === 'error' && <span className="anticon ant-alert-icon"><es-icon type="CloseCircleFilled"></es-icon></span>}
  2 + {showIcon && type === 'warning' && <span className="anticon ant-alert-icon"><antd-icon type="ExclamationCircleFilled"></antd-icon></span>}
  3 + {showIcon && type === 'success' && <span className="anticon ant-alert-icon"><antd-icon type="CheckCircleFilled"></antd-icon></span>}
  4 + {showIcon && type === 'info' && <span className="anticon ant-alert-icon"><antd-icon type="InfoCircleFilled"></antd-icon></span>}
  5 + {showIcon && type === 'error' && <span className="anticon ant-alert-icon"><antd-icon type="CloseCircleFilled"></antd-icon></span>}
6 6 <div className="ant-alert-content">
7 7 <div className="ant-alert-message">{message}</div>
8   - {description && <div className="ant-alert-description" ><es-slot content="{{description}}"></es-slot></div>}
  8 + {description && <div className="ant-alert-description" ><antd-slot content="{{description}}"></antd-slot></div>}
9 9 </div>
10 10 </div>
11 11 \ No newline at end of file
... ...
src/Button/Button.html
1 1 <button className={state.className}>
2 2 {loading && <span className="ant-btn-loading-icon">
3 3 <span className="anticon anticon-loading anticon-spin">
4   - <es-icon type="LoadingOutlined"></es-icon>
  4 + <antd-icon type="LoadingOutlined"></antd-icon>
5 5 </span>
6 6 </span>}
7 7 <span>{children}</span>
... ...
src/Card/Card.html
... ... @@ -3,7 +3,7 @@
3 3 <div class="ant-card-head-wrapper">
4 4 <div class="ant-card-head-title">{title}</div>
5 5 {extra && <div class="ant-card-extra">
6   - <es-slot content="{{extra}}" context="esCard.getContext().$parent"></es-slot>
  6 + <antd-slot content="{{extra}}" context="antdCard.getContext().$parent"></antd-slot>
7 7 </div>}
8 8 </div>
9 9 </div>}
... ...
src/Checkbox/Checkbox.js
... ... @@ -2,7 +2,6 @@ import template from &quot;./Checkbox.html&quot;;
2 2 import style from "antd/lib/checkbox/style/index.css";
3 3  
4 4 class Checkbox {
5   -
6 5 useModules = ["esNgAntd"];
7 6  
8 7 template = template;
... ... @@ -16,8 +15,8 @@ class Checkbox {
16 15  
17 16 state = {
18 17 checked: this.props.checked || this.props.defaultChecked,
19   - disabled: this.props.disabled
20   - }
  18 + disabled: false,
  19 + };
21 20  
22 21 watch = {
23 22 checked: function (newValue) {
... ... @@ -27,14 +26,17 @@ class Checkbox {
27 26 },
28 27 disabled: function (newValue) {
29 28 if (newValue !== undefined) {
30   - this.state.disabled = newValue
  29 + this.state.disabled =
  30 + newValue === "true" || newValue === "disabled"
  31 + ? true
  32 + : false;
31 33 }
32   - }
33   - }
  34 + },
  35 + };
34 36  
35 37 handleClick($event) {
36 38 this.state.checked = !this.state.checked;
37   - this.props.onChange({event: $event})
  39 + this.props.onChange({ event: $event });
38 40 }
39 41  
40 42 constructor() {
... ...
src/Col/Col.html
1   -<div className={"ant-col"+(span?" ant-col-"+span: "")} style={{ paddingLeft: esRow.state.gutterHalf + 'px', paddingRight: esRow.state.gutterHalf + 'px' }}>{children}</div>
2 1 \ No newline at end of file
  2 +<div className={"ant-col"+(span?" ant-col-"+span: "")} style={{ paddingLeft: antdRow.state.gutterHalf + 'px', paddingRight: antdRow.state.gutterHalf + 'px' }}>{children}</div>
3 3 \ No newline at end of file
... ...
src/Col/Col.js
... ... @@ -18,14 +18,14 @@ class Col {
18 18  
19 19 template = template;
20 20  
21   - constructor(esRow) {
  21 + constructor(antdRow) {
22 22 esNgAntd.createStyle("ant-grid", style);
23 23 $element[0].removeAttribute("ng-style");
24 24 $element[0].removeAttribute("ng-transclude");
25 25 $element[0].removeAttribute("ng-class");
26 26 $element[0].removeAttribute("span");
27   - if (esRow) {
28   - this.esRow = esRow.getContext();
  27 + if (antdRow) {
  28 + this.antdRow = antdRow.getContext();
29 29 }
30 30 if (this.props.span) {
31 31 this.state.className.push("ant-col-" + this.props.span);
... ...
src/Form/Form.js
... ... @@ -51,7 +51,7 @@ class Form {
51 51 handleSubmit() {
52 52 let values = {};
53 53 this.state.formItems.forEach(function (item) {
54   - let name = item.esFormItem && item.esFormItem.name;
  54 + let name = item.antdFormItem && item.antdFormItem.name;
55 55 let value = item.value || item.state.value || null;
56 56 values[name] = value;
57 57 });
... ...
src/FormItem/FormItem.html
1 1 <div className="ant-row ant-form-item">
2   - <es-col span={state.labelCol} className="ant-form-item-label">
  2 + <antd-col span={state.labelCol} className="ant-form-item-label">
3 3 {label && <label className={""+ required === "true" ? "ant-form-item-required" : ""}>{label}</label>}
4   - </es-col>
5   - <es-col span={state.wrapperCol} className="ant-form-item-control">
  4 + </antd-col>
  5 + <antd-col span={state.wrapperCol} className="ant-form-item-control">
6 6 <div className="ant-form-item-control-input">
7 7 <span className="ant-form-item-control-input-content">{children}</span>
8 8 </div>
9   - </es-col>
  9 + </antd-col>
10 10 </div>
11 11 \ No newline at end of file
... ...
src/FormItem/FormItem.js
... ... @@ -25,25 +25,25 @@ class FormItem {
25 25  
26 26 template = template;
27 27  
28   - constructor(esForm) {
29   - this.esForm = esForm.getContext();
  28 + constructor(antdForm) {
  29 + this.antdForm = antdForm.getContext();
30 30  
31 31 if (this.props.labelCol && this.props.labelCol.span) {
32 32 this.state.labelCol = this.props.labelCol.span;
33 33 } else if (
34   - this.esForm.labelCol &&
35   - this.esForm.labelCol.span
  34 + this.antdForm.labelCol &&
  35 + this.antdForm.labelCol.span
36 36 ) {
37   - this.state.labelCol = this.esForm.labelCol.span;
  37 + this.state.labelCol = this.antdForm.labelCol.span;
38 38 }
39 39  
40 40 if (this.props.wrapperCol && this.props.wrapperCol.span) {
41 41 this.state.wrapperCol = this.props.wrapperCol.span;
42 42 } else if (
43   - this.esForm.wrapperCol &&
44   - this.esForm.wrapperCol.span
  43 + this.antdForm.wrapperCol &&
  44 + this.antdForm.wrapperCol.span
45 45 ) {
46   - this.state.wrapperCol = this.esForm.wrapperCol.span;
  46 + this.state.wrapperCol = this.antdForm.wrapperCol.span;
47 47 }
48 48 }
49 49 }
... ...
src/Image/Image.js
... ... @@ -10,7 +10,7 @@ class Image {
10 10 preview: Boolean
11 11 };
12 12 state = {
13   - src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEg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MjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",
  13 + src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQ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XI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",
14 14 // 可见性
15 15 visible: false,
16 16 // 有图片?
... ... @@ -21,11 +21,11 @@ class Image {
21 21  
22 22 template = template;
23 23  
24   - require = ["esImagePreviewGroup"]
  24 + require = ["antdImagePreviewGroup"]
25 25  
26 26 useModules = ["$timeout", "esNgAntd", "$compile"];
27 27  
28   - constructor(esImagePreviewGroup) {
  28 + constructor(antdImagePreviewGroup) {
29 29 esNgAntd.createStyle("ant-image", style);
30 30 let src = this.state.src;
31 31 $element.children("img")[0].onerror = function () {
... ... @@ -44,17 +44,17 @@ class Image {
44 44 this.state.src = this.props.dSrc;
45 45 }
46 46  
47   - if (esImagePreviewGroup) {
48   - this.esImagePreviewGroup = esImagePreviewGroup.getContext();
49   - this.state.index = this.esImagePreviewGroup.addChildren($scope);
  47 + if (antdImagePreviewGroup) {
  48 + this.antdImagePreviewGroup = antdImagePreviewGroup.getContext();
  49 + this.state.index = this.antdImagePreviewGroup.addChildren($scope);
50 50 } else {
51 51 this.handlePreview();
52 52 }
53 53 }
54 54  
55 55 handleOpen() {
56   - if (this.esImagePreviewGroup) {
57   - this.esImagePreviewGroup.handleOpen(this.state.index);
  56 + if (this.antdImagePreviewGroup) {
  57 + this.antdImagePreviewGroup.handleOpen(this.state.index);
58 58 return;
59 59 }
60 60 this.state.visible = true;
... ... @@ -76,7 +76,7 @@ class Image {
76 76 <ul class="ant-image-preview-operations">
77 77 <li class="ant-image-preview-operations-operation">
78 78 <span class="anticon anticon-close ant-image-preview-operations-icon" ng-click="handleClose()">
79   - <es-icon type="CloseOutlined"></es-icon>
  79 + <antd-icon type="CloseOutlined"></antd-icon>
80 80 </span>
81 81 </li>
82 82 </ul>
... ...
src/ImagePreviewGroup/ImagePreviewGroup.js
... ... @@ -85,7 +85,7 @@ class ImagePreviewGroup {
85 85 <ul class="ant-image-preview-operations">
86 86 <li class="ant-image-preview-operations-operation">
87 87 <span class="anticon anticon-close ant-image-preview-operations-icon" ng-click="handleClose()">
88   - <es-icon type="CloseOutlined"></es-icon>
  88 + <antd-icon type="CloseOutlined"></antd-icon>
89 89 </span>
90 90 </li>
91 91 </ul>
... ... @@ -93,10 +93,10 @@ class ImagePreviewGroup {
93 93 <img class="ant-image-preview-img" ng-src="{{state.src}}"/>
94 94 </div>
95 95 <div ng-class="{'ant-image-preview-switch-left': true, 'ant-image-preview-switch-left-disabled': state.current===0}" ng-click="handlePrev()">
96   - <es-icon type="LeftOutlined"></es-icon>
  96 + <antd-icon type="LeftOutlined"></antd-icon>
97 97 </div>
98 98 <div ng-class="{'ant-image-preview-switch-right': true,'ant-image-preview-switch-right-disabled': (state.childrens.length-1)===state.current}" ng-click="handleNext()">
99   - <es-icon type="RightOutlined"></es-icon>
  99 + <antd-icon type="RightOutlined"></antd-icon>
100 100 </div>
101 101 </div>
102 102 </div>
... ...
src/Input/Input.html
... ... @@ -3,7 +3,7 @@
3 3 {(addonBefore || addonAfter) && <span className="ant-input-group-wrapper">
4 4 <span className="ant-input-wrapper ant-input-group">
5 5 {addonBefore && <span className="ant-input-group-addon">{addonBefore}</span>}
6   - <input type="text" className="ant-input" value={value} onChange={this.onChange} ng-model="default" id="{{esFormItem.name}}"/>
  6 + <input type="text" className="ant-input" value={value} onChange={this.onChange} ng-model="default" id="{{antdFormItem.name}}"/>
7 7 {addonAfter && <span className="ant-input-group-addon">{addonAfter}</span>}
8 8 </span>
9 9 </span>}
... ...
src/Input/Input.js
... ... @@ -18,16 +18,16 @@ class Input {
18 18 inputEventTarget: null,
19 19 }
20 20  
21   - constructor(esFormItem, esForm) {
  21 + constructor(antdFormItem, antdForm) {
22 22 esNgAntd.createStyle("ant-input", style);
23 23  
24 24 // 上下文
25   - if (esForm) {
26   - this.esForm = esForm.getContext();
27   - this.esForm.state.formItems.push($scope);
  25 + if (antdForm) {
  26 + this.antdForm = antdForm.getContext();
  27 + this.antdForm.state.formItems.push($scope);
28 28 }
29   - if (esFormItem) {
30   - this.esFormItem = esFormItem.getContext();
  29 + if (antdFormItem) {
  30 + this.antdFormItem = antdFormItem.getContext();
31 31 }
32 32 this.props.style = $attrs.style;
33 33 $element.replaceWith($compile(this.getTemplate())($scope));
... ... @@ -53,8 +53,8 @@ class Input {
53 53 if (this.props.style) {
54 54 styleAttribute = `style="${this.props.style}"`
55 55 }
56   - if (this.esFormItem && this.esFormItem.name) {
57   - idAttribute = `id="${this.esFormItem.name}"`;
  56 + if (this.antdFormItem && this.antdFormItem.name) {
  57 + idAttribute = `id="${this.antdFormItem.name}"`;
58 58 }
59 59 let templates = [
60 60 `<input type="text" class="ant-input" placeholder={{placeholder}} ng-change="handleChange()" ng-model="value" ng-focus="handleClick($event)" ng-disabled="disabled==='true'" ${styleAttribute} ${maxLengthAttribute} ${idAttribute}/>`,
... ...
src/InputSearch/InputSearch.html
1 1 <span className="ant-input-group-wrapper ant-input-search">
2 2 <span className="ant-input-wrapper ant-input-group">
3   - <es-input placeholder="{{placeholder}}" on-change="handleChange(event)"></es-input>
  3 + <antd-input placeholder="{{placeholder}}" on-change="handleChange(event)"></antd-input>
4 4 <span className="ant-input-group-addon" onClick={this.onSearch.bind(this, { value: state.value })}>
5   - <es-button html-type="button" className="ant-btn-icon-only ant-input-search-button">
6   - <es-icon type="SearchOutlined"></es-icon>
7   - </es-button>
  5 + <antd-button html-type="button" className="ant-btn-icon-only ant-input-search-button">
  6 + <antd-icon type="SearchOutlined"></antd-icon>
  7 + </antd-button>
8 8 </span>
9 9 </span>
10 10 </span>
11 11 \ No newline at end of file
... ...
src/Message/Message.js
... ... @@ -37,7 +37,7 @@ angular
37 37 error: "CloseCircleFilled",
38 38 warning: "InfoCircleFilled",
39 39 };
40   - return `<div class="ant-message-notice"><div class="ant-message-notice-content"><div class="ant-message-custom-content ant-message-${type}"><es-icon type="${icon[type]}"></es-icon><span>${content}</span></div></div></div>`;
  40 + return `<div class="ant-message-notice"><div class="ant-message-notice-content"><div class="ant-message-custom-content ant-message-${type}"><antd-icon type="${icon[type]}"></antd-icon><span>${content}</span></div></div></div>`;
41 41  
42 42 }
43 43  
... ...
src/Modal/Modal.html
... ... @@ -6,7 +6,7 @@
6 6 <div className="ant-modal-content">
7 7 {title && <button type="button" className="ant-modal-close" onClick={this.handleClose}>
8 8 <span className="ant-modal-close-x">
9   - <es-icon type="CloseOutlined"></es-icon>
  9 + <antd-icon type="CloseOutlined"></antd-icon>
10 10 </span>
11 11 </button>}
12 12 {title && <div className="ant-modal-header">
... ... @@ -15,12 +15,12 @@
15 15 <div className="ant-modal-body">{children}</div>
16 16 {footer === undefined && <div className="ant-modal-footer">
17 17 <div>
18   - <es-button onClick={this.onCancel}>{state.cancelText}</es-button>
19   - <es-button type="primary" onClick={this.onOk}>{state.okText}</es-button>
  18 + <antd-button onClick={this.onCancel}>{state.cancelText}</antd-button>
  19 + <antd-button type="primary" onClick={this.onOk}>{state.okText}</antd-button>
20 20 </div>
21 21 </div>}
22 22 {footer !== undefined && <div className="ant-modal-footer">
23   - <es-slot content="{{footer}}" context="esModal.getContext().$parent"></es-slot>
  23 + <antd-slot content="{{footer}}" context="antdModal.getContext().$parent"></antd-slot>
24 24 </div>}
25 25 </div>
26 26 </div>
... ...
src/Module.json
1 1 {
2 2 "name": "esNgAntd",
3 3 "component": {
4   - "prefix": "es"
  4 + "prefix": "antd"
5 5 }
6 6 }
... ...
src/Pagination/Pagination.html
... ... @@ -2,7 +2,7 @@
2 2 {showTotal() && <li className="ant-pagination-total-text">{handleShowTotal()}</li>}
3 3 <li className={"ant-pagination-prev" + (state.current === 1 ? " ant-pagination-disabled" : "")} onClick={this.handlePrev}>
4 4 <button type="button" class="ant-pagination-item-link">
5   - <es-icon type="LeftOutlined"></es-icon>
  5 + <antd-icon type="LeftOutlined"></antd-icon>
6 6 </button>
7 7 </li>
8 8 {state.pageNumList.map(function (value, key) {
... ... @@ -10,8 +10,8 @@
10 10 {(value!=='prev'&&value!=='next')&&<a>{value}</a>}
11 11 {(value==='prev'||value==='next')&&<a className="ant-pagination-item-link">
12 12 <div className="ant-pagination-item-container">
13   - {value==="prev"&&<es-icon type="DoubleLeftOutlined" className="ant-pagination-item-link-icon"></es-icon>}
14   - {value==="next"&&<es-icon type="DoubleRightOutlined" className="ant-pagination-item-link-icon"></es-icon>}
  13 + {value==="prev"&&<antd-icon type="DoubleLeftOutlined" className="ant-pagination-item-link-icon"></antd-icon>}
  14 + {value==="next"&&<antd-icon type="DoubleRightOutlined" className="ant-pagination-item-link-icon"></antd-icon>}
15 15 <span className="ant-pagination-item-ellipsis">•••</span>
16 16 </div>
17 17 </a>}
... ... @@ -19,16 +19,16 @@
19 19 })}
20 20 <li className={"ant-pagination-next" + (state.current === state.pageNum ? " ant-pagination-disabled" : "")} onClick={this.handleNext}>
21 21 <button type="button" class="ant-pagination-item-link">
22   - <es-icon type="RightOutlined"></es-icon>
  22 + <antd-icon type="RightOutlined"></antd-icon>
23 23 </button>
24 24 </li>
25 25 <li className="ant-pagination-options">
26   - {showSizeChanger === 'true' && <es-select className="ant-pagination-options-size-changer" size="{{size}}" value={state.defaultPageSize} get-popup-container="getPopupContainer" on-change="handleSelectChange(value)">
27   - <es-select-option value="10">10 条/页</es-select-option>
28   - <es-select-option value="20">20 条/页</es-select-option>
29   - <es-select-option value="50">50 条/页</es-select-option>
30   - <es-select-option value="100">100 条/页</es-select-option>
31   - </es-select>}
  26 + {showSizeChanger === 'true' && <antd-select className="ant-pagination-options-size-changer" size="{{size}}" value={state.defaultPageSize} get-popup-container="getPopupContainer" on-change="handleSelectChange(value)">
  27 + <antd-select-option value="10">10 条/页</antd-select-option>
  28 + <antd-select-option value="20">20 条/页</antd-select-option>
  29 + <antd-select-option value="50">50 条/页</antd-select-option>
  30 + <antd-select-option value="100">100 条/页</antd-select-option>
  31 + </antd-select>}
32 32 {showQuickJumper === 'true' && <div className="ant-pagination-options-quick-jumper">
33 33 跳至<input type="text" onBlur={this.handleBlur.bind(this, $event)} onKeyPress={this.onKeyPress.bind(this, $event)}/>页
34 34 </div>}
... ...
src/Popover/Popover.js
... ... @@ -23,7 +23,7 @@ class Popover {
23 23 closing: false,
24 24 };
25 25  
26   - constructor(esTable) {
  26 + constructor(antdTable) {
27 27 esNgAntd.createStyle("ant-popover", style);
28 28 this.state.target = $element[0];
29 29 let title = this.props.title
... ... @@ -67,7 +67,7 @@ class Popover {
67 67 $compile(div)($scope);
68 68 div.querySelector(".ant-popover-inner-content").innerHTML =
69 69 this.state.content;
70   - if (!esTable) {
  70 + if (!antdTable) {
71 71 $compile(div.querySelector(".ant-popover-inner-content"))(
72 72 $scope.$parent
73 73 );
... ...
src/Radio/Radio.js
... ... @@ -19,12 +19,12 @@ class Radio {
19 19  
20 20 handleClick(event) {
21 21 event.preventDefault();
22   - this.esRadioGroup.setValue(event);
  22 + this.antdRadioGroup.setValue(event);
23 23 }
24 24  
25   - constructor(esRadioGroup) {
26   - this.esRadioGroup = esRadioGroup.getContext();
27   - this.esRadioGroup.state.childrens.push($scope);
  25 + constructor(antdRadioGroup) {
  26 + this.antdRadioGroup = antdRadioGroup.getContext();
  27 + this.antdRadioGroup.state.childrens.push($scope);
28 28 esNgAntd.createStyle("ant-radio", style);
29 29 }
30 30 }
... ...
src/RadioButton/RadioButton.html
1   -<label className={"ant-radio-button-wrapper" + (esRadioGroup.state.value === value ? " ant-radio-button-wrapper-checked" : "")}>
  1 +<label className={"ant-radio-button-wrapper" + (antdRadioGroup.state.value === value ? " ant-radio-button-wrapper-checked" : "")}>
2 2 <span className="ant-radio-button">
3 3 <input type="radio" className="ant-radio-button-input" value={value} onClick={this.handleClick.bind(this, $event)}/>
4 4 <span className="ant-radio-button-inner"></span>
... ...
src/RadioButton/RadioButton.js
... ... @@ -9,12 +9,12 @@ class RadioButton {
9 9 checked: false,
10 10 };
11 11  
12   - constructor(esRadioGroup) {
13   - this.esRadioGroup = esRadioGroup.getContext()
  12 + constructor(antdRadioGroup) {
  13 + this.antdRadioGroup = antdRadioGroup.getContext()
14 14 $element.removeAttr("value");
15 15 }
16 16  
17 17 handleClick(event) {
18   - this.esRadioGroup.setValue(event);
  18 + this.antdRadioGroup.setValue(event);
19 19 }
20 20 }
... ...
src/Select/Select.html
... ... @@ -3,7 +3,7 @@
3 3 <span className="ant-select-selection-item">{state.label}</span>
4 4 </div>
5 5 <span className="ant-select-arrow">
6   - <es-icon type="DownOutlined"></es-icon>
  6 + <antd-icon type="DownOutlined"></antd-icon>
7 7 </span>
8 8 <span hidden>{children}</span>
9 9 </div>
... ...
src/Select/Select.js
... ... @@ -24,14 +24,14 @@ class Select {
24 24  
25 25 template = template;
26 26  
27   - constructor(esForm, esFormItem) {
  27 + constructor(antdForm, antdFormItem) {
28 28 esNgAntd.createStyle("ant-select", style);
29   - if (esForm) {
30   - this.esForm = esForm.getContext();
31   - this.esForm.state.formItems.push($scope);
  29 + if (antdForm) {
  30 + this.antdForm = antdForm.getContext();
  31 + this.antdForm.state.formItems.push($scope);
32 32 }
33   - if (esFormItem) {
34   - this.esFormItem = esFormItem.getContext();
  33 + if (antdFormItem) {
  34 + this.antdFormItem = antdFormItem.getContext();
35 35 }
36 36  
37 37 $timeout(function () {
... ...
src/SelectOption/SelectOption.js
... ... @@ -12,9 +12,9 @@ class SelectOption {
12 12 label: null,
13 13 };
14 14  
15   - constructor(esSelect) {
16   - this.esSelect = esSelect.getContext();
17   - this.esSelect.addOption({
  15 + constructor(antdSelect) {
  16 + this.antdSelect = antdSelect.getContext();
  17 + this.antdSelect.addOption({
18 18 value: this.props.value,
19 19 label: null,
20 20 element: $element,
... ...
src/TabPane/TabPane.js
... ... @@ -11,7 +11,7 @@ class TabPane {
11 11 watch = {
12 12 tab: function (newVal, oldVal) {
13 13 if (newVal !== oldVal) {
14   - let item = this.esTabs.state.labels.find(function (item) {
  14 + let item = this.antdTabs.state.labels.find(function (item) {
15 15 return item.key === this.props.key;
16 16 });
17 17 if (item) {
... ... @@ -23,13 +23,13 @@ class TabPane {
23 23  
24 24 template = template;
25 25  
26   - constructor(esTabs) {
27   - this.esTabs = esTabs.getContext();
28   - this.esTabs.state.labels.push({
  26 + constructor(antdTabs) {
  27 + this.antdTabs = antdTabs.getContext();
  28 + this.antdTabs.state.labels.push({
29 29 name: this.props.tab,
30 30 key: this.props.key,
31 31 });
32   - this.esTabs.state.childrens.push($scope);
33   - this.state.activeKey = this.esTabs.state.activeKey;
  32 + this.antdTabs.state.childrens.push($scope);
  33 + this.state.activeKey = this.antdTabs.state.activeKey;
34 34 }
35 35 }
... ...
src/Table/Table.html
1 1 <div className="ant-table-wrapper">
2   - <es-spin spinning="{{loading}}">
3   - <div className={"ant-table ant-table-"+state.size}>
4   - <div className="ant-table-content">
5   - <table>
6   - <thead className="ant-table-thead">
7   - <tr>
8   - {rowSelection &&<th className="ant-table-selection-column">
9   - <span className="ant-table-header-column">
10   - <div>
11   - <span className="ant-table-column-title">
12   - <div className="ant-table-selection">
13   - <es-checkbox onChange={this.handleSelectAll.bind(this, event)}
14   - checked={state.isSelectAll} />
15   - </div>
  2 + <div className={"ant-table ant-table-"+state.size}>
  3 + <div className="ant-table-content">
  4 + <table>
  5 + <thead className="ant-table-thead">
  6 + <tr>
  7 + {rowSelection &&<th className="ant-table-selection-column">
  8 + <span className="ant-table-header-column">
  9 + <div>
  10 + <span className="ant-table-column-title">
  11 + <div className="ant-table-selection">
  12 + <antd-checkbox onChange={this.handleSelectAll.bind(this, event)}
  13 + checked={state.isSelectAll} />
  14 + </div>
  15 + </span>
  16 + </div>
  17 + </span>
  18 + </th>}
  19 + {columns.map(function (column, key) {
  20 + return <th className="ant-table-cell ant-table-column-has-sorters" style={{ width: column.width }}>
  21 + {!column.sorter && <span>{column.title}</span>}
  22 + {column.sorter && <div className="ant-table-column-sorters" onClick={this.handleSorter.bind(this, column.key)}>
  23 + <span className="ant-table-column-title">{column.title}</span>
  24 + <span className="ant-table-column-sorter ant-table-column-sorter-full">
  25 + <span className="ant-table-column-sorter-inner">
  26 + <antd-icon type="CaretUpOutlined" className={"ant-table-column-sorter-up"+(state.sorter.field===column.key&&state.sorter.order==="ascend"?" active":"")}></antd-icon>
  27 + <antd-icon type="CaretDownOutlined" className={"ant-table-column-sorter-down"+(state.sorter.field===column.key&&state.sorter.order==="descend"?" active":"")}></antd-icon>
16 28 </span>
17   - </div>
18   - </span>
19   - </th>}
  29 + </span>
  30 + </div>}
  31 + </th>
  32 + })}
  33 + </tr>
  34 + </thead>
  35 + <tbody className="ant-table-tbody">
  36 + {state.dataSource.map(function (record, key) {
  37 + return <tr className="ant-table-row" key="record[state.rowKey]">
  38 + {rowSelection && <td className="ant-table-selection-column">
  39 + <span>
  40 + <antd-checkbox checked={record.checked} disabled={record.disabled}
  41 + onChange={this.handleSelect.bind(this, event, $index)} />
  42 + </span>
  43 + </td>}
20 44 {columns.map(function (column, key) {
21   - return <th className="ant-table-cell ant-table-column-has-sorters" key="key" style={{ width: column.width }}>
22   - {!column.sorter && <span>{column.title}</span>}
23   - {column.sorter && <div className="ant-table-column-sorters" onClick={this.handleSorter.bind(this, column.key)}>
24   - <span className="ant-table-column-title">{column.title}</span>
25   - <span className="ant-table-column-sorter ant-table-column-sorter-full">
26   - <span className="ant-table-column-sorter-inner">
27   - <es-icon type="CaretUpOutlined" className={"ant-table-column-sorter-up"+(state.sorter.field===column.key&&state.sorter.order==="ascend"?" active":"")}></es-icon>
28   - <es-icon type="CaretDownOutlined" className={"ant-table-column-sorter-down"+(state.sorter.field===column.key&&state.sorter.order==="descend"?" active":"")}></es-icon>
29   - </span>
30   - </span>
31   - </div>}
32   - </th>
  45 + return <td data-key="{{column.key}}" key="key">
  46 + <antd-slot content="{{record[column.key]}}" context="antdTable.getContext().$parent" />
  47 + </td>
33 48 })}
34   - </tr>
35   - </thead>
36   - <tbody className="ant-table-tbody">
37   - {state.dataSource.map(function (record, key) {
38   - return <tr className="ant-table-row" key="record[state.rowKey]">
39   - {rowSelection && <td className="ant-table-selection-column">
40   - <span>
41   - <es-checkbox checked="record.checked" disabled="record.disabled"
42   - onChange={this.handleSelect.bind(this, event, $index)} />
43   - </span>
44   - </td>}
45   - {columns.map(function (column, key) {
46   - return <td data-key="{{column.key}}" key="key">
47   - <es-slot content="{{record[column.key]}}" context="esTable.getContext().$parent" />
48   - </td>
49   - })}
50   - </tr>
51   - })}
52   - {state.dataSource.length === 0 && <tr className="ant-table-placeholder">
53   - <td colspan={rowSelection?columns.length+1:columns.length}>
54   - <es-empty image="presented_image_simple"></es-empty>
55   - </td>
56   - </tr>}
57   - </tbody>
58   - </table>
59   - </div>
  49 + </tr>
  50 + })}
  51 + {state.dataSource.length === 0 && <tr className="ant-table-placeholder">
  52 + <td colspan={rowSelection?columns.length+1:columns.length}>
  53 + <antd-empty image="presented_image_simple"></antd-empty>
  54 + </td>
  55 + </tr>}
  56 + </tbody>
  57 + </table>
60 58 </div>
61   - </es-spin>
  59 + </div>
62 60 </div>
63 61 \ No newline at end of file
... ...
webpack.config.js
... ... @@ -8,11 +8,11 @@ module.exports = {
8 8 // bpms
9 9 // path: "/Users/shann/Project/essa/bpms/bpms-webapp/src/main/webapp/lib/ng-antd",
10 10 // boss
11   - // path: "/Users/shann/Project/essa/boss/trunk/vendor-lib/ng-antd",
  11 + path: "/Users/shann/Project/essa/boss/trunk/vendor-lib/ng-antd",
12 12 // mvo
13 13 // path: "/Users/shann/Project/essa/mvo/mvo-webapp/public/browser-vendor/ng-antd",
14 14 // local
15   - path: path.resolve(__dirname, "dist"),
  15 + // path: path.resolve(__dirname, "dist"),
16 16 filename: "ng-antd.js",
17 17 },
18 18 module: {
... ...