Commit 29558aa1b0330417d0032ed8ce7cf524edc83fd9
1 parent
b9305a60
优化
Showing
7 changed files
with
20 additions
and
98 deletions
Show diff stats
build/Alert/Alert.js
... | ... | @@ -12,7 +12,7 @@ angular.module("esNgAntd").directive("antdAlert", ["esNgAntd", function (esNgAnt |
12 | 12 | showIcon: "=", |
13 | 13 | description: "@" |
14 | 14 | }, |
15 | - controller: function ($scope) { | |
15 | + controller: function ($scope, $element) { | |
16 | 16 | $scope.state = { |
17 | 17 | icons: { |
18 | 18 | warning: "ExclamationCircleFilled", |
... | ... | @@ -22,7 +22,7 @@ angular.module("esNgAntd").directive("antdAlert", ["esNgAntd", function (esNgAnt |
22 | 22 | } |
23 | 23 | }; |
24 | 24 | }, |
25 | - link: function ($scope, $element, $attrs, $controllers, $transclude) { | |
25 | + link: function ($scope) { | |
26 | 26 | esNgAntd.createStyle("ant-alert", style); |
27 | 27 | esNgAntd.clearAttribute($element[0], ["ng-class", "type", "message", "show-icon", "description"]); |
28 | 28 | } | ... | ... |
build/Breadcrumb/Breadcrumb.js
... | ... | @@ -6,7 +6,7 @@ angular.module("esNgAntd").directive("antdBreadcrumb", ["esNgAntd", function (es |
6 | 6 | restrict: "E", |
7 | 7 | replace: true, |
8 | 8 | transclude: true, |
9 | - link: function ($scope, $element, $attrs, $controllers, $transclude) { | |
9 | + link: function ($scope) { | |
10 | 10 | esNgAntd.createStyle("ant-breadcrumb", style); |
11 | 11 | } |
12 | 12 | }; | ... | ... |
build/BreadcrumbItem/BreadcrumbItem.js
... | ... | @@ -8,7 +8,7 @@ angular.module("esNgAntd").directive("antdBreadcrumbItem", ["esNgAntd", function |
8 | 8 | scope: { |
9 | 9 | href: "@" |
10 | 10 | }, |
11 | - link: function ($scope, $element, $attrs, $controllers, $transclude) { | |
11 | + link: function ($scope) { | |
12 | 12 | esNgAntd.clearAttribute($element[0], ["href"]); |
13 | 13 | } |
14 | 14 | }; | ... | ... |
build/Button/Button.js
... | ... | @@ -13,7 +13,7 @@ angular.module("esNgAntd").directive("antdButton", ["esNgAntd", function (esNgAn |
13 | 13 | ghost: "=", |
14 | 14 | loading: "=" |
15 | 15 | }, |
16 | - controller: function ($scope) { | |
16 | + controller: function ($scope, $element) { | |
17 | 17 | $scope.state = { |
18 | 18 | disabled: null, |
19 | 19 | className: "" |
... | ... | @@ -30,7 +30,7 @@ angular.module("esNgAntd").directive("antdButton", ["esNgAntd", function (esNgAn |
30 | 30 | } |
31 | 31 | }; |
32 | 32 | }, |
33 | - link: function ($scope, $element, $attrs, $controllers, $transclude) { | |
33 | + link: function ($scope) { | |
34 | 34 | esNgAntd.createStyle("ant-btn", style); |
35 | 35 | let className = ["ant-btn"]; |
36 | 36 | ... | ... |
build/Common/Common.js
1 | 1 | import baseStyle from "antd/lib/style/index.css"; |
2 | - | |
3 | -angular.module("esNgAntd").service("esNgAntd", [ | |
4 | - "$compile", | |
5 | - function ($compile) { | |
6 | - this.styleSheets = null; | |
7 | - | |
8 | - this.conflictType = null; | |
9 | - | |
10 | - this.createStyle = function (key, style) { | |
11 | - if (!document.querySelector("#antd")) { | |
12 | - let styleElement = document.createElement("style"); | |
13 | - styleElement.setAttribute("id", "antd"); | |
14 | - styleElement.setAttribute("type", "text/css"); | |
15 | - styleElement.innerHTML = baseStyle.toString(); | |
16 | - document.head.appendChild(styleElement); | |
17 | - if (this.styleSheets) { | |
18 | - this.disableStyle("anticon"); | |
19 | - } | |
20 | - } | |
21 | - if (!document.querySelector("#" + key)) { | |
22 | - let styleElement = document.createElement("style"); | |
23 | - styleElement.setAttribute("id", key); | |
24 | - styleElement.setAttribute("type", "text/css"); | |
25 | - styleElement.innerHTML = style.toString(); | |
26 | - document.head.appendChild(styleElement); | |
27 | - if (this.styleSheets) { | |
28 | - this.disableStyle(key); | |
29 | - } | |
30 | - } | |
31 | - }; | |
32 | - | |
33 | - this.disableStyle = function (name) { | |
34 | - for (let i = 0; i < this.styleSheets.cssRules.length; i++) { | |
35 | - let rule = this.styleSheets.cssRules[i]; | |
36 | - if ( | |
37 | - rule.selectorText && | |
38 | - rule.selectorText.indexOf(name) !== -1 && | |
39 | - rule.selectorText.indexOf("ant3") === -1 | |
40 | - ) { | |
41 | - rule.selectorText = rule.selectorText | |
42 | - .split(",") | |
43 | - .map(function (item) { | |
44 | - return ".ant3 " + item; | |
45 | - }) | |
46 | - .join(","); | |
47 | - } | |
48 | - } | |
49 | - }; | |
50 | - | |
51 | - this.conflict = function (filename, type) { | |
52 | - this.conflictType = type; | |
53 | - for (let i = 0; i < document.styleSheets.length; i++) { | |
54 | - const element = document.styleSheets[i]; | |
55 | - if (element.href && element.href.indexOf(filename) !== -1) { | |
56 | - this.styleSheets = element; | |
57 | - } | |
58 | - } | |
59 | - }; | |
60 | - | |
61 | - this.clearAttribute = function (element, attrs) { | |
62 | - for (const attr of attrs) { | |
63 | - element.removeAttribute(attr) | |
64 | - } | |
65 | - } | |
66 | - | |
67 | - this.createLayer = function (content, scope) { | |
68 | - let div = document.createElement("div"); | |
69 | - div.innerHTML = content; | |
70 | - document.body.appendChild(div); | |
71 | - $compile(div)(scope); | |
72 | - }; | |
73 | - | |
74 | - this.getOffset = function (ele) { | |
75 | - if (!ele || ele.nodeType != 1) { | |
76 | - return; | |
77 | - } | |
78 | - let rect = ele.getBoundingClientRect(); | |
79 | - let doc = ele.ownerDocument.documentElement; | |
80 | - return { | |
81 | - top: rect.top + window.pageYOffset - doc.clientTop, | |
82 | - left: rect.left + window.pageXOffset - doc.clientLeft, | |
83 | - }; | |
84 | - }; | |
85 | - }, | |
86 | -]); | |
2 | +angular.module("esNgAntd").directive(function () { | |
3 | + return { | |
4 | + restrict: "E", | |
5 | + replace: true, | |
6 | + transclude: true | |
7 | + }; | |
8 | +}); | |
87 | 9 | \ No newline at end of file | ... | ... |
build/Icon/Icon.js
... | ... | @@ -9,7 +9,7 @@ angular.module("esNgAntd").directive("antdIcon", ["$compile", function ($compile |
9 | 9 | scope: { |
10 | 10 | type: "@" |
11 | 11 | }, |
12 | - link: function ($scope, $element, $attrs, $controllers, $transclude) { | |
12 | + link: function ($scope) { | |
13 | 13 | let template = renderIconDefinitionToSVGElement(iconsSvg[$scope.type], { |
14 | 14 | extraSVGAttrs: { |
15 | 15 | width: "1em", | ... | ... |
dist/ng-antd.js
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
17 | 17 | |
18 | 18 | "use strict"; |
19 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_alert_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/alert/style/index.css */ \"./node_modules/antd/lib/alert/style/index.css\");\n/* harmony import */ var _Alert_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Alert.html */ \"./build/Alert/Alert.html\");\n\n\nangular.module(\"esNgAntd\").directive(\"antdAlert\", [\"esNgAntd\", function (esNgAntd) {\n return {\n template: _Alert_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n restrict: \"E\",\n replace: true,\n transclude: true,\n scope: {\n type: \"@\",\n message: \"@\",\n showIcon: \"=\",\n description: \"@\"\n },\n controller: function ($scope) {\n $scope.state = {\n icons: {\n warning: \"ExclamationCircleFilled\",\n success: \"CheckCircleFilled\",\n info: \"InfoCircleFilled\",\n error: \"CloseCircleFilled\"\n }\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-alert\", antd_lib_alert_style_index_css__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n esNgAntd.clearAttribute($element[0], [\"ng-class\", \"type\", \"message\", \"show-icon\", \"description\"]);\n }\n };\n}]);\n\n//# sourceURL=webpack://ng-antd/./build/Alert/Alert.js?"); | |
19 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_alert_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/alert/style/index.css */ \"./node_modules/antd/lib/alert/style/index.css\");\n/* harmony import */ var _Alert_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Alert.html */ \"./build/Alert/Alert.html\");\n\n\nangular.module(\"esNgAntd\").directive(\"antdAlert\", [\"esNgAntd\", function (esNgAntd) {\n return {\n template: _Alert_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n restrict: \"E\",\n replace: true,\n transclude: true,\n scope: {\n type: \"@\",\n message: \"@\",\n showIcon: \"=\",\n description: \"@\"\n },\n controller: function ($scope, $element) {\n $scope.state = {\n icons: {\n warning: \"ExclamationCircleFilled\",\n success: \"CheckCircleFilled\",\n info: \"InfoCircleFilled\",\n error: \"CloseCircleFilled\"\n }\n };\n },\n link: function ($scope) {\n esNgAntd.createStyle(\"ant-alert\", antd_lib_alert_style_index_css__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n esNgAntd.clearAttribute($element[0], [\"ng-class\", \"type\", \"message\", \"show-icon\", \"description\"]);\n }\n };\n}]);\n\n//# sourceURL=webpack://ng-antd/./build/Alert/Alert.js?"); | |
20 | 20 | |
21 | 21 | /***/ }), |
22 | 22 | |
... | ... | @@ -27,7 +27,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd |
27 | 27 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
28 | 28 | |
29 | 29 | "use strict"; |
30 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_breadcrumb_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/breadcrumb/style/index.css */ \"./node_modules/antd/lib/breadcrumb/style/index.css\");\n/* harmony import */ var _Breadcrumb_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Breadcrumb.html */ \"./build/Breadcrumb/Breadcrumb.html\");\n\n\nangular.module(\"esNgAntd\").directive(\"antdBreadcrumb\", [\"esNgAntd\", function (esNgAntd) {\n return {\n template: _Breadcrumb_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n restrict: \"E\",\n replace: true,\n transclude: true,\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-breadcrumb\", antd_lib_breadcrumb_style_index_css__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n }\n };\n}]);\n\n//# sourceURL=webpack://ng-antd/./build/Breadcrumb/Breadcrumb.js?"); | |
30 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_breadcrumb_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/breadcrumb/style/index.css */ \"./node_modules/antd/lib/breadcrumb/style/index.css\");\n/* harmony import */ var _Breadcrumb_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Breadcrumb.html */ \"./build/Breadcrumb/Breadcrumb.html\");\n\n\nangular.module(\"esNgAntd\").directive(\"antdBreadcrumb\", [\"esNgAntd\", function (esNgAntd) {\n return {\n template: _Breadcrumb_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n restrict: \"E\",\n replace: true,\n transclude: true,\n link: function ($scope) {\n esNgAntd.createStyle(\"ant-breadcrumb\", antd_lib_breadcrumb_style_index_css__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n }\n };\n}]);\n\n//# sourceURL=webpack://ng-antd/./build/Breadcrumb/Breadcrumb.js?"); | |
31 | 31 | |
32 | 32 | /***/ }), |
33 | 33 | |
... | ... | @@ -38,7 +38,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd |
38 | 38 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
39 | 39 | |
40 | 40 | "use strict"; |
41 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _BreadcrumbItem_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BreadcrumbItem.html */ \"./build/BreadcrumbItem/BreadcrumbItem.html\");\n\nangular.module(\"esNgAntd\").directive(\"antdBreadcrumbItem\", [\"esNgAntd\", function (esNgAntd) {\n return {\n template: _BreadcrumbItem_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n restrict: \"E\",\n replace: true,\n transclude: true,\n scope: {\n href: \"@\"\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.clearAttribute($element[0], [\"href\"]);\n }\n };\n}]);\n\n//# sourceURL=webpack://ng-antd/./build/BreadcrumbItem/BreadcrumbItem.js?"); | |
41 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _BreadcrumbItem_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BreadcrumbItem.html */ \"./build/BreadcrumbItem/BreadcrumbItem.html\");\n\nangular.module(\"esNgAntd\").directive(\"antdBreadcrumbItem\", [\"esNgAntd\", function (esNgAntd) {\n return {\n template: _BreadcrumbItem_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n restrict: \"E\",\n replace: true,\n transclude: true,\n scope: {\n href: \"@\"\n },\n link: function ($scope) {\n esNgAntd.clearAttribute($element[0], [\"href\"]);\n }\n };\n}]);\n\n//# sourceURL=webpack://ng-antd/./build/BreadcrumbItem/BreadcrumbItem.js?"); | |
42 | 42 | |
43 | 43 | /***/ }), |
44 | 44 | |
... | ... | @@ -49,7 +49,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Bre |
49 | 49 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
50 | 50 | |
51 | 51 | "use strict"; |
52 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_button_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/button/style/index.css */ \"./node_modules/antd/lib/button/style/index.css\");\n/* harmony import */ var _Button_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Button.html */ \"./build/Button/Button.html\");\n\n\nangular.module(\"esNgAntd\").directive(\"antdButton\", [\"esNgAntd\", function (esNgAntd) {\n return {\n template: _Button_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n restrict: \"E\",\n replace: true,\n transclude: true,\n scope: {\n type: \"@\",\n size: \"@\",\n htmlType: \"@\",\n ghost: \"=\",\n loading: \"=\"\n },\n controller: function ($scope) {\n $scope.state = {\n disabled: null,\n className: \"\"\n };\n $scope.watch = {\n loading: newVal => {\n if (newVal !== undefined) {\n if (newVal === \"true\") {\n $scope.state.className += \" ant-btn-loading\";\n } else {\n $scope.state.className = $scope.state.className.replace(\" ant-btn-loading\", \"\");\n }\n }\n }\n };\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n esNgAntd.createStyle(\"ant-btn\", antd_lib_button_style_index_css__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n let className = [\"ant-btn\"];\n\n if ($scope.type) {\n className.push(\"ant-btn-\" + $scope.type);\n }\n\n if ($scope.size && [\"lg\", \"sm\", \"xs\"].includes($scope.size)) {\n className.push(\"ant-btn-\" + $scope.size);\n }\n\n if ($scope.ghost) {\n className.push(\"ant-btn-background-ghost\");\n }\n\n $scope.state.className = className.join(\" \");\n\n if ($scope.htmlType) {\n $element[0].setAttribute(\"type\", $scope.htmlType);\n }\n }\n };\n}]);\n\n//# sourceURL=webpack://ng-antd/./build/Button/Button.js?"); | |
52 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_button_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/button/style/index.css */ \"./node_modules/antd/lib/button/style/index.css\");\n/* harmony import */ var _Button_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Button.html */ \"./build/Button/Button.html\");\n\n\nangular.module(\"esNgAntd\").directive(\"antdButton\", [\"esNgAntd\", function (esNgAntd) {\n return {\n template: _Button_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n restrict: \"E\",\n replace: true,\n transclude: true,\n scope: {\n type: \"@\",\n size: \"@\",\n htmlType: \"@\",\n ghost: \"=\",\n loading: \"=\"\n },\n controller: function ($scope, $element) {\n $scope.state = {\n disabled: null,\n className: \"\"\n };\n $scope.watch = {\n loading: newVal => {\n if (newVal !== undefined) {\n if (newVal === \"true\") {\n $scope.state.className += \" ant-btn-loading\";\n } else {\n $scope.state.className = $scope.state.className.replace(\" ant-btn-loading\", \"\");\n }\n }\n }\n };\n },\n link: function ($scope) {\n esNgAntd.createStyle(\"ant-btn\", antd_lib_button_style_index_css__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n let className = [\"ant-btn\"];\n\n if ($scope.type) {\n className.push(\"ant-btn-\" + $scope.type);\n }\n\n if ($scope.size && [\"lg\", \"sm\", \"xs\"].includes($scope.size)) {\n className.push(\"ant-btn-\" + $scope.size);\n }\n\n if ($scope.ghost) {\n className.push(\"ant-btn-background-ghost\");\n }\n\n $scope.state.className = className.join(\" \");\n\n if ($scope.htmlType) {\n $element[0].setAttribute(\"type\", $scope.htmlType);\n }\n }\n };\n}]);\n\n//# sourceURL=webpack://ng-antd/./build/Button/Button.js?"); | |
53 | 53 | |
54 | 54 | /***/ }), |
55 | 55 | |
... | ... | @@ -104,7 +104,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Col |
104 | 104 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
105 | 105 | |
106 | 106 | "use strict"; |
107 | -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/style/index.css */ \"./node_modules/antd/lib/style/index.css\");\n\n\nangular.module(\"esNgAntd\").service(\"esNgAntd\", [\n \"$compile\",\n function ($compile) {\n this.styleSheets = null;\n\n this.conflictType = null;\n\n this.createStyle = function (key, style) {\n if (!document.querySelector(\"#antd\")) {\n let styleElement = document.createElement(\"style\");\n styleElement.setAttribute(\"id\", \"antd\");\n styleElement.setAttribute(\"type\", \"text/css\");\n styleElement.innerHTML = antd_lib_style_index_css__WEBPACK_IMPORTED_MODULE_0__[\"default\"].toString();\n document.head.appendChild(styleElement);\n if (this.styleSheets) {\n this.disableStyle(\"anticon\");\n }\n }\n if (!document.querySelector(\"#\" + key)) {\n let styleElement = document.createElement(\"style\");\n styleElement.setAttribute(\"id\", key);\n styleElement.setAttribute(\"type\", \"text/css\");\n styleElement.innerHTML = style.toString();\n document.head.appendChild(styleElement);\n if (this.styleSheets) {\n this.disableStyle(key);\n }\n }\n };\n\n this.disableStyle = function (name) {\n for (let i = 0; i < this.styleSheets.cssRules.length; i++) {\n let rule = this.styleSheets.cssRules[i];\n if (\n rule.selectorText &&\n rule.selectorText.indexOf(name) !== -1 &&\n rule.selectorText.indexOf(\"ant3\") === -1\n ) {\n rule.selectorText = rule.selectorText\n .split(\",\")\n .map(function (item) {\n return \".ant3 \" + item;\n })\n .join(\",\");\n }\n }\n };\n\n this.conflict = function (filename, type) {\n this.conflictType = type;\n for (let i = 0; i < document.styleSheets.length; i++) {\n const element = document.styleSheets[i];\n if (element.href && element.href.indexOf(filename) !== -1) {\n this.styleSheets = element;\n }\n }\n };\n\n this.clearAttribute = function (element, attrs) {\n for (const attr of attrs) {\n element.removeAttribute(attr)\n }\n }\n\n this.createLayer = function (content, scope) {\n let div = document.createElement(\"div\");\n div.innerHTML = content;\n document.body.appendChild(div);\n $compile(div)(scope);\n };\n\n this.getOffset = function (ele) {\n if (!ele || ele.nodeType != 1) {\n return;\n }\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\n\n//# sourceURL=webpack://ng-antd/./build/Common/Common.js?"); | |
107 | +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var antd_lib_style_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/lib/style/index.css */ \"./node_modules/antd/lib/style/index.css\");\n\nangular.module(\"esNgAntd\").directive(function () {\n return {\n restrict: \"E\",\n replace: true,\n transclude: true\n };\n});\n\n//# sourceURL=webpack://ng-antd/./build/Common/Common.js?"); | |
108 | 108 | |
109 | 109 | /***/ }), |
110 | 110 | |
... | ... | @@ -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_es_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/icons-svg/es/helpers */ \"./node_modules/@ant-design/icons-svg/es/helpers.js\");\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\n\nangular.module(\"esNgAntd\").directive(\"antdIcon\", [\"$compile\", function ($compile) {\n return {\n template: `<span class=\"anticon\"></span>`,\n restrict: \"E\",\n replace: true,\n transclude: true,\n scope: {\n type: \"@\"\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {\n let template = (0,_ant_design_icons_svg_es_helpers__WEBPACK_IMPORTED_MODULE_0__.renderIconDefinitionToSVGElement)(_ant_design_icons_svg__WEBPACK_IMPORTED_MODULE_1__[$scope.type], {\n extraSVGAttrs: {\n width: \"1em\",\n height: \"1em\",\n fill: \"currentColor\"\n }\n });\n $element.append(template);\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_es_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/icons-svg/es/helpers */ \"./node_modules/@ant-design/icons-svg/es/helpers.js\");\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\n\nangular.module(\"esNgAntd\").directive(\"antdIcon\", [\"$compile\", function ($compile) {\n return {\n template: `<span class=\"anticon\"></span>`,\n restrict: \"E\",\n replace: true,\n transclude: true,\n scope: {\n type: \"@\"\n },\n link: function ($scope) {\n let template = (0,_ant_design_icons_svg_es_helpers__WEBPACK_IMPORTED_MODULE_0__.renderIconDefinitionToSVGElement)(_ant_design_icons_svg__WEBPACK_IMPORTED_MODULE_1__[$scope.type], {\n extraSVGAttrs: {\n width: \"1em\",\n height: \"1em\",\n fill: \"currentColor\"\n }\n });\n $element.append(template);\n }\n };\n}]);\n\n//# sourceURL=webpack://ng-antd/./build/Icon/Icon.js?"); | |
163 | 163 | |
164 | 164 | /***/ }), |
165 | 165 | ... | ... |