Commit dd962f77600448e18914a886fe77b4cfaee70165
1 parent
3a3ecabe
优化
Showing
31 changed files
with
577 additions
and
373 deletions
Show diff stats
build/Form/Form.js
... | ... | @@ -11,6 +11,7 @@ angular.module("esNgAntd").directive("esForm", function (esNgAntd) { |
11 | 11 | labelCol: "=", |
12 | 12 | wrapperCol: "=", |
13 | 13 | onFinish: "&", |
14 | + form: "=", | |
14 | 15 | }, |
15 | 16 | template: template, |
16 | 17 | controller: function ($scope, $element) { |
... | ... | @@ -18,24 +19,33 @@ angular.module("esNgAntd").directive("esForm", function (esNgAntd) { |
18 | 19 | return $scope; |
19 | 20 | }; |
20 | 21 | |
21 | - $scope.state = {}; | |
22 | + $scope.state = { | |
23 | + formItems: [], | |
24 | + }; | |
25 | + | |
26 | + $scope.resetFields = function () { | |
27 | + $scope.state.formItems.forEach(function (item) { | |
28 | + item.value = null; | |
29 | + }); | |
30 | + }; | |
22 | 31 | |
23 | 32 | $scope.handleSubmit = function () { |
24 | 33 | let values = {}; |
25 | - let inputs = $element[0].querySelectorAll("input"); | |
26 | - | |
27 | - for (let i = 0; i < inputs.length; i++) { | |
28 | - const element = inputs[i]; | |
29 | - const value = element.value === "" ? null : element.value; | |
30 | - | |
31 | - if (element.id) { | |
32 | - if (element.id.split("_").length > 1) { | |
33 | - values[element.id.split("_")[1]] = value; | |
34 | - } else { | |
35 | - values[element.id] = value; | |
36 | - } | |
37 | - } | |
38 | - } | |
34 | + $scope.state.formItems.forEach(function (item) { | |
35 | + let name = item.esFormItem && item.esFormItem.name; | |
36 | + let value = item.value || item.state.value || null; | |
37 | + values[name] = value; | |
38 | + }); // for (let i = 0; i < inputs.length; i++) { | |
39 | + // const element = inputs[i]; | |
40 | + // const value = element.value === "" ? null : element.value; | |
41 | + // if (element.id) { | |
42 | + // if (element.id.split("_").length > 1) { | |
43 | + // values[element.id.split("_")[1]] = value; | |
44 | + // } else { | |
45 | + // values[element.id] = value; | |
46 | + // } | |
47 | + // } | |
48 | + // } | |
39 | 49 | |
40 | 50 | $scope.onFinish({ |
41 | 51 | values: values, |
... | ... | @@ -44,6 +54,7 @@ angular.module("esNgAntd").directive("esForm", function (esNgAntd) { |
44 | 54 | }, |
45 | 55 | link: function ($scope, $element, $attrs, $controllers, $transclude) { |
46 | 56 | esNgAntd.createStyle("ant-form", style); |
57 | + $scope.form = $scope; | |
47 | 58 | |
48 | 59 | if ($scope.name) { |
49 | 60 | let inputs = $element[0].querySelectorAll("input"); | ... | ... |
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 () { | |
3 | +angular.module("esNgAntd").directive("esIcon", function ($compile) { | |
4 | 4 | return { |
5 | 5 | controllerAs: "esIcon", |
6 | 6 | restrict: "E", |
... | ... | @@ -9,19 +9,19 @@ angular.module("esNgAntd").directive("esIcon", function () { |
9 | 9 | scope: { |
10 | 10 | type: "@", |
11 | 11 | }, |
12 | + template: `<span class="anticon"></span>`, | |
12 | 13 | link: function ($scope, $element, $attrs, $controllers, $transclude) { |
13 | - $element.replaceWith( | |
14 | - `<span class="anticon">${renderIconDefinitionToSVGElement( | |
15 | - iconsSvg[$scope.type], | |
16 | - { | |
17 | - extraSVGAttrs: { | |
18 | - width: "1em", | |
19 | - height: "1em", | |
20 | - fill: "currentColor", | |
21 | - }, | |
22 | - } | |
23 | - )}</span>` | |
14 | + let template = renderIconDefinitionToSVGElement( | |
15 | + iconsSvg[$scope.type], | |
16 | + { | |
17 | + extraSVGAttrs: { | |
18 | + width: "1em", | |
19 | + height: "1em", | |
20 | + fill: "currentColor", | |
21 | + }, | |
22 | + } | |
24 | 23 | ); |
24 | + $element.append(template); | |
25 | 25 | }, |
26 | 26 | }; |
27 | 27 | }); | ... | ... |
build/Input/Input.js
... | ... | @@ -68,12 +68,14 @@ angular.module("esNgAntd").directive("esInput", function ($compile, esNgAntd) { |
68 | 68 | } |
69 | 69 | }; |
70 | 70 | }, |
71 | - require: ["?^esFormItem"], | |
71 | + require: ["?^esFormItem", "?^esForm"], | |
72 | 72 | link: function ($scope, $element, $attrs, $controllers, $transclude) { |
73 | - let [esFormItem] = $controllers; | |
73 | + let [esFormItem, esForm] = $controllers; | |
74 | 74 | esNgAntd.createStyle("ant-input", style); |
75 | + $scope.esForm = esForm.getContext(); | |
75 | 76 | $scope.esFormItem = esFormItem.getContext(); |
76 | 77 | $scope.style = $attrs.style; |
78 | + $scope.esForm.state.formItems.push($scope); | |
77 | 79 | $element.replaceWith($compile($scope.getTemplate())($scope)); |
78 | 80 | }, |
79 | 81 | }; | ... | ... |
build/Option/Option.js
... | ... | @@ -2,9 +2,9 @@ |
2 | 2 | * 选项 |
3 | 3 | */ |
4 | 4 | import template from "./Option.html"; |
5 | -angular.module("esNgAntd").directive("esOption", function () { | |
5 | +angular.module("esNgAntd").directive("esSelectOption", function () { | |
6 | 6 | return { |
7 | - controllerAs: "esOption", | |
7 | + controllerAs: "esSelectOption", | |
8 | 8 | restrict: "E", |
9 | 9 | transclude: true, |
10 | 10 | replace: true, | ... | ... |
build/Pagination/Pagination.html
1 | 1 | <ul class="ant-pagination"> |
2 | - <li ng-class="{'ant-pagination-prev':true,'ant-pagination-disabled':state.current===1}" ng-click="handlePrev()"> | |
3 | - <a class="ant-pagination-item-link"></a> | |
2 | + <li ng-class="'ant-pagination-prev'+(state.current===1?' ant-pagination-disabled':'')" ng-click="handlePrev()"> | |
3 | + <button type="button" class="ant-pagination-item-link"> | |
4 | + <es-icon type="LeftOutlined"></es-icon> | |
5 | + </button> | |
4 | 6 | </li> |
5 | - <li ng-class="{'ant-pagination-item':true,'ant-pagination-item-active':state.current===value}" ng-repeat="value in state.pageNumList" ng-click="handleClick(value)"> | |
6 | - <a>{{value}}</a> | |
7 | - </li> | |
8 | - <li ng-class="{'ant-pagination-next':true,'ant-pagination-disabled':state.current===state.pageNum}" ng-click="handleNext()"> | |
9 | - <a class="ant-pagination-item-link"></a> | |
7 | + <li ng-repeat="value in state.pageNumList" ng-class="'ant-pagination-item'+(state.current===value?' ant-pagination-item-active':'')" ng-click="handleClick(value)"> | |
8 | + <a>{{value}}</a> | |
9 | + </li> | |
10 | + <li ng-class="'ant-pagination-next'+(state.current===state.pageNum?' ant-pagination-disabled':'')" ng-click="handleNext()"> | |
11 | + <button type="button" class="ant-pagination-item-link"> | |
12 | + <es-icon type="RightOutlined"></es-icon> | |
13 | + </button> | |
10 | 14 | </li> |
11 | 15 | <li class="ant-pagination-options"> |
12 | - <es-select class="ant-pagination-options-size-changer" value="10" get-popup-container="getPopupContainer" ng-if="showSizeChanger==='true'" on-change="handleSelectChange(value)"> | |
16 | + <es-select ng-if="showSizeChanger==='true'" class="ant-pagination-options-size-changer" value="10" get-popup-container="getPopupContainer" on-change="handleSelectChange(value)"> | |
13 | 17 | <es-option value="10">10 条/页</es-option> |
14 | 18 | <es-option value="20">20 条/页</es-option> |
15 | 19 | <es-option value="30">30 条/页</es-option> |
16 | 20 | <es-option value="40">40 条/页</es-option> |
17 | 21 | </es-select> |
18 | - <div class="ant-pagination-options-quick-jumper" ng-if="showQuickJumper==='true'"> | |
19 | - 跳至<input type="text" ng-blur="handleBlur($event)" />页 | |
22 | + <div ng-if="showQuickJumper==='true'" class="ant-pagination-options-quick-jumper"> | |
23 | + 跳至<input type="text" onBlur="handleBlur($event)" />页 | |
20 | 24 | </div> |
21 | 25 | </li> |
22 | 26 | </ul> |
23 | 27 | \ No newline at end of file | ... | ... |
build/Pagination/Pagination.js
1 | 1 | import template from "./Pagination.html"; |
2 | -angular.module("esNgAntd").directive("esPagination", function () { | |
2 | +import style from "antd/lib/pagination/style/index.css"; | |
3 | +angular.module("esNgAntd").directive("esPagination", function (esNgAntd) { | |
3 | 4 | return { |
4 | 5 | controllerAs: "esPagination", |
5 | 6 | restrict: "E", |
... | ... | @@ -114,6 +115,7 @@ angular.module("esNgAntd").directive("esPagination", function () { |
114 | 115 | }; |
115 | 116 | }, |
116 | 117 | link: function ($scope, $element, $attrs, $controllers, $transclude) { |
118 | + esNgAntd.createStyle("ant-pagination", style); | |
117 | 119 | $scope.state.total = Number($scope.total || 0); |
118 | 120 | $scope.state.current = Number( |
119 | 121 | $scope.current || $scope.defaultCurrent || 1 | ... | ... |
build/Select/Select.html
1 | -<div class="ant-select ant-select-enabled" ng-click="handleOpen($event)"> | |
2 | - <div class="ant-select-selection ant-select-selection--single"> | |
3 | - <div class="ant-select-selection__rendered"> | |
4 | - <div class="ant-select-selection__placeholder" if="placeholder&&!state.value">{{placeholder}}</div> | |
5 | - <div class="ant-select-selection-selected-value" if="state.label">{{undefined}}</div> | |
6 | - </div> | |
7 | - <span class="ant-select-arrow" unselectable="on" style="{'user-select': 'none'}"> | |
8 | - <i class="anticon anticon-down ant-select-arrow-icon"> | |
9 | - <svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor"> | |
10 | - <path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path> | |
11 | - </svg> | |
12 | - </i> | |
13 | - </span> | |
1 | +<div class="ant-select ant-select-single" ng-click="handleOpen($event)"> | |
2 | + <div class="ant-select-selector"> | |
3 | + <span class="ant-select-selection-item">{{state.label}}</span> | |
14 | 4 | </div> |
15 | - <div hidden ng-transclude></div> | |
5 | + <span class="ant-select-arrow"> | |
6 | + <es-icon type="DownOutlined"></es-icon> | |
7 | + </span> | |
8 | + <span hidden ng-transclude></span> | |
16 | 9 | </div> |
17 | 10 | \ No newline at end of file | ... | ... |
build/Select/Select.js
1 | 1 | import template from "./Select.html"; |
2 | -angular.module("esNgAntd").directive("esSelect", function ($compile, $timeout) { | |
3 | - return { | |
4 | - controllerAs: "esSelect", | |
5 | - restrict: "E", | |
6 | - transclude: true, | |
7 | - replace: true, | |
8 | - scope: { | |
9 | - value: "@", | |
10 | - placeholder: "@", | |
11 | - onChange: "&", | |
12 | - placeholder: "@", | |
13 | - getPopupContainer: "&", | |
14 | - }, | |
15 | - template: template, | |
16 | - controller: function ($scope, $element) { | |
17 | - this.getContext = function () { | |
18 | - return $scope; | |
19 | - }; | |
2 | +import style from "antd/lib/select/style/index.css"; | |
3 | +angular | |
4 | + .module("esNgAntd") | |
5 | + .directive("esSelect", function ($compile, $timeout, esNgAntd) { | |
6 | + return { | |
7 | + controllerAs: "esSelect", | |
8 | + restrict: "E", | |
9 | + transclude: true, | |
10 | + replace: true, | |
11 | + scope: { | |
12 | + value: "@", | |
13 | + placeholder: "@", | |
14 | + onChange: "&", | |
15 | + placeholder: "@", | |
16 | + getPopupContainer: "&", | |
17 | + }, | |
18 | + template: template, | |
19 | + controller: function ($scope, $element) { | |
20 | + this.getContext = function () { | |
21 | + return $scope; | |
22 | + }; | |
20 | 23 | |
21 | - $scope.state = { | |
22 | - open: false, | |
23 | - childrens: [], | |
24 | - label: null, | |
25 | - value: null, | |
26 | - popup: null, | |
27 | - }; | |
24 | + $scope.state = { | |
25 | + open: false, | |
26 | + childrens: [], | |
27 | + label: null, | |
28 | + value: null, | |
29 | + popup: null, | |
30 | + }; | |
28 | 31 | |
29 | - $scope.addOption = function (option) { | |
30 | - $scope.state.childrens.push(option); | |
31 | - }; | |
32 | + $scope.addOption = function (option) { | |
33 | + $scope.state.childrens.push(option); | |
34 | + }; | |
32 | 35 | |
33 | - $scope.handleClick = function (option) { | |
34 | - $scope.state.open = !$scope.state.open; | |
35 | - $scope.state.label = option.label; | |
36 | - $scope.state.value = option.value; | |
37 | - $scope.onChange({ | |
38 | - value: $scope.state.value, | |
39 | - }); | |
40 | - }; | |
36 | + $scope.handleClick = function (option) { | |
37 | + $scope.state.open = !$scope.state.open; | |
38 | + $scope.state.label = option.label; | |
39 | + $scope.state.value = option.value; | |
40 | + $scope.onChange({ | |
41 | + value: $scope.state.value, | |
42 | + }); | |
43 | + }; | |
41 | 44 | |
42 | - $scope.getOffset = function (ele) { | |
43 | - if (!ele || ele.nodeType != 1) { | |
44 | - return; | |
45 | - } | |
45 | + $scope.getOffset = function (ele) { | |
46 | + if (!ele || ele.nodeType != 1) { | |
47 | + return; | |
48 | + } | |
46 | 49 | |
47 | - let func = $scope.getPopupContainer(); | |
50 | + let func = $scope.getPopupContainer(); | |
48 | 51 | |
49 | - if (typeof func === "function" && func() !== undefined) { | |
50 | - return { | |
51 | - top: $element[0].offsetTop, | |
52 | - left: $element[0].offsetLeft, | |
53 | - }; | |
54 | - } else { | |
55 | - let rect = ele.getBoundingClientRect(); | |
56 | - let doc = ele.ownerDocument.documentElement; | |
57 | - return { | |
58 | - top: rect.top + window.pageYOffset - doc.clientTop, | |
59 | - left: rect.left + window.pageXOffset - doc.clientLeft, | |
60 | - }; | |
61 | - } | |
62 | - }; | |
52 | + if (typeof func === "function" && func() !== undefined) { | |
53 | + return { | |
54 | + top: $element[0].offsetTop, | |
55 | + left: $element[0].offsetLeft, | |
56 | + }; | |
57 | + } else { | |
58 | + let rect = ele.getBoundingClientRect(); | |
59 | + let doc = ele.ownerDocument.documentElement; | |
60 | + return { | |
61 | + top: rect.top + window.pageYOffset - doc.clientTop, | |
62 | + left: | |
63 | + rect.left + window.pageXOffset - doc.clientLeft, | |
64 | + }; | |
65 | + } | |
66 | + }; | |
63 | 67 | |
64 | - $scope.myEvent = function () { | |
65 | - $timeout(() => { | |
66 | - $scope.state.open = false; | |
67 | - document.body.removeEventListener("click", $scope.myEvent); | |
68 | - }, 0); | |
69 | - }; | |
68 | + $scope.myEvent = function () { | |
69 | + $timeout(() => { | |
70 | + $scope.state.open = false; | |
71 | + document.body.removeEventListener( | |
72 | + "click", | |
73 | + $scope.myEvent | |
74 | + ); | |
75 | + }, 0); | |
76 | + }; | |
70 | 77 | |
71 | - $scope.handleBlur = function () { | |
72 | - // 事件绑定 | |
73 | - document.body.addEventListener("click", $scope.myEvent); | |
74 | - }; | |
78 | + $scope.handleBlur = function () { | |
79 | + // 事件绑定 | |
80 | + document.body.addEventListener("click", $scope.myEvent); | |
81 | + }; | |
75 | 82 | |
76 | - $scope.handleOpen = function (event) { | |
77 | - event.stopPropagation(); | |
78 | - const { height, width } = $element[0].getBoundingClientRect(); | |
79 | - const { top, left } = $scope.getOffset($element[0]); | |
80 | - let div = document.createElement("div"); | |
81 | - div.style.position = "absolute"; | |
82 | - div.style.left = 0; | |
83 | - div.style.top = 0; | |
84 | - div.style.width = "100%"; | |
85 | - div.appendChild( | |
86 | - $compile(`<div><div ng-class="'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft'+(!state.open?' ant-select-dropdown-hidden':'')" style="width: ${width}px; left: ${left}px; top: ${ | |
87 | - top + height + 2 | |
88 | - }px;"> | |
89 | - <ul class="ant-select-dropdown-menu ant-select-dropdown-menu-root ant-select-dropdown-menu-vertical"> | |
90 | - <li class="ant-select-dropdown-menu-item" ng-click="handleClick(option)" ng-repeat="option in state.childrens">{{option.label}}</li> | |
91 | - </ul> | |
83 | + $scope.handleOpen = function (event) { | |
84 | + event.stopPropagation(); | |
85 | + const { height, width } = | |
86 | + $element[0].getBoundingClientRect(); | |
87 | + const { top, left } = $scope.getOffset($element[0]); // 处理标签 | |
88 | + | |
89 | + $scope.state.childrens.forEach(function (item) { | |
90 | + item.label = item.element.text(); | |
91 | + }); | |
92 | + let div = document.createElement("div"); | |
93 | + div.style.position = "absolute"; | |
94 | + div.style.left = 0; | |
95 | + div.style.top = 0; | |
96 | + div.style.width = "100%"; | |
97 | + div.appendChild( | |
98 | + $compile(`<div><div ng-class="'ant-select-dropdown ant-select-dropdown-placement-bottomLeft'+(!state.open?' ant-select-dropdown-hidden':'')" style="width: ${width}px; left: ${left}px; top: ${ | |
99 | + top + height + 2 | |
100 | + }px;"> | |
101 | + <div class="ant-select-item ant-select-item-option" ng-click="handleClick(option)" ng-repeat="option in state.childrens"> | |
102 | + <div class="ant-select-item-option-content">{{option.label}}</div> | |
103 | + </div> | |
92 | 104 | </div></div>`)($scope)[0] |
93 | - ); | |
105 | + ); | |
94 | 106 | |
95 | - if ($scope.state.popup === null) { | |
96 | - let func = $scope.getPopupContainer(); | |
107 | + if ($scope.state.popup === null) { | |
108 | + let func = $scope.getPopupContainer(); | |
97 | 109 | |
98 | - if (typeof func === "function" && func() !== undefined) { | |
99 | - $element[0].style.position = "relative"; | |
100 | - $scope.getPopupContainer()().appendChild(div); | |
101 | - } else { | |
102 | - document.body.appendChild(div); | |
110 | + if ( | |
111 | + typeof func === "function" && | |
112 | + func() !== undefined | |
113 | + ) { | |
114 | + $element[0].style.position = "relative"; | |
115 | + $scope.getPopupContainer()().appendChild(div); | |
116 | + } else { | |
117 | + document.body.appendChild(div); | |
118 | + } | |
119 | + | |
120 | + $scope.state.popup = div; | |
103 | 121 | } |
104 | 122 | |
105 | - $scope.state.popup = div; | |
106 | - } | |
123 | + $scope.state.open = !$scope.state.open; | |
124 | + $scope.handleBlur(); | |
125 | + }; | |
126 | + }, | |
127 | + require: ["?^esForm", "?^esFormItem"], | |
128 | + link: function ( | |
129 | + $scope, | |
130 | + $element, | |
131 | + $attrs, | |
132 | + $controllers, | |
133 | + $transclude | |
134 | + ) { | |
135 | + let [esForm, esFormItem] = $controllers; | |
136 | + esNgAntd.createStyle("ant-select", style); | |
137 | + $scope.esForm = esForm.getContext(); | |
138 | + $scope.esFormItem = esFormItem.getContext(); | |
139 | + $scope.esForm.state.formItems.push($scope); | |
140 | + let option = $scope.state.childrens.find(function (option) { | |
141 | + return option.value === $scope.value; | |
142 | + }); | |
107 | 143 | |
108 | - $scope.state.open = !$scope.state.open; | |
109 | - $scope.handleBlur(); | |
110 | - }; | |
111 | - }, | |
112 | - link: function ($scope, $element, $attrs, $controllers, $transclude) { | |
113 | - let option = $scope.state.childrens.find(function (option) { | |
114 | - return option.value === $scope.value; | |
115 | - }); | |
116 | - $scope.state.label = option.label; | |
117 | - }, | |
118 | - }; | |
119 | -}); | |
144 | + if (option) { | |
145 | + $scope.state.label = option.label; | |
146 | + } | |
147 | + }, | |
148 | + }; | |
149 | + }); | ... | ... |
... | ... | @@ -0,0 +1,35 @@ |
1 | +/** | |
2 | + * 选项 | |
3 | + */ | |
4 | +import template from "./SelectOption.html"; | |
5 | +angular.module("esNgAntd").directive("esSelectOption", function () { | |
6 | + return { | |
7 | + controllerAs: "esSelectOption", | |
8 | + restrict: "E", | |
9 | + transclude: true, | |
10 | + replace: true, | |
11 | + scope: { | |
12 | + value: "@", | |
13 | + }, | |
14 | + template: template, | |
15 | + controller: function ($scope, $element) { | |
16 | + this.getContext = function () { | |
17 | + return $scope; | |
18 | + }; | |
19 | + | |
20 | + $scope.state = { | |
21 | + label: null, | |
22 | + }; | |
23 | + }, | |
24 | + require: ["?^esSelect"], | |
25 | + link: function ($scope, $element, $attrs, $controllers, $transclude) { | |
26 | + let [esSelect] = $controllers; | |
27 | + $scope.esSelect = esSelect.getContext(); | |
28 | + $scope.esSelect.addOption({ | |
29 | + value: $scope.value, | |
30 | + label: null, | |
31 | + element: $element, | |
32 | + }); | |
33 | + }, | |
34 | + }; | |
35 | +}); | ... | ... |
build/Table/Table.html
... | ... | @@ -2,47 +2,50 @@ |
2 | 2 | <es-spin spinning="{{loading}}"> |
3 | 3 | <div class="ant-table ant-table-default"> |
4 | 4 | <div class="ant-table-content"> |
5 | - <div class="ant-table-body"> | |
6 | - <table> | |
7 | - <thead class="ant-table-thead"> | |
8 | - <tr> | |
9 | - <th ng-if="rowSelection" class="ant-table-selection-column"> | |
10 | - <span class="ant-table-header-column"> | |
11 | - <div> | |
12 | - <span class="ant-table-column-title"> | |
13 | - <div class="ant-table-selection"> | |
14 | - <es-checkbox on-change="handleSelectAll(event)" checked="{{state.isSelectAll}}" /> | |
15 | - </div> | |
16 | - </span> | |
17 | - </div> | |
18 | - </span> | |
19 | - </th> | |
20 | - <th ng-repeat="(key, column) in columns track by key" ng-style="{width:column.width}"> | |
21 | - <span class="ant-table-header-column"> | |
22 | - <div> | |
23 | - <span class="ant-table-column-title">{{column.title}}</span> | |
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}}" /> | |
24 | 14 | </div> |
25 | 15 | </span> |
26 | - </th> | |
27 | - </tr> | |
28 | - </thead> | |
29 | - <tbody class="ant-table-tbody"> | |
30 | - <tr ng-repeat="(key, record) in state.dataSource track by record[state.rowKey]" class="ant-table-row"> | |
31 | - <td ng-if="rowSelection" class="ant-table-selection-column"> | |
32 | - <span> | |
33 | - <es-checkbox checked="record.checked" disabled="record.disabled" on-change="handleSelect(event,$index)" /> | |
34 | - </span> | |
35 | - </td> | |
36 | - <td ng-repeat="(key, column) in columns track by key" data-key="{{column.key}}"> | |
37 | - <es-slot content="{{record[column.key]}}" context="esTable.getContext().$parent" /> | |
38 | - </td> | |
39 | - </tr> | |
40 | - <tr ng-if="state.dataSource.length===0" class="ant-table-placeholder"> | |
41 | - <td colspan="{{columns.length}}"><div class="ant-empty ant-empty-normal"><div class="ant-empty-image"><svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7"></ellipse><g class="ant-empty-img-simple-g" fill-rule="nonzero"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" class="ant-empty-img-simple-path"></path></g></g></svg></div><div class="ant-empty-description">暂无数据</div></div></td> | |
42 | - </tr> | |
43 | - </tbody> | |
44 | - </table> | |
45 | - </div> | |
16 | + </div> | |
17 | + </span> | |
18 | + </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="{{columns.length}}"><div class="ant-empty ant-empty-normal"><div class="ant-empty-image"><svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7"></ellipse><g class="ant-empty-img-simple-g" fill-rule="nonzero"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" class="ant-empty-img-simple-path"></path></g></g></svg></div><div class="ant-empty-description">暂无数据</div></div></td> | |
46 | + </tr> | |
47 | + </tbody> | |
48 | + </table> | |
46 | 49 | </div> |
47 | 50 | </div> |
48 | 51 | </es-spin> | ... | ... |
build/Table/Table.js
... | ... | @@ -12,6 +12,7 @@ angular.module("esNgAntd").directive("esTable", function (esNgAntd) { |
12 | 12 | rowSelection: "=", |
13 | 13 | rowKey: "@", |
14 | 14 | loading: "@", |
15 | + onChange: "&", | |
15 | 16 | }, |
16 | 17 | template: template, |
17 | 18 | controller: function ($scope, $element) { |
... | ... | @@ -25,6 +26,11 @@ angular.module("esNgAntd").directive("esTable", function (esNgAntd) { |
25 | 26 | selectedrecords: [], |
26 | 27 | isSelectAll: false, |
27 | 28 | rowKey: $scope.rowKey || "id", |
29 | + sortDirections: ["ascend", "descend"], | |
30 | + sorter: { | |
31 | + field: null, | |
32 | + order: null, | |
33 | + }, | |
28 | 34 | }; |
29 | 35 | $scope.watch = { |
30 | 36 | dSource: (newValue) => { |
... | ... | @@ -122,6 +128,23 @@ angular.module("esNgAntd").directive("esTable", function (esNgAntd) { |
122 | 128 | $scope.state.selectedrecords |
123 | 129 | ); |
124 | 130 | }; |
131 | + | |
132 | + $scope.handleSorter = function (key) { | |
133 | + $scope.state.sorter.field = key; | |
134 | + | |
135 | + if ($scope.state.sorter.order === null) { | |
136 | + $scope.state.sorter.order = "ascend"; | |
137 | + } else if ($scope.state.sorter.order === "ascend") { | |
138 | + $scope.state.sorter.order = "descend"; | |
139 | + } else if ($scope.state.sorter.order === "descend") { | |
140 | + $scope.state.sorter.order = null; | |
141 | + $scope.state.sorter.field = null; | |
142 | + } | |
143 | + | |
144 | + $scope.onChange({ | |
145 | + sorter: $scope.state.sorter, | |
146 | + }); | |
147 | + }; | |
125 | 148 | }, |
126 | 149 | link: function ($scope, $element, $attrs, $controllers, $transclude) { |
127 | 150 | esNgAntd.createStyle("ant-table", style); | ... | ... |
build/index.js
... | ... | @@ -27,7 +27,7 @@ require("./Spin/Spin"); |
27 | 27 | require("./Card/Card"); |
28 | 28 | require("./Table/Table"); |
29 | 29 | require("./Textarea/Textarea"); |
30 | -require("./Option/Option"); | |
30 | +require("./SelectOption/SelectOption"); | |
31 | 31 | require("./Select/Select"); |
32 | 32 | require("./Divider/Divider"); |
33 | 33 | require("./Row/Row"); | ... | ... |
dist/ng-antd.js
... | ... | @@ -137,7 +137,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Emp |
137 | 137 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
138 | 138 | |
139 | 139 | "use strict"; |
140 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Form_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Form.html */ \"./build/Form/Form.html\");\n/* harmony import */ var antd_lib_form_style_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/form/style/index.css */ \"./node_modules/antd/lib/form/style/index.css\");\n\n\nangular.module(\"esNgAntd\").directive(\"esForm\", function (esNgAntd) {\n return {\n controllerAs: \"esForm\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n name: \"@\",\n labelCol: \"=\",\n wrapperCol: \"=\",\n onFinish: \"&\",\n },\n template: _Form_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {};\n\n $scope.handleSubmit = function () {\n let values = {};\n let inputs = $element[0].querySelectorAll(\"input\");\n\n for (let i = 0; i < inputs.length; i++) {\n const element = inputs[i];\n values[element.id.split(\"_\")[1]] = element.value;\n }\n\n $scope.onFinish({\n values: values,\n });\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-form\", antd_lib_form_style_index_css__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n let inputs = $element[0].querySelectorAll(\"input\");\n\n for (let i = 0; i < inputs.length; i++) {\n const element = inputs[i];\n element.id = $scope.name + \"_\" + element.id;\n }\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Form/Form.js?"); | |
140 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Form_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Form.html */ \"./build/Form/Form.html\");\n/* harmony import */ var antd_lib_form_style_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/form/style/index.css */ \"./node_modules/antd/lib/form/style/index.css\");\n\n\nangular.module(\"esNgAntd\").directive(\"esForm\", function (esNgAntd) {\n return {\n controllerAs: \"esForm\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n name: \"@\",\n labelCol: \"=\",\n wrapperCol: \"=\",\n onFinish: \"&\",\n form: \"=\",\n },\n template: _Form_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n formItems: [],\n };\n\n $scope.resetFields = function () {\n $scope.state.formItems.forEach(function (item) {\n item.value = null;\n });\n };\n\n $scope.handleSubmit = function () {\n let values = {};\n $scope.state.formItems.forEach(function (item) {\n let name = item.esFormItem && item.esFormItem.name;\n let value = item.value || item.state.value || null;\n values[name] = value;\n }); // for (let i = 0; i < inputs.length; i++) {\n // const element = inputs[i];\n // const value = element.value === \"\" ? null : element.value;\n // if (element.id) {\n // if (element.id.split(\"_\").length > 1) {\n // values[element.id.split(\"_\")[1]] = value;\n // } else {\n // values[element.id] = value;\n // }\n // }\n // }\n\n $scope.onFinish({\n values: values,\n });\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-form\", antd_lib_form_style_index_css__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n $scope.form = $scope;\n\n if ($scope.name) {\n let inputs = $element[0].querySelectorAll(\"input\");\n\n for (let i = 0; i < inputs.length; i++) {\n const element = inputs[i];\n element.id = $scope.name + \"_\" + element.id;\n }\n }\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Form/Form.js?"); | |
141 | 141 | |
142 | 142 | /***/ }), |
143 | 143 | |
... | ... | @@ -159,7 +159,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _For |
159 | 159 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
160 | 160 | |
161 | 161 | "use strict"; |
162 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ant_design_icons_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/icons-svg */ \"./node_modules/@ant-design/icons-svg/es/index.js\");\n/* harmony import */ var _ant_design_icons_svg_es_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/icons-svg/es/helpers */ \"./node_modules/@ant-design/icons-svg/es/helpers.js\");\n\n\nangular.module(\"esNgAntd\").directive(\"esIcon\", function () {\n return {\n controllerAs: \"esIcon\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n type: \"@\",\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n $element.replaceWith(\n `<span class=\"anticon\">${(0,_ant_design_icons_svg_es_helpers__WEBPACK_IMPORTED_MODULE_0__.renderIconDefinitionToSVGElement)(\n _ant_design_icons_svg__WEBPACK_IMPORTED_MODULE_1__[$scope.type],\n {\n extraSVGAttrs: {\n width: \"1em\",\n height: \"1em\",\n fill: \"currentColor\",\n },\n }\n )}</span>`\n );\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Icon/Icon.js?"); | |
162 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ant_design_icons_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/icons-svg */ \"./node_modules/@ant-design/icons-svg/es/index.js\");\n/* harmony import */ var _ant_design_icons_svg_es_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/icons-svg/es/helpers */ \"./node_modules/@ant-design/icons-svg/es/helpers.js\");\n\n\nangular.module(\"esNgAntd\").directive(\"esIcon\", function ($compile) {\n return {\n controllerAs: \"esIcon\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n type: \"@\",\n },\n template: `<span class=\"anticon\"></span>`,\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n let template = (0,_ant_design_icons_svg_es_helpers__WEBPACK_IMPORTED_MODULE_0__.renderIconDefinitionToSVGElement)(\n _ant_design_icons_svg__WEBPACK_IMPORTED_MODULE_1__[$scope.type],\n {\n extraSVGAttrs: {\n width: \"1em\",\n height: \"1em\",\n fill: \"currentColor\",\n },\n }\n );\n $element.append(template);\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Icon/Icon.js?"); | |
163 | 163 | |
164 | 164 | /***/ }), |
165 | 165 | |
... | ... | @@ -192,7 +192,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Ima |
192 | 192 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
193 | 193 | |
194 | 194 | "use strict"; |
195 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_input_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/input/style/index.css */ \"./node_modules/antd/lib/input/style/index.css\");\n\nangular.module(\"esNgAntd\").directive(\"esInput\", function ($compile, esNgAntd) {\n return {\n controllerAs: \"esInput\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n value: \"@\",\n placeholder: \"@\",\n addonBefore: \"@\",\n addonAfter: \"@\",\n disabled: \"@\",\n onChange: \"&\",\n maxLength: \"@\",\n },\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n inputEventTarget: null,\n };\n\n $scope.handleClick = function (event) {\n $scope.state.inputEventTarget = event;\n };\n\n $scope.handleChange = function () {\n $scope.onChange({\n event: $scope.state.inputEventTarget,\n });\n };\n\n $scope.getTemplate = function () {\n let maxLengthAttribute = \"\";\n let styleAttribute = \"\";\n let idAttribute;\n\n if ($scope.maxLength) {\n maxLengthAttribute = `maxlength=\"${$scope.maxLength}\"`;\n }\n\n if ($scope.style) {\n styleAttribute = `style=\"${$scope.style}\"`;\n }\n\n if ($scope.esFormItem && $scope.esFormItem.name) {\n idAttribute = `id=\"${$scope.esFormItem.name}\"`;\n }\n\n let templates = [\n `<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}/>`,\n `<span class=\"ant-input-group-wrapper\" ng-if=\"addonBefore||addonAfter\">\n <span class=\"ant-input-wrapper ant-input-group\" style=\"\">\n <span class=\"ant-input-group-addon\" ng-if=\"addonBefore\">{{addonBefore}}</span>\n <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}/>\n <span class=\"ant-input-group-addon\" ng-if=\"addonAfter\">{{addonAfter}}</span>\n </span>\n </span>`,\n ];\n\n if ($scope.addonBefore || $scope.addonAfter) {\n return templates[1];\n } else {\n return templates[0];\n }\n };\n },\n require: [\"?^esFormItem\"],\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n let [esFormItem] = $controllers;\n esNgAntd.createStyle(\"ant-input\", antd_lib_input_style_index_css__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n $scope.esFormItem = esFormItem.getContext();\n $scope.style = $attrs.style;\n $element.replaceWith($compile($scope.getTemplate())($scope));\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Input/Input.js?"); | |
195 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_input_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/input/style/index.css */ \"./node_modules/antd/lib/input/style/index.css\");\n\nangular.module(\"esNgAntd\").directive(\"esInput\", function ($compile, esNgAntd) {\n return {\n controllerAs: \"esInput\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n value: \"@\",\n placeholder: \"@\",\n addonBefore: \"@\",\n addonAfter: \"@\",\n disabled: \"@\",\n onChange: \"&\",\n maxLength: \"@\",\n },\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n inputEventTarget: null,\n };\n\n $scope.handleClick = function (event) {\n $scope.state.inputEventTarget = event;\n };\n\n $scope.handleChange = function () {\n $scope.onChange({\n event: $scope.state.inputEventTarget,\n });\n };\n\n $scope.getTemplate = function () {\n let maxLengthAttribute = \"\";\n let styleAttribute = \"\";\n let idAttribute = \"\";\n\n if ($scope.maxLength) {\n maxLengthAttribute = `maxlength=\"${$scope.maxLength}\"`;\n }\n\n if ($scope.style) {\n styleAttribute = `style=\"${$scope.style}\"`;\n }\n\n if ($scope.esFormItem && $scope.esFormItem.name) {\n idAttribute = `id=\"${$scope.esFormItem.name}\"`;\n }\n\n let templates = [\n `<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}/>`,\n `<span class=\"ant-input-group-wrapper\" ng-if=\"addonBefore||addonAfter\">\n <span class=\"ant-input-wrapper ant-input-group\" style=\"\">\n <span class=\"ant-input-group-addon\" ng-if=\"addonBefore\">{{addonBefore}}</span>\n <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}/>\n <span class=\"ant-input-group-addon\" ng-if=\"addonAfter\">{{addonAfter}}</span>\n </span>\n </span>`,\n ];\n\n if ($scope.addonBefore || $scope.addonAfter) {\n return templates[1];\n } else {\n return templates[0];\n }\n };\n },\n require: [\"?^esFormItem\", \"?^esForm\"],\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n let [esFormItem, esForm] = $controllers;\n esNgAntd.createStyle(\"ant-input\", antd_lib_input_style_index_css__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n $scope.esForm = esForm.getContext();\n $scope.esFormItem = esFormItem.getContext();\n $scope.style = $attrs.style;\n $scope.esForm.state.formItems.push($scope);\n $element.replaceWith($compile($scope.getTemplate())($scope));\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Input/Input.js?"); | |
196 | 196 | |
197 | 197 | /***/ }), |
198 | 198 | |
... | ... | @@ -273,17 +273,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Mod |
273 | 273 | |
274 | 274 | /***/ }), |
275 | 275 | |
276 | -/***/ "./build/Option/Option.js": | |
277 | -/*!********************************!*\ | |
278 | - !*** ./build/Option/Option.js ***! | |
279 | - \********************************/ | |
280 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
281 | - | |
282 | -"use strict"; | |
283 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Option_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Option.html */ \"./build/Option/Option.html\");\n/**\n * 选项\n */\n\nangular.module(\"esNgAntd\").directive(\"esOption\", function () {\n return {\n controllerAs: \"esOption\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n value: \"@\",\n },\n template: _Option_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n label: null,\n };\n },\n require: [\"?^esSelect\"],\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n let [esSelect] = $controllers;\n $scope.esSelect = esSelect.getContext();\n $scope.esSelect.addOption({\n value: $scope.value,\n label: $element.text(),\n });\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Option/Option.js?"); | |
284 | - | |
285 | -/***/ }), | |
286 | - | |
287 | 276 | /***/ "./build/Pagination/Pagination.js": |
288 | 277 | /*!****************************************!*\ |
289 | 278 | !*** ./build/Pagination/Pagination.js ***! |
... | ... | @@ -291,7 +280,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Opt |
291 | 280 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
292 | 281 | |
293 | 282 | "use strict"; |
294 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Pagination_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pagination.html */ \"./build/Pagination/Pagination.html\");\n\nangular.module(\"esNgAntd\").directive(\"esPagination\", function () {\n return {\n controllerAs: \"esPagination\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n defaultCurrent: \"@\",\n current: \"@\",\n total: \"@\",\n defaultPageSize: \"@\",\n pageSize: \"@\",\n onChange: \"&\",\n onShowSizeChange: \"&\",\n showQuickJumper: \"@\",\n showSizeChanger: \"@\",\n },\n template: _Pagination_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n total: null,\n current: null,\n pageSize: null,\n pageNum: null,\n pageNumList: null,\n };\n\n $scope.getPageNum = function () {\n return (\n Math.ceil(\n $scope.state.total /\n ($scope.pageSize || $scope.defaultPageSize || 10)\n ) || 1\n );\n };\n\n $scope.handleNext = function () {\n if ($scope.state.current === $scope.state.pageNum) {\n return false;\n }\n\n $scope.handleClick(++$scope.state.current);\n };\n\n $scope.getPopupContainer = function () {\n return $element[0].querySelector(\".ant-pagination-options\");\n };\n\n $scope.handlePrev = function () {\n if ($scope.state.current === 1) {\n return false;\n }\n\n $scope.handleClick(--$scope.state.current);\n };\n\n $scope.handleClick = function (value) {\n $scope.state.current = value; // 更新回调\n\n $scope.onChange({\n page: $scope.state.current,\n pageSize: $scope.state.pageSize,\n });\n };\n\n $scope.handleChange = function () {\n let current = $scope.state.current;\n\n if ($scope.state.current > $scope.state.pageNum) {\n current = $scope.state.pageNum;\n } else if ($scope.state.current < 1) {\n current = 1;\n }\n\n $scope.onChange({\n page: current,\n pageSize: $scope.state.pageSize,\n });\n };\n\n $scope.handleSelectChange = function (value) {\n $scope.state.current = 1;\n $scope.state.pageSize = parseInt(value);\n $scope.handleChange();\n };\n\n $scope.getCurrent = function (number) {\n if (number > $scope.state.pageNum) {\n return $scope.state.pageNum;\n }\n\n if (number < 1) {\n return 1;\n }\n\n return parseInt(number);\n };\n\n $scope.handleBlur = function (event) {\n let value = event.target.value;\n\n if (!value) {\n return;\n }\n\n $scope.state.current = $scope.getCurrent(value);\n $scope.handleChange();\n event.target.value = null;\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n $scope.state.total = Number($scope.total || 0);\n $scope.state.current = Number(\n $scope.current || $scope.defaultCurrent || 1\n );\n $scope.state.pageSize =\n $scope.pageSize || $scope.defaultPageSize || 10;\n $scope.state.pageNum = $scope.getPageNum();\n $scope.state.pageNumList = Array($scope.state.pageNum)\n .fill(0)\n .map((v, i) => i + 1);\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Pagination/Pagination.js?"); | |
283 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Pagination_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pagination.html */ \"./build/Pagination/Pagination.html\");\n/* harmony import */ var antd_lib_pagination_style_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/pagination/style/index.css */ \"./node_modules/antd/lib/pagination/style/index.css\");\n\n\nangular.module(\"esNgAntd\").directive(\"esPagination\", function (esNgAntd) {\n return {\n controllerAs: \"esPagination\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n defaultCurrent: \"@\",\n current: \"@\",\n total: \"@\",\n defaultPageSize: \"@\",\n pageSize: \"@\",\n onChange: \"&\",\n onShowSizeChange: \"&\",\n showQuickJumper: \"@\",\n showSizeChanger: \"@\",\n },\n template: _Pagination_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n total: null,\n current: null,\n pageSize: null,\n pageNum: null,\n pageNumList: null,\n };\n\n $scope.getPageNum = function () {\n return (\n Math.ceil(\n $scope.state.total /\n ($scope.pageSize || $scope.defaultPageSize || 10)\n ) || 1\n );\n };\n\n $scope.handleNext = function () {\n if ($scope.state.current === $scope.state.pageNum) {\n return false;\n }\n\n $scope.handleClick(++$scope.state.current);\n };\n\n $scope.getPopupContainer = function () {\n return $element[0].querySelector(\".ant-pagination-options\");\n };\n\n $scope.handlePrev = function () {\n if ($scope.state.current === 1) {\n return false;\n }\n\n $scope.handleClick(--$scope.state.current);\n };\n\n $scope.handleClick = function (value) {\n $scope.state.current = value; // 更新回调\n\n $scope.onChange({\n page: $scope.state.current,\n pageSize: $scope.state.pageSize,\n });\n };\n\n $scope.handleChange = function () {\n let current = $scope.state.current;\n\n if ($scope.state.current > $scope.state.pageNum) {\n current = $scope.state.pageNum;\n } else if ($scope.state.current < 1) {\n current = 1;\n }\n\n $scope.onChange({\n page: current,\n pageSize: $scope.state.pageSize,\n });\n };\n\n $scope.handleSelectChange = function (value) {\n $scope.state.current = 1;\n $scope.state.pageSize = parseInt(value);\n $scope.handleChange();\n };\n\n $scope.getCurrent = function (number) {\n if (number > $scope.state.pageNum) {\n return $scope.state.pageNum;\n }\n\n if (number < 1) {\n return 1;\n }\n\n return parseInt(number);\n };\n\n $scope.handleBlur = function (event) {\n let value = event.target.value;\n\n if (!value) {\n return;\n }\n\n $scope.state.current = $scope.getCurrent(value);\n $scope.handleChange();\n event.target.value = null;\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-pagination\", antd_lib_pagination_style_index_css__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n $scope.state.total = Number($scope.total || 0);\n $scope.state.current = Number(\n $scope.current || $scope.defaultCurrent || 1\n );\n $scope.state.pageSize =\n $scope.pageSize || $scope.defaultPageSize || 10;\n $scope.state.pageNum = $scope.getPageNum();\n $scope.state.pageNumList = Array($scope.state.pageNum)\n .fill(0)\n .map((v, i) => i + 1);\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Pagination/Pagination.js?"); | |
295 | 284 | |
296 | 285 | /***/ }), |
297 | 286 | |
... | ... | @@ -357,7 +346,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Row |
357 | 346 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
358 | 347 | |
359 | 348 | "use strict"; |
360 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Select_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Select.html */ \"./build/Select/Select.html\");\n\nangular.module(\"esNgAntd\").directive(\"esSelect\", function ($compile, $timeout) {\n return {\n controllerAs: \"esSelect\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n value: \"@\",\n placeholder: \"@\",\n onChange: \"&\",\n placeholder: \"@\",\n getPopupContainer: \"&\",\n },\n template: _Select_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n open: false,\n childrens: [],\n label: null,\n value: null,\n popup: null,\n };\n\n $scope.addOption = function (option) {\n $scope.state.childrens.push(option);\n };\n\n $scope.handleClick = function (option) {\n $scope.state.open = !$scope.state.open;\n $scope.state.label = option.label;\n $scope.state.value = option.value;\n $scope.onChange({\n value: $scope.state.value,\n });\n };\n\n $scope.getOffset = function (ele) {\n if (!ele || ele.nodeType != 1) {\n return;\n }\n\n let func = $scope.getPopupContainer();\n\n if (typeof func === \"function\" && func() !== undefined) {\n return {\n top: $element[0].offsetTop,\n left: $element[0].offsetLeft,\n };\n } else {\n let rect = ele.getBoundingClientRect();\n let doc = ele.ownerDocument.documentElement;\n return {\n top: rect.top + window.pageYOffset - doc.clientTop,\n left: rect.left + window.pageXOffset - doc.clientLeft,\n };\n }\n };\n\n $scope.myEvent = function () {\n $timeout(() => {\n $scope.state.open = false;\n document.body.removeEventListener(\"click\", $scope.myEvent);\n }, 0);\n };\n\n $scope.handleBlur = function () {\n // 事件绑定\n document.body.addEventListener(\"click\", $scope.myEvent);\n };\n\n $scope.handleOpen = function (event) {\n event.stopPropagation();\n const { height, width } = $element[0].getBoundingClientRect();\n const { top, left } = $scope.getOffset($element[0]);\n let div = document.createElement(\"div\");\n div.style.position = \"absolute\";\n div.style.left = 0;\n div.style.top = 0;\n div.style.width = \"100%\";\n div.appendChild(\n $compile(`<div><div ng-class=\"'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft'+(!state.open?' ant-select-dropdown-hidden':'')\" style=\"width: ${width}px; left: ${left}px; top: ${\n top + height + 2\n }px;\">\n <ul class=\"ant-select-dropdown-menu ant-select-dropdown-menu-root ant-select-dropdown-menu-vertical\">\n <li class=\"ant-select-dropdown-menu-item\" ng-click=\"handleClick(option)\" ng-repeat=\"option in state.childrens\">{{option.label}}</li>\n </ul>\n </div></div>`)($scope)[0]\n );\n\n if ($scope.state.popup === null) {\n let func = $scope.getPopupContainer();\n\n if (typeof func === \"function\" && func() !== undefined) {\n $element[0].style.position = \"relative\";\n $scope.getPopupContainer()().appendChild(div);\n } else {\n document.body.appendChild(div);\n }\n\n $scope.state.popup = div;\n }\n\n $scope.state.open = !$scope.state.open;\n $scope.handleBlur();\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n let option = $scope.state.childrens.find(function (option) {\n return option.value === $scope.value;\n });\n $scope.state.label = option.label;\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Select/Select.js?"); | |
349 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Select_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Select.html */ \"./build/Select/Select.html\");\n/* harmony import */ var antd_lib_select_style_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/select/style/index.css */ \"./node_modules/antd/lib/select/style/index.css\");\n\n\nangular\n .module(\"esNgAntd\")\n .directive(\"esSelect\", function ($compile, $timeout, esNgAntd) {\n return {\n controllerAs: \"esSelect\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n value: \"@\",\n placeholder: \"@\",\n onChange: \"&\",\n placeholder: \"@\",\n getPopupContainer: \"&\",\n },\n template: _Select_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n open: false,\n childrens: [],\n label: null,\n value: null,\n popup: null,\n };\n\n $scope.addOption = function (option) {\n $scope.state.childrens.push(option);\n };\n\n $scope.handleClick = function (option) {\n $scope.state.open = !$scope.state.open;\n $scope.state.label = option.label;\n $scope.state.value = option.value;\n $scope.onChange({\n value: $scope.state.value,\n });\n };\n\n $scope.getOffset = function (ele) {\n if (!ele || ele.nodeType != 1) {\n return;\n }\n\n let func = $scope.getPopupContainer();\n\n if (typeof func === \"function\" && func() !== undefined) {\n return {\n top: $element[0].offsetTop,\n left: $element[0].offsetLeft,\n };\n } else {\n let rect = ele.getBoundingClientRect();\n let doc = ele.ownerDocument.documentElement;\n return {\n top: rect.top + window.pageYOffset - doc.clientTop,\n left:\n rect.left + window.pageXOffset - doc.clientLeft,\n };\n }\n };\n\n $scope.myEvent = function () {\n $timeout(() => {\n $scope.state.open = false;\n document.body.removeEventListener(\n \"click\",\n $scope.myEvent\n );\n }, 0);\n };\n\n $scope.handleBlur = function () {\n // 事件绑定\n document.body.addEventListener(\"click\", $scope.myEvent);\n };\n\n $scope.handleOpen = function (event) {\n event.stopPropagation();\n const { height, width } =\n $element[0].getBoundingClientRect();\n const { top, left } = $scope.getOffset($element[0]); // 处理标签\n\n $scope.state.childrens.forEach(function (item) {\n item.label = item.element.text();\n });\n let div = document.createElement(\"div\");\n div.style.position = \"absolute\";\n div.style.left = 0;\n div.style.top = 0;\n div.style.width = \"100%\";\n div.appendChild(\n $compile(`<div><div ng-class=\"'ant-select-dropdown ant-select-dropdown-placement-bottomLeft'+(!state.open?' ant-select-dropdown-hidden':'')\" style=\"width: ${width}px; left: ${left}px; top: ${\n top + height + 2\n }px;\">\n <div class=\"ant-select-item ant-select-item-option\" ng-click=\"handleClick(option)\" ng-repeat=\"option in state.childrens\">\n <div class=\"ant-select-item-option-content\">{{option.label}}</div>\n </div>\n </div></div>`)($scope)[0]\n );\n\n if ($scope.state.popup === null) {\n let func = $scope.getPopupContainer();\n\n if (\n typeof func === \"function\" &&\n func() !== undefined\n ) {\n $element[0].style.position = \"relative\";\n $scope.getPopupContainer()().appendChild(div);\n } else {\n document.body.appendChild(div);\n }\n\n $scope.state.popup = div;\n }\n\n $scope.state.open = !$scope.state.open;\n $scope.handleBlur();\n };\n },\n require: [\"?^esForm\", \"?^esFormItem\"],\n link: function (\n $scope,\n $element,\n $attrs,\n $controllers,\n $transclude\n ) {\n let [esForm, esFormItem] = $controllers;\n esNgAntd.createStyle(\"ant-select\", antd_lib_select_style_index_css__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n $scope.esForm = esForm.getContext();\n $scope.esFormItem = esFormItem.getContext();\n $scope.esForm.state.formItems.push($scope);\n let option = $scope.state.childrens.find(function (option) {\n return option.value === $scope.value;\n });\n\n if (option) {\n $scope.state.label = option.label;\n }\n },\n };\n });\n\n\n//# sourceURL=webpack://ng-antd/./build/Select/Select.js?"); | |
350 | + | |
351 | +/***/ }), | |
352 | + | |
353 | +/***/ "./build/SelectOption/SelectOption.js": | |
354 | +/*!********************************************!*\ | |
355 | + !*** ./build/SelectOption/SelectOption.js ***! | |
356 | + \********************************************/ | |
357 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
358 | + | |
359 | +"use strict"; | |
360 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _SelectOption_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SelectOption.html */ \"./build/SelectOption/SelectOption.html\");\n/**\n * 选项\n */\n\nangular.module(\"esNgAntd\").directive(\"esSelectOption\", function () {\n return {\n controllerAs: \"esSelectOption\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n value: \"@\",\n },\n template: _SelectOption_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n label: null,\n };\n },\n require: [\"?^esSelect\"],\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n let [esSelect] = $controllers;\n $scope.esSelect = esSelect.getContext();\n $scope.esSelect.addOption({\n value: $scope.value,\n label: null,\n element: $element,\n });\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/SelectOption/SelectOption.js?"); | |
361 | 361 | |
362 | 362 | /***/ }), |
363 | 363 | |
... | ... | @@ -400,7 +400,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Tab |
400 | 400 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
401 | 401 | |
402 | 402 | "use strict"; |
403 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Table_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Table.html */ \"./build/Table/Table.html\");\n/* harmony import */ var antd_lib_table_style_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/table/style/index.css */ \"./node_modules/antd/lib/table/style/index.css\");\n\n\nangular.module(\"esNgAntd\").directive(\"esTable\", function (esNgAntd) {\n return {\n controllerAs: \"esTable\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n columns: \"=\",\n dSource: \"=\",\n rowSelection: \"=\",\n rowKey: \"@\",\n loading: \"@\",\n },\n template: _Table_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n dataSource: [],\n selectedrecordKeys: [],\n selectedrecords: [],\n isSelectAll: false,\n rowKey: $scope.rowKey || \"id\",\n };\n $scope.watch = {\n dSource: (newValue) => {\n if (newValue !== undefined) {\n let dataSource = [];\n newValue.forEach((record, index) => {\n let row = {};\n\n if ($scope.rowSelection) {\n row.checked = false;\n row.disabled = false;\n }\n\n if (\n $scope.rowSelection &&\n typeof $scope.rowSelection.getCheckboxProps ===\n \"function\"\n ) {\n let extraAttr =\n $scope.rowSelection.getCheckboxProps(\n record\n );\n row = Object.assign(row, extraAttr);\n }\n\n $scope.columns.forEach((column) => {\n row[column.key] = column.render\n ? column.render(\n record[column.key],\n record,\n index\n )\n : record[column.key];\n }); // 主键\n\n if ($scope.rowKey !== undefined) {\n row[$scope.state.rowKey] =\n record[$scope.state.rowKey];\n } else {\n row[$scope.state.rowKey] = index + 1;\n }\n\n dataSource[index] = row;\n });\n $scope.state.dataSource = dataSource;\n }\n },\n };\n\n for (const key in $scope.watch) {\n $scope.$watch(key, $scope.watch[key], true);\n }\n\n $scope.handleSelectAll = function (event) {\n $scope.state.isSelectAll = event.target.checked;\n $scope.state.selectedrecordKeys = [];\n $scope.state.selectedrecords = [];\n $scope.state.dataSource.map((record, key) => {\n if (record.disabled === false) {\n record.checked = event.target.checked;\n }\n\n if (record.checked) {\n $scope.state.selectedrecordKeys.push(key);\n $scope.state.selectedrecords.push($scope.dSource[key]);\n }\n\n return record;\n });\n $scope.rowSelection.onChange(\n $scope.state.selectedrecordKeys,\n $scope.state.selectedrecords\n );\n };\n\n $scope.handleSelect = function (event, index) {\n let pos = $scope.state.selectedrecordKeys.findIndex(\n (value) => value === index\n );\n\n if (event.target.checked && pos === -1) {\n $scope.state.selectedrecordKeys.push(index);\n $scope.state.selectedrecords.push($scope.dSource[index]);\n } else {\n $scope.state.selectedrecordKeys.splice(pos, 1);\n $scope.state.selectedrecords.splice(pos, 1);\n }\n\n if ($scope.state.selectedrecordKeys.length === 0) {\n $scope.state.isSelectAll = false;\n }\n\n $scope.rowSelection.onChange(\n $scope.state.selectedrecordKeys,\n $scope.state.selectedrecords\n );\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-table\", antd_lib_table_style_index_css__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Table/Table.js?"); | |
403 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Table_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Table.html */ \"./build/Table/Table.html\");\n/* harmony import */ var antd_lib_table_style_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/table/style/index.css */ \"./node_modules/antd/lib/table/style/index.css\");\n\n\nangular.module(\"esNgAntd\").directive(\"esTable\", function (esNgAntd) {\n return {\n controllerAs: \"esTable\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n columns: \"=\",\n dSource: \"=\",\n rowSelection: \"=\",\n rowKey: \"@\",\n loading: \"@\",\n onChange: \"&\",\n },\n template: _Table_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n controller: function ($scope, $element) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.state = {\n dataSource: [],\n selectedrecordKeys: [],\n selectedrecords: [],\n isSelectAll: false,\n rowKey: $scope.rowKey || \"id\",\n sortDirections: [\"ascend\", \"descend\"],\n sorter: {\n field: null,\n order: null,\n },\n };\n $scope.watch = {\n dSource: (newValue) => {\n if (newValue !== undefined) {\n let dataSource = [];\n newValue.forEach((record, index) => {\n let row = {};\n\n if ($scope.rowSelection) {\n row.checked = false;\n row.disabled = false;\n }\n\n if (\n $scope.rowSelection &&\n typeof $scope.rowSelection.getCheckboxProps ===\n \"function\"\n ) {\n let extraAttr =\n $scope.rowSelection.getCheckboxProps(\n record\n );\n row = Object.assign(row, extraAttr);\n }\n\n $scope.columns.forEach((column) => {\n row[column.key] = column.render\n ? column.render(\n record[column.key],\n record,\n index\n )\n : record[column.key];\n }); // 主键\n\n if ($scope.rowKey !== undefined) {\n row[$scope.state.rowKey] =\n record[$scope.state.rowKey];\n } else {\n row[$scope.state.rowKey] = index + 1;\n }\n\n dataSource[index] = row;\n });\n $scope.state.dataSource = dataSource;\n }\n },\n };\n\n for (const key in $scope.watch) {\n $scope.$watch(key, $scope.watch[key], true);\n }\n\n $scope.handleSelectAll = function (event) {\n $scope.state.isSelectAll = event.target.checked;\n $scope.state.selectedrecordKeys = [];\n $scope.state.selectedrecords = [];\n $scope.state.dataSource.map((record, key) => {\n if (record.disabled === false) {\n record.checked = event.target.checked;\n }\n\n if (record.checked) {\n $scope.state.selectedrecordKeys.push(key);\n $scope.state.selectedrecords.push($scope.dSource[key]);\n }\n\n return record;\n });\n $scope.rowSelection.onChange(\n $scope.state.selectedrecordKeys,\n $scope.state.selectedrecords\n );\n };\n\n $scope.handleSelect = function (event, index) {\n let pos = $scope.state.selectedrecordKeys.findIndex(\n (value) => value === index\n );\n\n if (event.target.checked && pos === -1) {\n $scope.state.selectedrecordKeys.push(index);\n $scope.state.selectedrecords.push($scope.dSource[index]);\n } else {\n $scope.state.selectedrecordKeys.splice(pos, 1);\n $scope.state.selectedrecords.splice(pos, 1);\n }\n\n if ($scope.state.selectedrecordKeys.length === 0) {\n $scope.state.isSelectAll = false;\n }\n\n $scope.rowSelection.onChange(\n $scope.state.selectedrecordKeys,\n $scope.state.selectedrecords\n );\n };\n\n $scope.handleSorter = function (key) {\n $scope.state.sorter.field = key;\n\n if ($scope.state.sorter.order === null) {\n $scope.state.sorter.order = \"ascend\";\n } else if ($scope.state.sorter.order === \"ascend\") {\n $scope.state.sorter.order = \"descend\";\n } else if ($scope.state.sorter.order === \"descend\") {\n $scope.state.sorter.order = null;\n $scope.state.sorter.field = null;\n }\n\n $scope.onChange({\n sorter: $scope.state.sorter,\n });\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-table\", antd_lib_table_style_index_css__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Table/Table.js?"); | |
404 | 404 | |
405 | 405 | /***/ }), |
406 | 406 | |
... | ... | @@ -432,7 +432,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Tex |
432 | 432 | \************************/ |
433 | 433 | /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { |
434 | 434 | |
435 | -eval("angular.module(\"esNgAntd\", []);\n__webpack_require__(/*! ./Icon/Icon */ \"./build/Icon/Icon.js\");\n__webpack_require__(/*! ./Common/Common */ \"./build/Common/Common.js\");\n__webpack_require__(/*! ./Slot/Slot */ \"./build/Slot/Slot.js\");\n__webpack_require__(/*! ./Button/Button */ \"./build/Button/Button.js\");\n__webpack_require__(/*! ./Modal/Modal */ \"./build/Modal/Modal.js\");\n__webpack_require__(/*! ./Input/Input */ \"./build/Input/Input.js\");\n__webpack_require__(/*! ./InputGroup/InputGroup */ \"./build/InputGroup/InputGroup.js\");\n__webpack_require__(/*! ./InputNumber/InputNumber */ \"./build/InputNumber/InputNumber.js\");\n__webpack_require__(/*! ./InputSearch/InputSearch */ \"./build/InputSearch/InputSearch.js\");\n__webpack_require__(/*! ./Checkbox/Checkbox */ \"./build/Checkbox/Checkbox.js\");\n__webpack_require__(/*! ./CheckableTag/CheckableTag */ \"./build/CheckableTag/CheckableTag.js\");\n__webpack_require__(/*! ./Popover/Popover */ \"./build/Popover/Popover.js\");\n__webpack_require__(/*! ./List/List */ \"./build/List/List.js\");\n__webpack_require__(/*! ./ListItem/ListItem */ \"./build/ListItem/ListItem.js\");\n__webpack_require__(/*! ./Form/Form */ \"./build/Form/Form.js\");\n__webpack_require__(/*! ./FormItem/FormItem */ \"./build/FormItem/FormItem.js\");\n__webpack_require__(/*! ./Radio/Radio */ \"./build/Radio/Radio.js\");\n__webpack_require__(/*! ./RadioGroup/RadioGroup */ \"./build/RadioGroup/RadioGroup.js\");\n__webpack_require__(/*! ./RadioButton/RadioButton */ \"./build/RadioButton/RadioButton.js\");\n__webpack_require__(/*! ./TabPane/TabPane */ \"./build/TabPane/TabPane.js\");\n__webpack_require__(/*! ./Tabs/Tabs */ \"./build/Tabs/Tabs.js\");\n__webpack_require__(/*! ./Empty/Empty */ \"./build/Empty/Empty.js\");\n__webpack_require__(/*! ./ImagePreviewGroup/ImagePreviewGroup */ \"./build/ImagePreviewGroup/ImagePreviewGroup.js\");\n__webpack_require__(/*! ./Image/Image */ \"./build/Image/Image.js\");\n__webpack_require__(/*! ./Spin/Spin */ \"./build/Spin/Spin.js\");\n__webpack_require__(/*! ./Card/Card */ \"./build/Card/Card.js\");\n__webpack_require__(/*! ./Table/Table */ \"./build/Table/Table.js\");\n__webpack_require__(/*! ./Textarea/Textarea */ \"./build/Textarea/Textarea.js\");\n__webpack_require__(/*! ./Option/Option */ \"./build/Option/Option.js\");\n__webpack_require__(/*! ./Select/Select */ \"./build/Select/Select.js\");\n__webpack_require__(/*! ./Divider/Divider */ \"./build/Divider/Divider.js\");\n__webpack_require__(/*! ./Row/Row */ \"./build/Row/Row.js\");\n__webpack_require__(/*! ./Col/Col */ \"./build/Col/Col.js\");\n__webpack_require__(/*! ./Pagination/Pagination */ \"./build/Pagination/Pagination.js\");\n__webpack_require__(/*! ./Message/Message */ \"./build/Message/Message.js\");\n__webpack_require__(/*! ./Alert/Alert */ \"./build/Alert/Alert.js\");\n__webpack_require__(/*! ./Breadcrumb/Breadcrumb */ \"./build/Breadcrumb/Breadcrumb.js\");\n__webpack_require__(/*! ./BreadcrumbItem/BreadcrumbItem */ \"./build/BreadcrumbItem/BreadcrumbItem.js\");\n\n//# sourceURL=webpack://ng-antd/./build/index.js?"); | |
435 | +eval("angular.module(\"esNgAntd\", []);\n__webpack_require__(/*! ./Icon/Icon */ \"./build/Icon/Icon.js\");\n__webpack_require__(/*! ./Common/Common */ \"./build/Common/Common.js\");\n__webpack_require__(/*! ./Slot/Slot */ \"./build/Slot/Slot.js\");\n__webpack_require__(/*! ./Button/Button */ \"./build/Button/Button.js\");\n__webpack_require__(/*! ./Modal/Modal */ \"./build/Modal/Modal.js\");\n__webpack_require__(/*! ./Input/Input */ \"./build/Input/Input.js\");\n__webpack_require__(/*! ./InputGroup/InputGroup */ \"./build/InputGroup/InputGroup.js\");\n__webpack_require__(/*! ./InputNumber/InputNumber */ \"./build/InputNumber/InputNumber.js\");\n__webpack_require__(/*! ./InputSearch/InputSearch */ \"./build/InputSearch/InputSearch.js\");\n__webpack_require__(/*! ./Checkbox/Checkbox */ \"./build/Checkbox/Checkbox.js\");\n__webpack_require__(/*! ./CheckableTag/CheckableTag */ \"./build/CheckableTag/CheckableTag.js\");\n__webpack_require__(/*! ./Popover/Popover */ \"./build/Popover/Popover.js\");\n__webpack_require__(/*! ./List/List */ \"./build/List/List.js\");\n__webpack_require__(/*! ./ListItem/ListItem */ \"./build/ListItem/ListItem.js\");\n__webpack_require__(/*! ./Form/Form */ \"./build/Form/Form.js\");\n__webpack_require__(/*! ./FormItem/FormItem */ \"./build/FormItem/FormItem.js\");\n__webpack_require__(/*! ./Radio/Radio */ \"./build/Radio/Radio.js\");\n__webpack_require__(/*! ./RadioGroup/RadioGroup */ \"./build/RadioGroup/RadioGroup.js\");\n__webpack_require__(/*! ./RadioButton/RadioButton */ \"./build/RadioButton/RadioButton.js\");\n__webpack_require__(/*! ./TabPane/TabPane */ \"./build/TabPane/TabPane.js\");\n__webpack_require__(/*! ./Tabs/Tabs */ \"./build/Tabs/Tabs.js\");\n__webpack_require__(/*! ./Empty/Empty */ \"./build/Empty/Empty.js\");\n__webpack_require__(/*! ./ImagePreviewGroup/ImagePreviewGroup */ \"./build/ImagePreviewGroup/ImagePreviewGroup.js\");\n__webpack_require__(/*! ./Image/Image */ \"./build/Image/Image.js\");\n__webpack_require__(/*! ./Spin/Spin */ \"./build/Spin/Spin.js\");\n__webpack_require__(/*! ./Card/Card */ \"./build/Card/Card.js\");\n__webpack_require__(/*! ./Table/Table */ \"./build/Table/Table.js\");\n__webpack_require__(/*! ./Textarea/Textarea */ \"./build/Textarea/Textarea.js\");\n__webpack_require__(/*! ./SelectOption/SelectOption */ \"./build/SelectOption/SelectOption.js\");\n__webpack_require__(/*! ./Select/Select */ \"./build/Select/Select.js\");\n__webpack_require__(/*! ./Divider/Divider */ \"./build/Divider/Divider.js\");\n__webpack_require__(/*! ./Row/Row */ \"./build/Row/Row.js\");\n__webpack_require__(/*! ./Col/Col */ \"./build/Col/Col.js\");\n__webpack_require__(/*! ./Pagination/Pagination */ \"./build/Pagination/Pagination.js\");\n__webpack_require__(/*! ./Message/Message */ \"./build/Message/Message.js\");\n__webpack_require__(/*! ./Alert/Alert */ \"./build/Alert/Alert.js\");\n__webpack_require__(/*! ./Breadcrumb/Breadcrumb */ \"./build/Breadcrumb/Breadcrumb.js\");\n__webpack_require__(/*! ./BreadcrumbItem/BreadcrumbItem */ \"./build/BreadcrumbItem/BreadcrumbItem.js\");\n\n//# sourceURL=webpack://ng-antd/./build/index.js?"); | |
436 | 436 | |
437 | 437 | /***/ }), |
438 | 438 | |
... | ... | @@ -9269,6 +9269,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac |
9269 | 9269 | |
9270 | 9270 | /***/ }), |
9271 | 9271 | |
9272 | +/***/ "./node_modules/antd/lib/pagination/style/index.css": | |
9273 | +/*!**********************************************************!*\ | |
9274 | + !*** ./node_modules/antd/lib/pagination/style/index.css ***! | |
9275 | + \**********************************************************/ | |
9276 | +/***/ ((module, __webpack_exports__, __webpack_require__) => { | |
9277 | + | |
9278 | +"use strict"; | |
9279 | +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/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\\n/* stylelint-disable no-duplicate-selectors */\\n/* stylelint-disable */\\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\\n.ant-pagination {\\n box-sizing: border-box;\\n margin: 0;\\n padding: 0;\\n color: rgba(0, 0, 0, 0.85);\\n font-size: 14px;\\n font-variant: tabular-nums;\\n line-height: 1.5715;\\n list-style: none;\\n font-feature-settings: 'tnum';\\n}\\n.ant-pagination ul,\\n.ant-pagination ol {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\n.ant-pagination::after {\\n display: block;\\n clear: both;\\n height: 0;\\n overflow: hidden;\\n visibility: hidden;\\n content: ' ';\\n}\\n.ant-pagination-total-text {\\n display: inline-block;\\n height: 32px;\\n margin-right: 8px;\\n line-height: 30px;\\n vertical-align: middle;\\n}\\n.ant-pagination-item {\\n display: inline-block;\\n min-width: 32px;\\n height: 32px;\\n margin-right: 8px;\\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\\n line-height: 30px;\\n text-align: center;\\n vertical-align: middle;\\n list-style: none;\\n background-color: #fff;\\n border: 1px solid #d9d9d9;\\n border-radius: 2px;\\n outline: 0;\\n cursor: pointer;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n}\\n.ant-pagination-item a {\\n display: block;\\n padding: 0 6px;\\n color: rgba(0, 0, 0, 0.85);\\n transition: none;\\n}\\n.ant-pagination-item a:hover {\\n text-decoration: none;\\n}\\n.ant-pagination-item:focus-visible,\\n.ant-pagination-item:hover {\\n border-color: #1890ff;\\n transition: all 0.3s;\\n}\\n.ant-pagination-item:focus-visible a,\\n.ant-pagination-item:hover a {\\n color: #1890ff;\\n}\\n.ant-pagination-item-active {\\n font-weight: 500;\\n background: #fff;\\n border-color: #1890ff;\\n}\\n.ant-pagination-item-active a {\\n color: #1890ff;\\n}\\n.ant-pagination-item-active:focus-visible,\\n.ant-pagination-item-active:hover {\\n border-color: #40a9ff;\\n}\\n.ant-pagination-item-active:focus-visible a,\\n.ant-pagination-item-active:hover a {\\n color: #40a9ff;\\n}\\n.ant-pagination-jump-prev,\\n.ant-pagination-jump-next {\\n outline: 0;\\n}\\n.ant-pagination-jump-prev .ant-pagination-item-container,\\n.ant-pagination-jump-next .ant-pagination-item-container {\\n position: relative;\\n}\\n.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon,\\n.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon {\\n color: #1890ff;\\n font-size: 12px;\\n letter-spacing: -1px;\\n opacity: 0;\\n transition: all 0.2s;\\n}\\n.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon-svg,\\n.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon-svg {\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n margin: auto;\\n}\\n.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis,\\n.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis {\\n position: absolute;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n display: block;\\n margin: auto;\\n color: rgba(0, 0, 0, 0.25);\\n font-family: Arial, Helvetica, sans-serif;\\n letter-spacing: 2px;\\n text-align: center;\\n text-indent: 0.13em;\\n opacity: 1;\\n transition: all 0.2s;\\n}\\n.ant-pagination-jump-prev:focus-visible .ant-pagination-item-link-icon,\\n.ant-pagination-jump-next:focus-visible .ant-pagination-item-link-icon,\\n.ant-pagination-jump-prev:hover .ant-pagination-item-link-icon,\\n.ant-pagination-jump-next:hover .ant-pagination-item-link-icon {\\n opacity: 1;\\n}\\n.ant-pagination-jump-prev:focus-visible .ant-pagination-item-ellipsis,\\n.ant-pagination-jump-next:focus-visible .ant-pagination-item-ellipsis,\\n.ant-pagination-jump-prev:hover .ant-pagination-item-ellipsis,\\n.ant-pagination-jump-next:hover .ant-pagination-item-ellipsis {\\n opacity: 0;\\n}\\n.ant-pagination-prev,\\n.ant-pagination-jump-prev,\\n.ant-pagination-jump-next {\\n margin-right: 8px;\\n}\\n.ant-pagination-prev,\\n.ant-pagination-next,\\n.ant-pagination-jump-prev,\\n.ant-pagination-jump-next {\\n display: inline-block;\\n min-width: 32px;\\n height: 32px;\\n color: rgba(0, 0, 0, 0.85);\\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\\n line-height: 32px;\\n text-align: center;\\n vertical-align: middle;\\n list-style: none;\\n border-radius: 2px;\\n cursor: pointer;\\n transition: all 0.3s;\\n}\\n.ant-pagination-prev,\\n.ant-pagination-next {\\n font-family: Arial, Helvetica, sans-serif;\\n outline: 0;\\n}\\n.ant-pagination-prev button,\\n.ant-pagination-next button {\\n color: rgba(0, 0, 0, 0.85);\\n cursor: pointer;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n}\\n.ant-pagination-prev:hover button,\\n.ant-pagination-next:hover button {\\n border-color: #40a9ff;\\n}\\n.ant-pagination-prev .ant-pagination-item-link,\\n.ant-pagination-next .ant-pagination-item-link {\\n display: block;\\n width: 100%;\\n height: 100%;\\n padding: 0;\\n font-size: 12px;\\n text-align: center;\\n background-color: #fff;\\n border: 1px solid #d9d9d9;\\n border-radius: 2px;\\n outline: none;\\n transition: all 0.3s;\\n}\\n.ant-pagination-prev:focus-visible .ant-pagination-item-link,\\n.ant-pagination-next:focus-visible .ant-pagination-item-link,\\n.ant-pagination-prev:hover .ant-pagination-item-link,\\n.ant-pagination-next:hover .ant-pagination-item-link {\\n color: #1890ff;\\n border-color: #1890ff;\\n}\\n.ant-pagination-disabled,\\n.ant-pagination-disabled:hover,\\n.ant-pagination-disabled:focus-visible {\\n cursor: not-allowed;\\n}\\n.ant-pagination-disabled .ant-pagination-item-link,\\n.ant-pagination-disabled:hover .ant-pagination-item-link,\\n.ant-pagination-disabled:focus-visible .ant-pagination-item-link {\\n color: rgba(0, 0, 0, 0.25);\\n border-color: #d9d9d9;\\n cursor: not-allowed;\\n}\\n.ant-pagination-slash {\\n margin: 0 10px 0 5px;\\n}\\n.ant-pagination-options {\\n display: inline-block;\\n margin-left: 16px;\\n vertical-align: middle;\\n}\\n@media all and (-ms-high-contrast: none) {\\n .ant-pagination-options *::-ms-backdrop,\\n .ant-pagination-options {\\n vertical-align: top;\\n }\\n}\\n.ant-pagination-options-size-changer.ant-select {\\n display: inline-block;\\n width: auto;\\n}\\n.ant-pagination-options-quick-jumper {\\n display: inline-block;\\n height: 32px;\\n margin-left: 8px;\\n line-height: 32px;\\n vertical-align: top;\\n}\\n.ant-pagination-options-quick-jumper input {\\n position: relative;\\n display: inline-block;\\n width: 100%;\\n min-width: 0;\\n padding: 4px 11px;\\n color: rgba(0, 0, 0, 0.85);\\n font-size: 14px;\\n line-height: 1.5715;\\n background-color: #fff;\\n background-image: none;\\n border: 1px solid #d9d9d9;\\n border-radius: 2px;\\n transition: all 0.3s;\\n /* stylelint-disable-next-line selector-no-vendor-prefix */\\n width: 50px;\\n height: 32px;\\n margin: 0 8px;\\n}\\n.ant-pagination-options-quick-jumper input::-moz-placeholder {\\n opacity: 1;\\n}\\n.ant-pagination-options-quick-jumper input:-ms-input-placeholder {\\n color: #bfbfbf;\\n -ms-user-select: none;\\n user-select: none;\\n}\\n.ant-pagination-options-quick-jumper input::placeholder {\\n color: #bfbfbf;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n}\\n.ant-pagination-options-quick-jumper input:-moz-placeholder-shown {\\n text-overflow: ellipsis;\\n}\\n.ant-pagination-options-quick-jumper input:-ms-input-placeholder {\\n text-overflow: ellipsis;\\n}\\n.ant-pagination-options-quick-jumper input:placeholder-shown {\\n text-overflow: ellipsis;\\n}\\n.ant-pagination-options-quick-jumper input:hover {\\n border-color: #40a9ff;\\n border-right-width: 1px !important;\\n}\\n.ant-pagination-options-quick-jumper input:focus,\\n.ant-pagination-options-quick-jumper input-focused {\\n border-color: #40a9ff;\\n box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\\n border-right-width: 1px !important;\\n outline: 0;\\n}\\n.ant-pagination-options-quick-jumper input-disabled {\\n color: rgba(0, 0, 0, 0.25);\\n background-color: #f5f5f5;\\n border-color: #d9d9d9;\\n box-shadow: none;\\n cursor: not-allowed;\\n opacity: 1;\\n}\\n.ant-pagination-options-quick-jumper input-disabled:hover {\\n border-color: #d9d9d9;\\n border-right-width: 1px !important;\\n}\\n.ant-pagination-options-quick-jumper input[disabled] {\\n color: rgba(0, 0, 0, 0.25);\\n background-color: #f5f5f5;\\n border-color: #d9d9d9;\\n box-shadow: none;\\n cursor: not-allowed;\\n opacity: 1;\\n}\\n.ant-pagination-options-quick-jumper input[disabled]:hover {\\n border-color: #d9d9d9;\\n border-right-width: 1px !important;\\n}\\n.ant-pagination-options-quick-jumper input-borderless,\\n.ant-pagination-options-quick-jumper input-borderless:hover,\\n.ant-pagination-options-quick-jumper input-borderless:focus,\\n.ant-pagination-options-quick-jumper input-borderless-focused,\\n.ant-pagination-options-quick-jumper input-borderless-disabled,\\n.ant-pagination-options-quick-jumper input-borderless[disabled] {\\n background-color: transparent;\\n border: none;\\n box-shadow: none;\\n}\\ntextarea.ant-pagination-options-quick-jumper input {\\n max-width: 100%;\\n height: auto;\\n min-height: 32px;\\n line-height: 1.5715;\\n vertical-align: bottom;\\n transition: all 0.3s, height 0s;\\n}\\n.ant-pagination-options-quick-jumper input-lg {\\n padding: 6.5px 11px;\\n font-size: 16px;\\n}\\n.ant-pagination-options-quick-jumper input-sm {\\n padding: 0px 7px;\\n}\\n.ant-pagination-simple .ant-pagination-prev,\\n.ant-pagination-simple .ant-pagination-next {\\n height: 24px;\\n line-height: 24px;\\n vertical-align: top;\\n}\\n.ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link,\\n.ant-pagination-simple .ant-pagination-next .ant-pagination-item-link {\\n height: 24px;\\n background-color: transparent;\\n border: 0;\\n}\\n.ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link::after,\\n.ant-pagination-simple .ant-pagination-next .ant-pagination-item-link::after {\\n height: 24px;\\n line-height: 24px;\\n}\\n.ant-pagination-simple .ant-pagination-simple-pager {\\n display: inline-block;\\n height: 24px;\\n margin-right: 8px;\\n}\\n.ant-pagination-simple .ant-pagination-simple-pager input {\\n box-sizing: border-box;\\n height: 100%;\\n margin-right: 8px;\\n padding: 0 6px;\\n text-align: center;\\n background-color: #fff;\\n border: 1px solid #d9d9d9;\\n border-radius: 2px;\\n outline: none;\\n transition: border-color 0.3s;\\n}\\n.ant-pagination-simple .ant-pagination-simple-pager input:hover {\\n border-color: #1890ff;\\n}\\n.ant-pagination-simple .ant-pagination-simple-pager input:focus {\\n border-color: #40a9ff;\\n box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\\n}\\n.ant-pagination-simple .ant-pagination-simple-pager input[disabled] {\\n color: rgba(0, 0, 0, 0.25);\\n background: #f5f5f5;\\n border-color: #d9d9d9;\\n cursor: not-allowed;\\n}\\n.ant-pagination.mini .ant-pagination-total-text,\\n.ant-pagination.mini .ant-pagination-simple-pager {\\n height: 24px;\\n line-height: 24px;\\n}\\n.ant-pagination.mini .ant-pagination-item {\\n min-width: 24px;\\n height: 24px;\\n margin: 0;\\n line-height: 22px;\\n}\\n.ant-pagination.mini .ant-pagination-item:not(.ant-pagination-item-active) {\\n background: transparent;\\n border-color: transparent;\\n}\\n.ant-pagination.mini .ant-pagination-prev,\\n.ant-pagination.mini .ant-pagination-next {\\n min-width: 24px;\\n height: 24px;\\n margin: 0;\\n line-height: 24px;\\n}\\n.ant-pagination.mini .ant-pagination-prev .ant-pagination-item-link,\\n.ant-pagination.mini .ant-pagination-next .ant-pagination-item-link {\\n background: transparent;\\n border-color: transparent;\\n}\\n.ant-pagination.mini .ant-pagination-prev .ant-pagination-item-link::after,\\n.ant-pagination.mini .ant-pagination-next .ant-pagination-item-link::after {\\n height: 24px;\\n line-height: 24px;\\n}\\n.ant-pagination.mini .ant-pagination-jump-prev,\\n.ant-pagination.mini .ant-pagination-jump-next {\\n height: 24px;\\n margin-right: 0;\\n line-height: 24px;\\n}\\n.ant-pagination.mini .ant-pagination-options {\\n margin-left: 2px;\\n}\\n.ant-pagination.mini .ant-pagination-options-size-changer {\\n top: 0px;\\n}\\n.ant-pagination.mini .ant-pagination-options-quick-jumper {\\n height: 24px;\\n line-height: 24px;\\n}\\n.ant-pagination.mini .ant-pagination-options-quick-jumper input {\\n padding: 0px 7px;\\n width: 44px;\\n height: 24px;\\n}\\n.ant-pagination.ant-pagination-disabled {\\n cursor: not-allowed;\\n}\\n.ant-pagination.ant-pagination-disabled .ant-pagination-item {\\n background: #f5f5f5;\\n border-color: #d9d9d9;\\n cursor: not-allowed;\\n}\\n.ant-pagination.ant-pagination-disabled .ant-pagination-item a {\\n color: rgba(0, 0, 0, 0.25);\\n background: transparent;\\n border: none;\\n cursor: not-allowed;\\n}\\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-active {\\n background: #e6e6e6;\\n}\\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-active a {\\n color: rgba(0, 0, 0, 0.25);\\n}\\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-link {\\n color: rgba(0, 0, 0, 0.25);\\n background: #f5f5f5;\\n border-color: #d9d9d9;\\n cursor: not-allowed;\\n}\\n.ant-pagination-simple.ant-pagination.ant-pagination-disabled .ant-pagination-item-link {\\n background: transparent;\\n}\\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-link-icon {\\n opacity: 0;\\n}\\n.ant-pagination.ant-pagination-disabled .ant-pagination-item-ellipsis {\\n opacity: 1;\\n}\\n.ant-pagination.ant-pagination-disabled .ant-pagination-simple-pager {\\n color: rgba(0, 0, 0, 0.25);\\n}\\n@media only screen and (max-width: 992px) {\\n .ant-pagination-item-after-jump-prev,\\n .ant-pagination-item-before-jump-next {\\n display: none;\\n }\\n}\\n@media only screen and (max-width: 576px) {\\n .ant-pagination-options {\\n display: none;\\n }\\n}\\n.ant-pagination-rtl .ant-pagination-total-text {\\n margin-right: 0;\\n margin-left: 8px;\\n}\\n.ant-pagination-rtl .ant-pagination-item,\\n.ant-pagination-rtl .ant-pagination-prev,\\n.ant-pagination-rtl .ant-pagination-jump-prev,\\n.ant-pagination-rtl .ant-pagination-jump-next {\\n margin-right: 0;\\n margin-left: 8px;\\n}\\n.ant-pagination-rtl .ant-pagination-slash {\\n margin: 0 5px 0 10px;\\n}\\n.ant-pagination-rtl .ant-pagination-options {\\n margin-right: 16px;\\n margin-left: 0;\\n}\\n.ant-pagination-rtl .ant-pagination-options .ant-pagination-options-size-changer.ant-select {\\n margin-right: 0;\\n margin-left: 8px;\\n}\\n.ant-pagination-rtl .ant-pagination-options .ant-pagination-options-quick-jumper {\\n margin-left: 0;\\n}\\n.ant-pagination-rtl.ant-pagination-simple .ant-pagination-simple-pager {\\n margin-right: 0;\\n margin-left: 8px;\\n}\\n.ant-pagination-rtl.ant-pagination-simple .ant-pagination-simple-pager input {\\n margin-right: 0;\\n margin-left: 8px;\\n}\\n.ant-pagination-rtl.ant-pagination.mini .ant-pagination-options {\\n margin-right: 2px;\\n margin-left: 0;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ng-antd/./node_modules/antd/lib/pagination/style/index.css?"); | |
9280 | + | |
9281 | +/***/ }), | |
9282 | + | |
9272 | 9283 | /***/ "./node_modules/antd/lib/radio/style/index.css": |
9273 | 9284 | /*!*****************************************************!*\ |
9274 | 9285 | !*** ./node_modules/antd/lib/radio/style/index.css ***! |
... | ... | @@ -9280,6 +9291,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac |
9280 | 9291 | |
9281 | 9292 | /***/ }), |
9282 | 9293 | |
9294 | +/***/ "./node_modules/antd/lib/select/style/index.css": | |
9295 | +/*!******************************************************!*\ | |
9296 | + !*** ./node_modules/antd/lib/select/style/index.css ***! | |
9297 | + \******************************************************/ | |
9298 | +/***/ ((module, __webpack_exports__, __webpack_require__) => { | |
9299 | + | |
9300 | +"use strict"; | |
9301 | +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/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\\n/* stylelint-disable no-duplicate-selectors */\\n/* stylelint-disable */\\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\\n.ant-select-single .ant-select-selector {\\n display: flex;\\n}\\n.ant-select-single .ant-select-selector .ant-select-selection-search {\\n position: absolute;\\n top: 0;\\n right: 11px;\\n bottom: 0;\\n left: 11px;\\n}\\n.ant-select-single .ant-select-selector .ant-select-selection-search-input {\\n width: 100%;\\n}\\n.ant-select-single .ant-select-selector .ant-select-selection-item,\\n.ant-select-single .ant-select-selector .ant-select-selection-placeholder {\\n padding: 0;\\n line-height: 30px;\\n transition: all 0.3s;\\n}\\n@supports (-moz-appearance: meterbar) {\\n .ant-select-single .ant-select-selector .ant-select-selection-item,\\n .ant-select-single .ant-select-selector .ant-select-selection-placeholder {\\n line-height: 30px;\\n }\\n}\\n.ant-select-single .ant-select-selector .ant-select-selection-item {\\n position: relative;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n}\\n.ant-select-single .ant-select-selector .ant-select-selection-placeholder {\\n transition: none;\\n pointer-events: none;\\n}\\n.ant-select-single .ant-select-selector::after,\\n.ant-select-single .ant-select-selector .ant-select-selection-item::after,\\n.ant-select-single .ant-select-selector .ant-select-selection-placeholder::after {\\n display: inline-block;\\n width: 0;\\n visibility: hidden;\\n content: '\\\\a0';\\n}\\n.ant-select-single.ant-select-show-arrow .ant-select-selection-search {\\n right: 25px;\\n}\\n.ant-select-single.ant-select-show-arrow .ant-select-selection-item,\\n.ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder {\\n padding-right: 18px;\\n}\\n.ant-select-single.ant-select-open .ant-select-selection-item {\\n color: #bfbfbf;\\n}\\n.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {\\n width: 100%;\\n height: 32px;\\n padding: 0 11px;\\n}\\n.ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input {\\n height: 30px;\\n}\\n.ant-select-single:not(.ant-select-customize-input) .ant-select-selector::after {\\n line-height: 30px;\\n}\\n.ant-select-single.ant-select-customize-input .ant-select-selector::after {\\n display: none;\\n}\\n.ant-select-single.ant-select-customize-input .ant-select-selector .ant-select-selection-search {\\n position: static;\\n width: 100%;\\n}\\n.ant-select-single.ant-select-customize-input .ant-select-selector .ant-select-selection-placeholder {\\n position: absolute;\\n right: 0;\\n left: 0;\\n padding: 0 11px;\\n}\\n.ant-select-single.ant-select-customize-input .ant-select-selector .ant-select-selection-placeholder::after {\\n display: none;\\n}\\n.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector {\\n height: 40px;\\n}\\n.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector::after,\\n.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-item,\\n.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-placeholder {\\n line-height: 38px;\\n}\\n.ant-select-single.ant-select-lg:not(.ant-select-customize-input):not(.ant-select-customize-input) .ant-select-selection-search-input {\\n height: 38px;\\n}\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector {\\n height: 24px;\\n}\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector::after,\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-item,\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-placeholder {\\n line-height: 22px;\\n}\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input):not(.ant-select-customize-input) .ant-select-selection-search-input {\\n height: 22px;\\n}\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selection-search {\\n right: 7px;\\n left: 7px;\\n}\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector {\\n padding: 0 7px;\\n}\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-search {\\n right: 28px;\\n}\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-item,\\n.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-placeholder {\\n padding-right: 21px;\\n}\\n.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector {\\n padding: 0 11px;\\n}\\n/**\\n * Do not merge `height` & `line-height` under style with `selection` & `search`,\\n * since chrome may update to redesign with its align logic.\\n */\\n.ant-select-selection-overflow {\\n position: relative;\\n display: flex;\\n flex: auto;\\n flex-wrap: wrap;\\n max-width: 100%;\\n}\\n.ant-select-selection-overflow-item {\\n flex: none;\\n align-self: center;\\n max-width: 100%;\\n}\\n.ant-select-multiple .ant-select-selector {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: center;\\n padding: 1px 4px;\\n}\\n.ant-select-show-search.ant-select-multiple .ant-select-selector {\\n cursor: text;\\n}\\n.ant-select-disabled.ant-select-multiple .ant-select-selector {\\n background: #f5f5f5;\\n cursor: not-allowed;\\n}\\n.ant-select-multiple .ant-select-selector::after {\\n display: inline-block;\\n width: 0;\\n margin: 2px 0;\\n line-height: 24px;\\n content: '\\\\a0';\\n}\\n.ant-select-multiple.ant-select-show-arrow .ant-select-selector,\\n.ant-select-multiple.ant-select-allow-clear .ant-select-selector {\\n padding-right: 24px;\\n}\\n.ant-select-multiple .ant-select-selection-item {\\n position: relative;\\n display: flex;\\n flex: none;\\n box-sizing: border-box;\\n max-width: 100%;\\n height: 24px;\\n margin-top: 2px;\\n margin-bottom: 2px;\\n line-height: 22px;\\n background: #f5f5f5;\\n border: 1px solid #f0f0f0;\\n border-radius: 2px;\\n cursor: default;\\n transition: font-size 0.3s, line-height 0.3s, height 0.3s;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n -webkit-margin-end: 4px;\\n margin-inline-end: 4px;\\n -webkit-padding-start: 8px;\\n padding-inline-start: 8px;\\n -webkit-padding-end: 4px;\\n padding-inline-end: 4px;\\n}\\n.ant-select-disabled.ant-select-multiple .ant-select-selection-item {\\n color: #bfbfbf;\\n border-color: #d9d9d9;\\n cursor: not-allowed;\\n}\\n.ant-select-multiple .ant-select-selection-item-content {\\n display: inline-block;\\n margin-right: 4px;\\n overflow: hidden;\\n white-space: pre;\\n text-overflow: ellipsis;\\n}\\n.ant-select-multiple .ant-select-selection-item-remove {\\n color: inherit;\\n font-style: normal;\\n line-height: 0;\\n text-align: center;\\n text-transform: none;\\n vertical-align: -0.125em;\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n display: inline-block;\\n color: rgba(0, 0, 0, 0.45);\\n font-weight: bold;\\n font-size: 10px;\\n line-height: inherit;\\n cursor: pointer;\\n}\\n.ant-select-multiple .ant-select-selection-item-remove > * {\\n line-height: 1;\\n}\\n.ant-select-multiple .ant-select-selection-item-remove svg {\\n display: inline-block;\\n}\\n.ant-select-multiple .ant-select-selection-item-remove::before {\\n display: none;\\n}\\n.ant-select-multiple .ant-select-selection-item-remove .ant-select-multiple .ant-select-selection-item-remove-icon {\\n display: block;\\n}\\n.ant-select-multiple .ant-select-selection-item-remove > .anticon {\\n vertical-align: -0.2em;\\n}\\n.ant-select-multiple .ant-select-selection-item-remove:hover {\\n color: rgba(0, 0, 0, 0.75);\\n}\\n.ant-select-multiple .ant-select-selection-overflow-item + .ant-select-selection-overflow-item .ant-select-selection-search {\\n -webkit-margin-start: 0;\\n margin-inline-start: 0;\\n}\\n.ant-select-multiple .ant-select-selection-search {\\n position: relative;\\n max-width: 100%;\\n margin-top: 2px;\\n margin-bottom: 2px;\\n -webkit-margin-start: 7px;\\n margin-inline-start: 7px;\\n}\\n.ant-select-multiple .ant-select-selection-search-input,\\n.ant-select-multiple .ant-select-selection-search-mirror {\\n height: 24px;\\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\\n line-height: 24px;\\n transition: all 0.3s;\\n}\\n.ant-select-multiple .ant-select-selection-search-input {\\n width: 100%;\\n min-width: 4.1px;\\n}\\n.ant-select-multiple .ant-select-selection-search-mirror {\\n position: absolute;\\n top: 0;\\n left: 0;\\n z-index: 999;\\n white-space: pre;\\n visibility: hidden;\\n}\\n.ant-select-multiple .ant-select-selection-placeholder {\\n position: absolute;\\n top: 50%;\\n right: 11px;\\n left: 11px;\\n transform: translateY(-50%);\\n transition: all 0.3s;\\n}\\n.ant-select-multiple.ant-select-lg .ant-select-selector::after {\\n line-height: 32px;\\n}\\n.ant-select-multiple.ant-select-lg .ant-select-selection-item {\\n height: 32px;\\n line-height: 30px;\\n}\\n.ant-select-multiple.ant-select-lg .ant-select-selection-search {\\n height: 32px;\\n line-height: 32px;\\n}\\n.ant-select-multiple.ant-select-lg .ant-select-selection-search-input,\\n.ant-select-multiple.ant-select-lg .ant-select-selection-search-mirror {\\n height: 32px;\\n line-height: 30px;\\n}\\n.ant-select-multiple.ant-select-sm .ant-select-selector::after {\\n line-height: 16px;\\n}\\n.ant-select-multiple.ant-select-sm .ant-select-selection-item {\\n height: 16px;\\n line-height: 14px;\\n}\\n.ant-select-multiple.ant-select-sm .ant-select-selection-search {\\n height: 16px;\\n line-height: 16px;\\n}\\n.ant-select-multiple.ant-select-sm .ant-select-selection-search-input,\\n.ant-select-multiple.ant-select-sm .ant-select-selection-search-mirror {\\n height: 16px;\\n line-height: 14px;\\n}\\n.ant-select-multiple.ant-select-sm .ant-select-selection-placeholder {\\n left: 7px;\\n}\\n.ant-select-multiple.ant-select-sm .ant-select-selection-search {\\n -webkit-margin-start: 3px;\\n margin-inline-start: 3px;\\n}\\n.ant-select-multiple.ant-select-lg .ant-select-selection-item {\\n height: 32px;\\n line-height: 32px;\\n}\\n.ant-select-disabled .ant-select-selection-item-remove {\\n display: none;\\n}\\n/* Reset search input style */\\n.ant-select {\\n box-sizing: border-box;\\n margin: 0;\\n padding: 0;\\n color: rgba(0, 0, 0, 0.85);\\n font-size: 14px;\\n font-variant: tabular-nums;\\n line-height: 1.5715;\\n list-style: none;\\n font-feature-settings: 'tnum';\\n position: relative;\\n display: inline-block;\\n cursor: pointer;\\n}\\n.ant-select:not(.ant-select-customize-input) .ant-select-selector {\\n position: relative;\\n background-color: #fff;\\n border: 1px solid #d9d9d9;\\n border-radius: 2px;\\n transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);\\n}\\n.ant-select:not(.ant-select-customize-input) .ant-select-selector input {\\n cursor: pointer;\\n}\\n.ant-select-show-search.ant-select:not(.ant-select-customize-input) .ant-select-selector {\\n cursor: text;\\n}\\n.ant-select-show-search.ant-select:not(.ant-select-customize-input) .ant-select-selector input {\\n cursor: auto;\\n}\\n.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {\\n border-color: #40a9ff;\\n box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\\n border-right-width: 1px !important;\\n outline: 0;\\n}\\n.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {\\n color: rgba(0, 0, 0, 0.25);\\n background: #f5f5f5;\\n cursor: not-allowed;\\n}\\n.ant-select-multiple.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {\\n background: #f5f5f5;\\n}\\n.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector input {\\n cursor: not-allowed;\\n}\\n.ant-select:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input {\\n margin: 0;\\n padding: 0;\\n background: transparent;\\n border: none;\\n outline: none;\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n appearance: none;\\n}\\n.ant-select:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input::-webkit-search-cancel-button {\\n display: none;\\n /* stylelint-disable-next-line property-no-vendor-prefix */\\n -webkit-appearance: none;\\n}\\n.ant-select:not(.ant-select-disabled):hover .ant-select-selector {\\n border-color: #40a9ff;\\n border-right-width: 1px !important;\\n}\\n.ant-select-selection-item {\\n flex: 1;\\n overflow: hidden;\\n font-weight: normal;\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n}\\n@media all and (-ms-high-contrast: none) {\\n .ant-select-selection-item *::-ms-backdrop,\\n .ant-select-selection-item {\\n flex: auto;\\n }\\n}\\n.ant-select-selection-placeholder {\\n flex: 1;\\n overflow: hidden;\\n color: #bfbfbf;\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n pointer-events: none;\\n}\\n@media all and (-ms-high-contrast: none) {\\n .ant-select-selection-placeholder *::-ms-backdrop,\\n .ant-select-selection-placeholder {\\n flex: auto;\\n }\\n}\\n.ant-select-arrow {\\n display: inline-block;\\n color: inherit;\\n font-style: normal;\\n line-height: 0;\\n text-transform: none;\\n vertical-align: -0.125em;\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n position: absolute;\\n top: 50%;\\n right: 11px;\\n width: 12px;\\n height: 12px;\\n margin-top: -6px;\\n color: rgba(0, 0, 0, 0.25);\\n font-size: 12px;\\n line-height: 1;\\n text-align: center;\\n pointer-events: none;\\n}\\n.ant-select-arrow > * {\\n line-height: 1;\\n}\\n.ant-select-arrow svg {\\n display: inline-block;\\n}\\n.ant-select-arrow::before {\\n display: none;\\n}\\n.ant-select-arrow .ant-select-arrow-icon {\\n display: block;\\n}\\n.ant-select-arrow .anticon {\\n vertical-align: top;\\n transition: transform 0.3s;\\n}\\n.ant-select-arrow .anticon > svg {\\n vertical-align: top;\\n}\\n.ant-select-arrow .anticon:not(.ant-select-suffix) {\\n pointer-events: auto;\\n}\\n.ant-select-disabled .ant-select-arrow {\\n cursor: not-allowed;\\n}\\n.ant-select-clear {\\n position: absolute;\\n top: 50%;\\n right: 11px;\\n z-index: 1;\\n display: inline-block;\\n width: 12px;\\n height: 12px;\\n margin-top: -6px;\\n color: rgba(0, 0, 0, 0.25);\\n font-size: 12px;\\n font-style: normal;\\n line-height: 1;\\n text-align: center;\\n text-transform: none;\\n background: #fff;\\n cursor: pointer;\\n opacity: 0;\\n transition: color 0.3s ease, opacity 0.15s ease;\\n text-rendering: auto;\\n}\\n.ant-select-clear::before {\\n display: block;\\n}\\n.ant-select-clear:hover {\\n color: rgba(0, 0, 0, 0.45);\\n}\\n.ant-select:hover .ant-select-clear {\\n opacity: 1;\\n}\\n.ant-select-dropdown {\\n margin: 0;\\n padding: 0;\\n color: rgba(0, 0, 0, 0.85);\\n font-variant: tabular-nums;\\n line-height: 1.5715;\\n list-style: none;\\n font-feature-settings: 'tnum';\\n position: absolute;\\n top: -9999px;\\n left: -9999px;\\n z-index: 1050;\\n box-sizing: border-box;\\n padding: 4px 0;\\n overflow: hidden;\\n font-size: 14px;\\n font-variant: initial;\\n background-color: #fff;\\n border-radius: 2px;\\n outline: none;\\n box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);\\n}\\n.ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-bottomLeft,\\n.ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-bottomLeft {\\n -webkit-animation-name: antSlideUpIn;\\n animation-name: antSlideUpIn;\\n}\\n.ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-topLeft,\\n.ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-topLeft {\\n -webkit-animation-name: antSlideDownIn;\\n animation-name: antSlideDownIn;\\n}\\n.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-bottomLeft {\\n -webkit-animation-name: antSlideUpOut;\\n animation-name: antSlideUpOut;\\n}\\n.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-topLeft {\\n -webkit-animation-name: antSlideDownOut;\\n animation-name: antSlideDownOut;\\n}\\n.ant-select-dropdown-hidden {\\n display: none;\\n}\\n.ant-select-dropdown-empty {\\n color: rgba(0, 0, 0, 0.25);\\n}\\n.ant-select-item-empty {\\n position: relative;\\n display: block;\\n min-height: 32px;\\n padding: 5px 12px;\\n color: rgba(0, 0, 0, 0.85);\\n font-weight: normal;\\n font-size: 14px;\\n line-height: 22px;\\n color: rgba(0, 0, 0, 0.25);\\n}\\n.ant-select-item {\\n position: relative;\\n display: block;\\n min-height: 32px;\\n padding: 5px 12px;\\n color: rgba(0, 0, 0, 0.85);\\n font-weight: normal;\\n font-size: 14px;\\n line-height: 22px;\\n cursor: pointer;\\n transition: background 0.3s ease;\\n}\\n.ant-select-item-group {\\n color: rgba(0, 0, 0, 0.45);\\n font-size: 12px;\\n cursor: default;\\n}\\n.ant-select-item-option {\\n display: flex;\\n}\\n.ant-select-item-option-content {\\n flex: auto;\\n overflow: hidden;\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n}\\n.ant-select-item-option-state {\\n flex: none;\\n}\\n.ant-select-item-option-active:not(.ant-select-item-option-disabled) {\\n background-color: #f5f5f5;\\n}\\n.ant-select-item-option-selected:not(.ant-select-item-option-disabled) {\\n color: rgba(0, 0, 0, 0.85);\\n font-weight: 600;\\n background-color: #e6f7ff;\\n}\\n.ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-state {\\n color: #1890ff;\\n}\\n.ant-select-item-option-disabled {\\n color: rgba(0, 0, 0, 0.25);\\n cursor: not-allowed;\\n}\\n.ant-select-item-option-disabled.ant-select-item-option-selected {\\n background-color: #f5f5f5;\\n}\\n.ant-select-item-option-grouped {\\n padding-left: 24px;\\n}\\n.ant-select-lg {\\n font-size: 16px;\\n}\\n.ant-select-borderless .ant-select-selector {\\n background-color: transparent !important;\\n border-color: transparent !important;\\n box-shadow: none !important;\\n}\\n.ant-select-rtl {\\n direction: rtl;\\n}\\n.ant-select-rtl .ant-select-arrow {\\n right: initial;\\n left: 11px;\\n}\\n.ant-select-rtl .ant-select-clear {\\n right: initial;\\n left: 11px;\\n}\\n.ant-select-dropdown-rtl {\\n direction: rtl;\\n}\\n.ant-select-dropdown-rtl .ant-select-item-option-grouped {\\n padding-right: 24px;\\n padding-left: 12px;\\n}\\n.ant-select-rtl.ant-select-multiple.ant-select-show-arrow .ant-select-selector,\\n.ant-select-rtl.ant-select-multiple.ant-select-allow-clear .ant-select-selector {\\n padding-right: 4px;\\n padding-left: 24px;\\n}\\n.ant-select-rtl.ant-select-multiple .ant-select-selection-item {\\n text-align: right;\\n}\\n.ant-select-rtl.ant-select-multiple .ant-select-selection-item-content {\\n margin-right: 0;\\n margin-left: 4px;\\n text-align: right;\\n}\\n.ant-select-rtl.ant-select-multiple .ant-select-selection-search-mirror {\\n right: 0;\\n left: auto;\\n}\\n.ant-select-rtl.ant-select-multiple .ant-select-selection-placeholder {\\n right: 11px;\\n left: auto;\\n}\\n.ant-select-rtl.ant-select-multiple.ant-select-sm .ant-select-selection-placeholder {\\n right: 7px;\\n}\\n.ant-select-rtl.ant-select-single .ant-select-selector .ant-select-selection-item,\\n.ant-select-rtl.ant-select-single .ant-select-selector .ant-select-selection-placeholder {\\n right: 0;\\n left: 9px;\\n text-align: right;\\n}\\n.ant-select-rtl.ant-select-single.ant-select-show-arrow .ant-select-selection-search {\\n right: 11px;\\n left: 25px;\\n}\\n.ant-select-rtl.ant-select-single.ant-select-show-arrow .ant-select-selection-item,\\n.ant-select-rtl.ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder {\\n padding-right: 0;\\n padding-left: 18px;\\n}\\n.ant-select-rtl.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-search {\\n right: 6px;\\n}\\n.ant-select-rtl.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-item,\\n.ant-select-rtl.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-placeholder {\\n padding-right: 0;\\n padding-left: 21px;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ng-antd/./node_modules/antd/lib/select/style/index.css?"); | |
9302 | + | |
9303 | +/***/ }), | |
9304 | + | |
9283 | 9305 | /***/ "./node_modules/antd/lib/style/index.css": |
9284 | 9306 | /*!***********************************************!*\ |
9285 | 9307 | !*** ./node_modules/antd/lib/style/index.css ***! |
... | ... | @@ -9577,17 +9599,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac |
9577 | 9599 | |
9578 | 9600 | /***/ }), |
9579 | 9601 | |
9580 | -/***/ "./build/Option/Option.html": | |
9581 | -/*!**********************************!*\ | |
9582 | - !*** ./build/Option/Option.html ***! | |
9583 | - \**********************************/ | |
9584 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
9585 | - | |
9586 | -"use strict"; | |
9587 | -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 = \"<li class=\\\"ant-select-dropdown-menu-item\\\" ng-transclude></li>\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Option/Option.html?"); | |
9588 | - | |
9589 | -/***/ }), | |
9590 | - | |
9591 | 9602 | /***/ "./build/Pagination/Pagination.html": |
9592 | 9603 | /*!******************************************!*\ |
9593 | 9604 | !*** ./build/Pagination/Pagination.html ***! |
... | ... | @@ -9595,7 +9606,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac |
9595 | 9606 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
9596 | 9607 | |
9597 | 9608 | "use strict"; |
9598 | -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 = \"<ul class=\\\"ant-pagination\\\">\\n <li ng-class=\\\"{'ant-pagination-prev':true,'ant-pagination-disabled':state.current===1}\\\" ng-click=\\\"handlePrev()\\\">\\n <a class=\\\"ant-pagination-item-link\\\"></a>\\n </li>\\n <li ng-class=\\\"{'ant-pagination-item':true,'ant-pagination-item-active':state.current===value}\\\" ng-repeat=\\\"value in state.pageNumList\\\" ng-click=\\\"handleClick(value)\\\">\\n <a>{{value}}</a>\\n </li>\\n <li ng-class=\\\"{'ant-pagination-next':true,'ant-pagination-disabled':state.current===state.pageNum}\\\" ng-click=\\\"handleNext()\\\">\\n <a class=\\\"ant-pagination-item-link\\\"></a>\\n </li>\\n <li class=\\\"ant-pagination-options\\\">\\n <es-select class=\\\"ant-pagination-options-size-changer\\\" value=\\\"10\\\" get-popup-container=\\\"getPopupContainer\\\" ng-if=\\\"showSizeChanger==='true'\\\" on-change=\\\"handleSelectChange(value)\\\">\\n <es-option value=\\\"10\\\">10 条/页</es-option>\\n <es-option value=\\\"20\\\">20 条/页</es-option>\\n <es-option value=\\\"30\\\">30 条/页</es-option>\\n <es-option value=\\\"40\\\">40 条/页</es-option>\\n </es-select>\\n <div class=\\\"ant-pagination-options-quick-jumper\\\" ng-if=\\\"showQuickJumper==='true'\\\">\\n 跳至<input type=\\\"text\\\" ng-blur=\\"handleBlur($event)\\" />页\n </div>\n </li>\n</ul>\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Pagination/Pagination.html?"); | |
9609 | +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 = \"<ul class=\\\"ant-pagination\\\">\\n <li ng-class=\\\"'ant-pagination-prev'+(state.current===1?' ant-pagination-disabled':'')\\\" ng-click=\\\"handlePrev()\\\">\\n <button type=\\\"button\\\" class=\\\"ant-pagination-item-link\\\">\\n <es-icon type=\\\"LeftOutlined\\\"></es-icon>\\n </button>\\n </li>\\n <li ng-repeat=\\\"value in state.pageNumList\\\" ng-class=\\\"'ant-pagination-item'+(state.current===value?' ant-pagination-item-active':'')\\\" ng-click=\\\"handleClick(value)\\\">\\n <a>{{value}}</a>\\n </li>\\n <li ng-class=\\\"'ant-pagination-next'+(state.current===state.pageNum?' ant-pagination-disabled':'')\\\" ng-click=\\\"handleNext()\\\">\\n <button type=\\\"button\\\" class=\\\"ant-pagination-item-link\\\">\\n <es-icon type=\\\"RightOutlined\\\"></es-icon>\\n </button>\\n </li>\\n <li class=\\\"ant-pagination-options\\\">\\n <es-select ng-if=\\\"showSizeChanger==='true'\\\" class=\\\"ant-pagination-options-size-changer\\\" value=\\\"10\\\" get-popup-container=\\\"getPopupContainer\\\" on-change=\\\"handleSelectChange(value)\\\">\\n <es-option value=\\\"10\\\">10 条/页</es-option>\\n <es-option value=\\\"20\\\">20 条/页</es-option>\\n <es-option value=\\\"30\\\">30 条/页</es-option>\\n <es-option value=\\\"40\\\">40 条/页</es-option>\\n </es-select>\\n <div ng-if=\\\"showQuickJumper==='true'\\\" class=\\\"ant-pagination-options-quick-jumper\\\">\\n 跳至<input type=\\\"text\\\" onBlur=\\"handleBlur($event)\\" />页\n </div>\n </li>\n</ul>\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Pagination/Pagination.html?"); | |
9599 | 9610 | |
9600 | 9611 | /***/ }), |
9601 | 9612 | |
... | ... | @@ -9661,7 +9672,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac |
9661 | 9672 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
9662 | 9673 | |
9663 | 9674 | "use strict"; |
9664 | -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-select ant-select-enabled\\\" ng-click=\\\"handleOpen($event)\\\">\\n <div class=\\\"ant-select-selection ant-select-selection--single\\\">\\n <div class=\\\"ant-select-selection__rendered\\\">\\n <div class=\\\"ant-select-selection__placeholder\\\" if=\\\"placeholder&&!state.value\\\">{{placeholder}}</div>\\n <div class=\\\"ant-select-selection-selected-value\\\" if=\\\"state.label\\\">{{undefined}}</div>\\n </div>\\n <span class=\\\"ant-select-arrow\\\" unselectable=\\\"on\\\" style=\\\"{'user-select': 'none'}\\\">\\n <i class=\\\"anticon anticon-down ant-select-arrow-icon\\\">\\n <svg viewBox=\\\"64 64 896 896\\\" focusable=\\\"false\\\" data-icon=\\\"down\\\" width=\\\"1em\\\" height=\\\"1em\\\" fill=\\\"currentColor\\\">\\n <path d=\\\"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\\\"></path>\\n </svg>\\n </i>\\n </span>\\n </div>\\n <div hidden ng-transclude></div>\\n</div>\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Select/Select.html?"); | |
9675 | +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-select ant-select-single\\\" ng-click=\\\"handleOpen($event)\\\">\\n <div class=\\\"ant-select-selector\\\">\\n <span class=\\\"ant-select-selection-item\\\">{{state.label}}</span>\\n </div>\\n <span class=\\\"ant-select-arrow\\\">\\n <es-icon type=\\\"DownOutlined\\\"></es-icon>\\n </span>\\n <span hidden ng-transclude></span>\\n</div>\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Select/Select.html?"); | |
9676 | + | |
9677 | +/***/ }), | |
9678 | + | |
9679 | +/***/ "./build/SelectOption/SelectOption.html": | |
9680 | +/*!**********************************************!*\ | |
9681 | + !*** ./build/SelectOption/SelectOption.html ***! | |
9682 | + \**********************************************/ | |
9683 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
9684 | + | |
9685 | +"use strict"; | |
9686 | +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 = \"<li class=\\\"ant-select-dropdown-menu-item\\\" ng-transclude></li>\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/SelectOption/SelectOption.html?"); | |
9665 | 9687 | |
9666 | 9688 | /***/ }), |
9667 | 9689 | |
... | ... | @@ -9694,7 +9716,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac |
9694 | 9716 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
9695 | 9717 | |
9696 | 9718 | "use strict"; |
9697 | -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 class=\\\"ant-table ant-table-default\\\">\\n <div class=\\\"ant-table-content\\\">\\n <div class=\\\"ant-table-body\\\">\\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\\\" ng-style=\\\"{width:column.width}\\\">\\n <span class=\\\"ant-table-header-column\\\">\\n <div>\\n <span class=\\\"ant-table-column-title\\\">{{column.title}}</span>\\n </div>\\n </span>\\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=\\\"{{columns.length}}\\\"><div class=\\\"ant-empty ant-empty-normal\\\"><div class=\\\"ant-empty-image\\\"><svg class=\\\"ant-empty-img-simple\\\" width=\\\"64\\\" height=\\\"41\\\" viewBox=\\\"0 0 64 41\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g transform=\\\"translate(0 1)\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\"><ellipse class=\\\"ant-empty-img-simple-ellipse\\\" cx=\\\"32\\\" cy=\\\"33\\\" rx=\\\"32\\\" ry=\\\"7\\\"></ellipse><g class=\\\"ant-empty-img-simple-g\\\" fill-rule=\\\"nonzero\\\"><path d=\\\"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z\\\"></path><path d=\\\"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z\\\" class=\\\"ant-empty-img-simple-path\\\"></path></g></g></svg></div><div class=\\\"ant-empty-description\\\">暂无数据</div></div></td>\\n </tr>\\n </tbody>\\n </table>\\n </div>\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?"); | |
9719 | +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 class=\\\"ant-table ant-table-default\\\">\\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=\\\"{{columns.length}}\\\"><div class=\\\"ant-empty ant-empty-normal\\\"><div class=\\\"ant-empty-image\\\"><svg class=\\\"ant-empty-img-simple\\\" width=\\\"64\\\" height=\\\"41\\\" viewBox=\\\"0 0 64 41\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g transform=\\\"translate(0 1)\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\"><ellipse class=\\\"ant-empty-img-simple-ellipse\\\" cx=\\\"32\\\" cy=\\\"33\\\" rx=\\\"32\\\" ry=\\\"7\\\"></ellipse><g class=\\\"ant-empty-img-simple-g\\\" fill-rule=\\\"nonzero\\\"><path d=\\\"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z\\\"></path><path d=\\\"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z\\\" class=\\\"ant-empty-img-simple-path\\\"></path></g></g></svg></div><div class=\\\"ant-empty-description\\\">暂无数据</div></div></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?"); | |
9698 | 9720 | |
9699 | 9721 | /***/ }), |
9700 | 9722 | ... | ... |
example/form.html
... | ... | @@ -14,12 +14,19 @@ |
14 | 14 | <body> |
15 | 15 | <div ng-app="esNgAntd" ng-controller="mainCtrl"> |
16 | 16 | <div class="container" style="padding: 50px"> |
17 | - <es-form name="basic" on-finish="onFinish(values)"> | |
17 | + <es-form name="basic" on-finish="onFinish(values)" form="form"> | |
18 | 18 | <es-form-item label="username" name="username"> |
19 | 19 | <es-input></es-input> |
20 | 20 | </es-form-item> |
21 | + <es-form-item label="area" name="area"> | |
22 | + <es-select> | |
23 | + <es-select-option value="aaa">AAA</es-select-option> | |
24 | + <es-select-option value="bbb">BBB</es-select-option> | |
25 | + </es-select> | |
26 | + </es-form-item> | |
21 | 27 | <es-form-item> |
22 | 28 | <es-button type="primary" html-type="submit">Submit</es-button> |
29 | + <es-button type="primary" html-type="button" ng-click="onReset()">Reset</es-button> | |
23 | 30 | </es-form-item> |
24 | 31 | </es-form> |
25 | 32 | |
... | ... | @@ -39,9 +46,15 @@ |
39 | 46 | angular |
40 | 47 | .module("esNgAntd") |
41 | 48 | .controller("mainCtrl", function ($scope) { |
49 | + $scope.form = null; | |
50 | + | |
42 | 51 | $scope.onFinish = function (values) { |
43 | 52 | console.log(values) |
44 | 53 | }; |
54 | + | |
55 | + $scope.onReset = function() { | |
56 | + $scope.form.resetFields(); | |
57 | + } | |
45 | 58 | }); |
46 | 59 | </script> |
47 | 60 | </body> | ... | ... |
example/pagination.html
example/select.html
... | ... | @@ -3,17 +3,12 @@ |
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8" /> |
5 | 5 | <title></title> |
6 | - <link | |
7 | - href="../node_modules/antd/dist/antd.min.css" | |
8 | - rel="stylesheet" | |
9 | - /> | |
10 | 6 | </head> |
11 | 7 | <body> |
12 | 8 | <div ng-app="esNgAntd" ng-controller="mainCtrl"> |
13 | 9 | <div class="container" style="padding: 50px"> |
14 | 10 | <es-select style="width: 200px;" on-change="handleChange(value)" placeholder="请选择..."> |
15 | - <es-option value="aaa">AAA</es-option> | |
16 | - <es-option value="bbb">BBB</es-option> | |
11 | + <es-select-option value="aaa" ng-repeat="value in options">{{value}}</es-select-option> | |
17 | 12 | </es-select> |
18 | 13 | </div> |
19 | 14 | </div> |
... | ... | @@ -23,6 +18,7 @@ |
23 | 18 | angular |
24 | 19 | .module("esNgAntd") |
25 | 20 | .controller("mainCtrl", function ($scope) { |
21 | + $scope.options = ["AAA", "BBB"] | |
26 | 22 | $scope.handleChange = function(value) { |
27 | 23 | console.log("mainCtrl:value", value) |
28 | 24 | } | ... | ... |
example/table.html
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | <body> |
10 | 10 | <div ng-app="esNgAntd" ng-controller="mainCtrl"> |
11 | 11 | <div class="container" style="padding: 50px"> |
12 | - <es-table columns="columns" d-source="dataSource" row-selection="rowSelection" loading="{{loading}}"/> | |
12 | + <es-table columns="columns" d-source="dataSource" row-selection="rowSelection" loading="{{loading}}" on-change="handleChange(sorter)"/> | |
13 | 13 | </div> |
14 | 14 | </div> |
15 | 15 | <script src="https://cdn.staticfile.org/angular.js/1.2.28/angular.min.js"></script> |
... | ... | @@ -29,6 +29,7 @@ |
29 | 29 | { |
30 | 30 | title: "航线", |
31 | 31 | key: "age", |
32 | + sorter: true, | |
32 | 33 | }, |
33 | 34 | { |
34 | 35 | title: "状态", |
... | ... | @@ -67,6 +68,10 @@ |
67 | 68 | }), |
68 | 69 | }; |
69 | 70 | |
71 | + $scope.handleChange = (sorter) => { | |
72 | + console.log(sorter); | |
73 | + }; | |
74 | + | |
70 | 75 | $scope.handleClick = (key) => { |
71 | 76 | $scope.dataSource[key].status = $scope.dataSource[key].status ? 0 : 1; |
72 | 77 | $scope.dataSource.splice(key, 1); | ... | ... |
package.json
src/Form/Form.js
... | ... | @@ -4,18 +4,25 @@ import style from "antd/lib/form/style/index.css"; |
4 | 4 | class Form { |
5 | 5 | useModules = ["esNgAntd"]; |
6 | 6 | |
7 | + template = template; | |
8 | + | |
7 | 9 | props = { |
8 | 10 | name: String, |
9 | 11 | labelCol: Object, |
10 | 12 | wrapperCol: Object, |
11 | 13 | onFinish: Function, |
14 | + form: Object, | |
15 | + }; | |
16 | + | |
17 | + state = { | |
18 | + formItems: [] | |
12 | 19 | }; |
13 | - state = {}; | |
14 | - template = template; | |
15 | 20 | |
16 | 21 | constructor() { |
17 | 22 | esNgAntd.createStyle("ant-form", style); |
18 | 23 | |
24 | + this.form = $scope; | |
25 | + | |
19 | 26 | if (this.props.name) { |
20 | 27 | let inputs = $element[0].querySelectorAll("input"); |
21 | 28 | for (let i = 0; i < inputs.length; i++) { |
... | ... | @@ -25,20 +32,30 @@ class Form { |
25 | 32 | } |
26 | 33 | } |
27 | 34 | |
35 | + resetFields() { | |
36 | + this.state.formItems.forEach(function (item) { | |
37 | + item.value = null; | |
38 | + }) | |
39 | + } | |
40 | + | |
28 | 41 | handleSubmit() { |
29 | 42 | let values = {}; |
30 | - let inputs = $element[0].querySelectorAll("input"); | |
31 | - for (let i = 0; i < inputs.length; i++) { | |
32 | - const element = inputs[i]; | |
33 | - const value = element.value === "" ? null : element.value; | |
34 | - if (element.id) { | |
35 | - if (element.id.split("_").length > 1) { | |
36 | - values[element.id.split("_")[1]] = value; | |
37 | - } else { | |
38 | - values[element.id] = value; | |
39 | - } | |
40 | - } | |
41 | - } | |
43 | + this.state.formItems.forEach(function (item) { | |
44 | + let name = item.esFormItem && item.esFormItem.name; | |
45 | + let value = item.value || item.state.value || null; | |
46 | + values[name] = value; | |
47 | + }) | |
48 | + // for (let i = 0; i < inputs.length; i++) { | |
49 | + // const element = inputs[i]; | |
50 | + // const value = element.value === "" ? null : element.value; | |
51 | + // if (element.id) { | |
52 | + // if (element.id.split("_").length > 1) { | |
53 | + // values[element.id.split("_")[1]] = value; | |
54 | + // } else { | |
55 | + // values[element.id] = value; | |
56 | + // } | |
57 | + // } | |
58 | + // } | |
42 | 59 | this.props.onFinish({ |
43 | 60 | values: values, |
44 | 61 | }); | ... | ... |
src/Icon/Icon.js
... | ... | @@ -2,19 +2,25 @@ import * as iconsSvg from "@ant-design/icons-svg"; |
2 | 2 | import { renderIconDefinitionToSVGElement } from "@ant-design/icons-svg/es/helpers"; |
3 | 3 | |
4 | 4 | class Icon { |
5 | + useModules = ["$compile"]; | |
6 | + | |
7 | + template = `<span class="anticon"></span>` | |
8 | + | |
5 | 9 | props = { |
6 | 10 | type: String, |
7 | 11 | }; |
8 | 12 | |
9 | 13 | constructor() { |
10 | - $element.replaceWith( | |
11 | - renderIconDefinitionToSVGElement(iconsSvg[this.props.type], { | |
14 | + let template = renderIconDefinitionToSVGElement( | |
15 | + iconsSvg[$scope.type], | |
16 | + { | |
12 | 17 | extraSVGAttrs: { |
13 | 18 | width: "1em", |
14 | 19 | height: "1em", |
15 | 20 | fill: "currentColor", |
16 | 21 | }, |
17 | - }) | |
18 | - ); | |
22 | + } | |
23 | + ) | |
24 | + $element.append(template); | |
19 | 25 | } |
20 | 26 | } | ... | ... |
src/Input/Input.js
... | ... | @@ -18,10 +18,12 @@ class Input { |
18 | 18 | inputEventTarget: null, |
19 | 19 | } |
20 | 20 | |
21 | - constructor(esFormItem) { | |
21 | + constructor(esFormItem, esForm) { | |
22 | 22 | esNgAntd.createStyle("ant-input", style); |
23 | + this.esForm = esForm.getContext(); | |
23 | 24 | this.esFormItem = esFormItem.getContext(); |
24 | 25 | this.props.style = $attrs.style; |
26 | + this.esForm.state.formItems.push($scope); | |
25 | 27 | $element.replaceWith($compile(this.getTemplate())($scope)); |
26 | 28 | } |
27 | 29 | ... | ... |
src/Pagination/Pagination.html
1 | 1 | <ul class="ant-pagination"> |
2 | - <li className={{'ant-pagination-prev': true, 'ant-pagination-disabled': state.current===1}} onClick="handlePrev()"> | |
3 | - <a class="ant-pagination-item-link"></a> | |
2 | + <li className={"ant-pagination-prev" + (state.current === 1 ? " ant-pagination-disabled" : "")} onClick={this.handlePrev}> | |
3 | + <button type="button" class="ant-pagination-item-link"> | |
4 | + <es-icon type="LeftOutlined"></es-icon> | |
5 | + </button> | |
4 | 6 | </li> |
5 | - <li className={{'ant-pagination-item': true, 'ant-pagination-item-active': state.current === value}} for="value in state.pageNumList" onClick="handleClick(value)"> | |
6 | - <a>{value}</a> | |
7 | - </li> | |
8 | - <li className={{'ant-pagination-next': true, 'ant-pagination-disabled': state.current===state.pageNum}} onClick="handleNext()"> | |
9 | - <a class="ant-pagination-item-link"></a> | |
7 | + {state.pageNumList.map(function (value) { | |
8 | + return <li className={"ant-pagination-item" + (state.current === value ? " ant-pagination-item-active" : "")} onClick={this.handleClick.bind(this, value)}> | |
9 | + <a>{value}</a> | |
10 | + </li> | |
11 | + })} | |
12 | + <li className={"ant-pagination-next" + (state.current === state.pageNum ? " ant-pagination-disabled" : "")} onClick={this.handleNext}> | |
13 | + <button type="button" class="ant-pagination-item-link"> | |
14 | + <es-icon type="RightOutlined"></es-icon> | |
15 | + </button> | |
10 | 16 | </li> |
11 | 17 | <li className="ant-pagination-options"> |
12 | - <es-select className="ant-pagination-options-size-changer" value="10" get-popup-container="getPopupContainer" if="showSizeChanger==='true'" on-change="handleSelectChange(value)"> | |
18 | + {showSizeChanger === 'true' && <es-select className="ant-pagination-options-size-changer" value="10" get-popup-container="getPopupContainer" on-change="handleSelectChange(value)"> | |
13 | 19 | <es-option value="10">10 条/页</es-option> |
14 | 20 | <es-option value="20">20 条/页</es-option> |
15 | 21 | <es-option value="30">30 条/页</es-option> |
16 | 22 | <es-option value="40">40 条/页</es-option> |
17 | - </es-select> | |
18 | - <div className="ant-pagination-options-quick-jumper" if="showQuickJumper==='true'"> | |
19 | - 跳至<input type="text" onBlur="handleBlur($event)"/>页 | |
20 | - </div> | |
23 | + </es-select>} | |
24 | + {showQuickJumper === 'true' && <div className="ant-pagination-options-quick-jumper"> | |
25 | + 跳至<input type="text" onBlur="handleBlur($event)" />页 | |
26 | + </div>} | |
21 | 27 | </li> |
22 | 28 | </ul> | ... | ... |
src/Pagination/Pagination.js
1 | 1 | import template from "./Pagination.html"; |
2 | +import style from "antd/lib/pagination/style/index.css"; | |
2 | 3 | |
3 | 4 | class Pagination { |
4 | 5 | |
6 | + useModules = ["esNgAntd"]; | |
7 | + | |
5 | 8 | template = template; |
6 | 9 | |
7 | 10 | props = { |
... | ... | @@ -25,6 +28,7 @@ class Pagination { |
25 | 28 | }; |
26 | 29 | |
27 | 30 | constructor() { |
31 | + esNgAntd.createStyle("ant-pagination", style); | |
28 | 32 | this.state.total = Number(this.props.total || 0); |
29 | 33 | this.state.current = Number(this.props.current || this.props.defaultCurrent || 1); |
30 | 34 | this.state.pageSize = this.props.pageSize || this.props.defaultPageSize || 10; | ... | ... |
src/Select/Select.html
1 | -<div className="ant-select ant-select-enabled" onClick={this.handleOpen.bind(this, $event)}> | |
2 | - <div className="ant-select-selection ant-select-selection--single"> | |
3 | - <div className="ant-select-selection__rendered"> | |
4 | - <div className="ant-select-selection__placeholder" if="placeholder&&!state.value">{placeholder}</div> | |
5 | - <div className="ant-select-selection-selected-value" if="state.label">{state.label}</div> | |
6 | - </div> | |
7 | - <span | |
8 | - class="ant-select-arrow" | |
9 | - unselectable="on" | |
10 | - style="{'user-select': 'none'}" | |
11 | - > | |
12 | - <i class="anticon anticon-down ant-select-arrow-icon"> | |
13 | - <svg | |
14 | - viewBox="64 64 896 896" | |
15 | - focusable="false" | |
16 | - data-icon="down" | |
17 | - width="1em" | |
18 | - height="1em" | |
19 | - fill="currentColor" | |
20 | - > | |
21 | - <path | |
22 | - d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" | |
23 | - ></path> | |
24 | - </svg> | |
25 | - </i> | |
26 | - </span> | |
1 | +<div className="ant-select ant-select-single" onClick={this.handleOpen.bind(this, $event)}> | |
2 | + <div className="ant-select-selector"> | |
3 | + <span className="ant-select-selection-item">{state.label}</span> | |
27 | 4 | </div> |
28 | - <div hidden>{children}</div> | |
5 | + <span className="ant-select-arrow"> | |
6 | + <es-icon type="DownOutlined"></es-icon> | |
7 | + </span> | |
8 | + <span hidden>{children}</span> | |
29 | 9 | </div> | ... | ... |
src/Select/Select.js
1 | 1 | import template from "./Select.html"; |
2 | +import style from "antd/lib/select/style/index.css"; | |
3 | + | |
2 | 4 | |
3 | 5 | class Select { |
6 | + | |
7 | + useModules = ["$compile", "$timeout", "esNgAntd"]; | |
8 | + | |
4 | 9 | props = { |
5 | 10 | value: String, |
6 | 11 | placeholder: String, |
... | ... | @@ -19,13 +24,17 @@ class Select { |
19 | 24 | |
20 | 25 | template = template; |
21 | 26 | |
22 | - useModules = ["$compile", "$timeout"]; | |
23 | - | |
24 | - constructor() { | |
27 | + constructor(esForm, esFormItem) { | |
28 | + esNgAntd.createStyle("ant-select", style); | |
29 | + this.esForm = esForm.getContext(); | |
30 | + this.esFormItem = esFormItem.getContext(); | |
31 | + this.esForm.state.formItems.push($scope); | |
25 | 32 | let option = this.state.childrens.find(function (option) { |
26 | 33 | return option.value === this.props.value; |
27 | 34 | }); |
28 | - this.state.label = option.label; | |
35 | + if (option) { | |
36 | + this.state.label = option.label; | |
37 | + } | |
29 | 38 | } |
30 | 39 | |
31 | 40 | addOption(option) { |
... | ... | @@ -77,18 +86,22 @@ class Select { |
77 | 86 | event.stopPropagation(); |
78 | 87 | const { height, width } = $element[0].getBoundingClientRect(); |
79 | 88 | const { top, left } = this.getOffset($element[0]); |
89 | + | |
90 | + // 处理标签 | |
91 | + this.state.childrens.forEach(function (item) { | |
92 | + item.label = item.element.text(); | |
93 | + }) | |
94 | + | |
80 | 95 | let div = document.createElement("div"); |
81 | 96 | div.style.position = "absolute"; |
82 | 97 | div.style.left = 0; |
83 | 98 | div.style.top = 0; |
84 | 99 | div.style.width = "100%"; |
85 | 100 | div.appendChild( |
86 | - $compile(`<div><div ng-class="'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft'+(!state.open?' ant-select-dropdown-hidden':'')" style="width: ${width}px; left: ${left}px; top: ${ | |
87 | - top + height + 2 | |
88 | - }px;"> | |
89 | - <ul class="ant-select-dropdown-menu ant-select-dropdown-menu-root ant-select-dropdown-menu-vertical"> | |
90 | - <li class="ant-select-dropdown-menu-item" ng-click="handleClick(option)" ng-repeat="option in state.childrens">{{option.label}}</li> | |
91 | - </ul> | |
101 | + $compile(`<div><div ng-class="'ant-select-dropdown ant-select-dropdown-placement-bottomLeft'+(!state.open?' ant-select-dropdown-hidden':'')" style="width: ${width}px; left: ${left}px; top: ${top + height + 2}px;"> | |
102 | + <div class="ant-select-item ant-select-item-option" ng-click="handleClick(option)" ng-repeat="option in state.childrens"> | |
103 | + <div class="ant-select-item-option-content">{{option.label}}</div> | |
104 | + </div> | |
92 | 105 | </div></div>`)($scope)[0] |
93 | 106 | ); |
94 | 107 | if (this.state.popup === null) { | ... | ... |
src/Option/Option.html renamed to src/SelectOption/SelectOption.html
src/Option/Option.js renamed to src/SelectOption/SelectOption.js
1 | 1 | /** |
2 | 2 | * 选项 |
3 | 3 | */ |
4 | -import template from "./Option.html"; | |
4 | +import template from "./SelectOption.html"; | |
5 | + | |
6 | +class SelectOption { | |
7 | + template = template; | |
5 | 8 | |
6 | -class Option { | |
7 | 9 | props = { value: String }; |
8 | 10 | |
9 | 11 | state = { |
10 | 12 | label: null, |
11 | 13 | }; |
12 | 14 | |
13 | - template = template; | |
14 | - | |
15 | 15 | constructor(esSelect) { |
16 | 16 | this.esSelect = esSelect.getContext(); |
17 | 17 | this.esSelect.addOption({ |
18 | 18 | value: this.props.value, |
19 | - label: $element.text(), | |
19 | + label: null, | |
20 | + element: $element, | |
20 | 21 | }); |
21 | 22 | } |
22 | 23 | } | ... | ... |
src/Table/Table.html
... | ... | @@ -2,55 +2,58 @@ |
2 | 2 | <es-spin spinning="{{loading}}"> |
3 | 3 | <div className="ant-table ant-table-default"> |
4 | 4 | <div className="ant-table-content"> |
5 | - <div className="ant-table-body"> | |
6 | - <table> | |
7 | - <thead className="ant-table-thead"> | |
8 | - <tr> | |
9 | - {rowSelection &&<th className="ant-table-selection-column"> | |
10 | - <span className="ant-table-header-column"> | |
11 | - <div> | |
12 | - <span className="ant-table-column-title"> | |
13 | - <div className="ant-table-selection"> | |
14 | - <es-checkbox onChange={this.handleSelectAll.bind(this, event)} | |
15 | - checked={state.isSelectAll} /> | |
16 | - </div> | |
17 | - </span> | |
18 | - </div> | |
19 | - </span> | |
20 | - </th>} | |
21 | - {columns.map(function (column, key) { | |
22 | - return <th key="key" style={{width: column.width}}> | |
23 | - <span className="ant-table-header-column"> | |
24 | - <div> | |
25 | - <span className="ant-table-column-title">{column.title}</span> | |
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} /> | |
26 | 15 | </div> |
27 | 16 | </span> |
28 | - </th> | |
29 | - })} | |
30 | - </tr> | |
31 | - </thead> | |
32 | - <tbody className="ant-table-tbody"> | |
33 | - {state.dataSource.map(function (record, key) { | |
34 | - return <tr className="ant-table-row" key="record[state.rowKey]"> | |
35 | - {rowSelection && <td className="ant-table-selection-column"> | |
36 | - <span> | |
37 | - <es-checkbox checked="record.checked" disabled="record.disabled" | |
38 | - onChange={this.handleSelect.bind(this, event, $index)} /> | |
39 | - </span> | |
40 | - </td>} | |
41 | - {columns.map(function (column, key) { | |
42 | - return <td data-key="{{column.key}}" key="key"> | |
43 | - <es-slot content="{{record[column.key]}}" context="esTable.getContext().$parent" /> | |
44 | - </td> | |
45 | - })} | |
46 | - </tr> | |
17 | + </div> | |
18 | + </span> | |
19 | + </th>} | |
20 | + {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> | |
47 | 33 | })} |
48 | - {state.dataSource.length === 0 && <tr className="ant-table-placeholder"> | |
49 | - <td colspan={columns.length}><div class="ant-empty ant-empty-normal"><div class="ant-empty-image"><svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7"></ellipse><g class="ant-empty-img-simple-g" fill-rule="nonzero"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" class="ant-empty-img-simple-path"></path></g></g></svg></div><div class="ant-empty-description">暂无数据</div></div></td> | |
50 | - </tr>} | |
51 | - </tbody> | |
52 | - </table> | |
53 | - </div> | |
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={columns.length}><div class="ant-empty ant-empty-normal"><div class="ant-empty-image"><svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7"></ellipse><g class="ant-empty-img-simple-g" fill-rule="nonzero"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" class="ant-empty-img-simple-path"></path></g></g></svg></div><div class="ant-empty-description">暂无数据</div></div></td> | |
54 | + </tr>} | |
55 | + </tbody> | |
56 | + </table> | |
54 | 57 | </div> |
55 | 58 | </div> |
56 | 59 | </es-spin> | ... | ... |
src/Table/Table.js
... | ... | @@ -10,6 +10,7 @@ class Table { |
10 | 10 | rowSelection: Object, |
11 | 11 | rowKey: String, |
12 | 12 | loading: Number, |
13 | + onChange: Function, | |
13 | 14 | }; |
14 | 15 | |
15 | 16 | state = { |
... | ... | @@ -18,6 +19,11 @@ class Table { |
18 | 19 | selectedrecords: [], |
19 | 20 | isSelectAll: false, |
20 | 21 | rowKey: this.props.rowKey || "id", |
22 | + sortDirections: ["ascend", "descend"], | |
23 | + sorter: { | |
24 | + field: null, | |
25 | + order: null, | |
26 | + }, | |
21 | 27 | }; |
22 | 28 | |
23 | 29 | template = template; |
... | ... | @@ -32,12 +38,19 @@ class Table { |
32 | 38 | row.checked = false; |
33 | 39 | row.disabled = false; |
34 | 40 | } |
35 | - if (this.props.rowSelection && typeof this.props.rowSelection.getCheckboxProps === "function") { | |
36 | - let extraAttr = this.props.rowSelection.getCheckboxProps(record); | |
41 | + if ( | |
42 | + this.props.rowSelection && | |
43 | + typeof this.props.rowSelection.getCheckboxProps === | |
44 | + "function" | |
45 | + ) { | |
46 | + let extraAttr = | |
47 | + this.props.rowSelection.getCheckboxProps(record); | |
37 | 48 | row = Object.assign(row, extraAttr); |
38 | 49 | } |
39 | 50 | this.props.columns.forEach((column) => { |
40 | - row[column.key] = column.render ? column.render(record[column.key], record, index) : record[column.key]; | |
51 | + row[column.key] = column.render | |
52 | + ? column.render(record[column.key], record, index) | |
53 | + : record[column.key]; | |
41 | 54 | }); |
42 | 55 | // 主键 |
43 | 56 | if (this.props.rowKey !== undefined) { |
... | ... | @@ -70,11 +83,16 @@ class Table { |
70 | 83 | } |
71 | 84 | return record; |
72 | 85 | }); |
73 | - this.props.rowSelection.onChange(this.state.selectedrecordKeys, this.state.selectedrecords); | |
86 | + this.props.rowSelection.onChange( | |
87 | + this.state.selectedrecordKeys, | |
88 | + this.state.selectedrecords | |
89 | + ); | |
74 | 90 | } |
75 | 91 | |
76 | 92 | handleSelect(event, index) { |
77 | - let pos = this.state.selectedrecordKeys.findIndex((value) => value === index); | |
93 | + let pos = this.state.selectedrecordKeys.findIndex( | |
94 | + (value) => value === index | |
95 | + ); | |
78 | 96 | if (event.target.checked && pos === -1) { |
79 | 97 | this.state.selectedrecordKeys.push(index); |
80 | 98 | this.state.selectedrecords.push(this.props.dSource[index]); |
... | ... | @@ -85,6 +103,24 @@ class Table { |
85 | 103 | if (this.state.selectedrecordKeys.length === 0) { |
86 | 104 | this.state.isSelectAll = false; |
87 | 105 | } |
88 | - this.props.rowSelection.onChange(this.state.selectedrecordKeys, this.state.selectedrecords); | |
106 | + this.props.rowSelection.onChange( | |
107 | + this.state.selectedrecordKeys, | |
108 | + this.state.selectedrecords | |
109 | + ); | |
110 | + } | |
111 | + | |
112 | + handleSorter(key) { | |
113 | + this.state.sorter.field = key; | |
114 | + if (this.state.sorter.order === null) { | |
115 | + this.state.sorter.order = "ascend"; | |
116 | + } else if (this.state.sorter.order === "ascend") { | |
117 | + this.state.sorter.order = "descend" | |
118 | + } else if (this.state.sorter.order === "descend") { | |
119 | + this.state.sorter.order = null | |
120 | + this.state.sorter.field = null; | |
121 | + } | |
122 | + this.props.onChange({ | |
123 | + sorter: this.state.sorter, | |
124 | + }); | |
89 | 125 | } |
90 | 126 | } | ... | ... |
yarn.lock
... | ... | @@ -1320,10 +1320,10 @@ babel-plugin-polyfill-regenerator@^0.2.3: |
1320 | 1320 | dependencies: |
1321 | 1321 | "@babel/helper-define-polyfill-provider" "^0.2.4" |
1322 | 1322 | |
1323 | -beanboom@0.8.4: | |
1324 | - version "0.8.4" | |
1325 | - resolved "https://registry.npmmirror.com/beanboom/download/beanboom-0.8.4.tgz#7d4f424316f6b774986e2e3dcfec5e1685e2ca71" | |
1326 | - integrity sha512-t3fd/fBhx1tu+s5HnLmXIp7WACgE+GL17q0YUfOrnLFXzXWxMQ7bDcSud+ocxFwBVFY94w461VkznNqI8YihtQ== | |
1323 | +beanboom@0.8.5: | |
1324 | + version "0.8.5" | |
1325 | + resolved "https://registry.npmmirror.com/beanboom/download/beanboom-0.8.5.tgz#f661201a4ab1f082e485bae35a74395222407783" | |
1326 | + integrity sha512-hVP/QBRpUGHQxqpAAZHREN64LIfhbsIH1KWTItGNkIcT6u/rGrtqqv/m3xUDV7pxOV6UTU5vVaYgkoit38KfGA== | |
1327 | 1327 | dependencies: |
1328 | 1328 | "@babel/core" "^7.12.10" |
1329 | 1329 | "@babel/plugin-proposal-class-properties" "^7.13.0" | ... | ... |