diff --git a/build/Form/Form.js b/build/Form/Form.js index 5826184..dd0bcd5 100644 --- a/build/Form/Form.js +++ b/build/Form/Form.js @@ -11,6 +11,7 @@ angular.module("esNgAntd").directive("esForm", function (esNgAntd) { labelCol: "=", wrapperCol: "=", onFinish: "&", + form: "=", }, template: template, controller: function ($scope, $element) { @@ -18,24 +19,33 @@ angular.module("esNgAntd").directive("esForm", function (esNgAntd) { return $scope; }; - $scope.state = {}; + $scope.state = { + formItems: [], + }; + + $scope.resetFields = function () { + $scope.state.formItems.forEach(function (item) { + item.value = null; + }); + }; $scope.handleSubmit = function () { let values = {}; - let inputs = $element[0].querySelectorAll("input"); - - for (let i = 0; i < inputs.length; i++) { - const element = inputs[i]; - const value = element.value === "" ? null : element.value; - - if (element.id) { - if (element.id.split("_").length > 1) { - values[element.id.split("_")[1]] = value; - } else { - values[element.id] = value; - } - } - } + $scope.state.formItems.forEach(function (item) { + let name = item.esFormItem && item.esFormItem.name; + let value = item.value || item.state.value || null; + values[name] = value; + }); // for (let i = 0; i < inputs.length; i++) { + // const element = inputs[i]; + // const value = element.value === "" ? null : element.value; + // if (element.id) { + // if (element.id.split("_").length > 1) { + // values[element.id.split("_")[1]] = value; + // } else { + // values[element.id] = value; + // } + // } + // } $scope.onFinish({ values: values, @@ -44,6 +54,7 @@ angular.module("esNgAntd").directive("esForm", function (esNgAntd) { }, link: function ($scope, $element, $attrs, $controllers, $transclude) { esNgAntd.createStyle("ant-form", style); + $scope.form = $scope; if ($scope.name) { let inputs = $element[0].querySelectorAll("input"); diff --git a/build/Icon/Icon.js b/build/Icon/Icon.js index 135ebf6..cd6388d 100644 --- a/build/Icon/Icon.js +++ b/build/Icon/Icon.js @@ -1,6 +1,6 @@ import * as iconsSvg from "@ant-design/icons-svg"; import { renderIconDefinitionToSVGElement } from "@ant-design/icons-svg/es/helpers"; -angular.module("esNgAntd").directive("esIcon", function () { +angular.module("esNgAntd").directive("esIcon", function ($compile) { return { controllerAs: "esIcon", restrict: "E", @@ -9,19 +9,19 @@ angular.module("esNgAntd").directive("esIcon", function () { scope: { type: "@", }, + template: ``, link: function ($scope, $element, $attrs, $controllers, $transclude) { - $element.replaceWith( - `${renderIconDefinitionToSVGElement( - iconsSvg[$scope.type], - { - extraSVGAttrs: { - width: "1em", - height: "1em", - fill: "currentColor", - }, - } - )}` + let template = renderIconDefinitionToSVGElement( + iconsSvg[$scope.type], + { + extraSVGAttrs: { + width: "1em", + height: "1em", + fill: "currentColor", + }, + } ); + $element.append(template); }, }; }); diff --git a/build/Input/Input.js b/build/Input/Input.js index d096fa0..6fc1c0a 100644 --- a/build/Input/Input.js +++ b/build/Input/Input.js @@ -68,12 +68,14 @@ angular.module("esNgAntd").directive("esInput", function ($compile, esNgAntd) { } }; }, - require: ["?^esFormItem"], + require: ["?^esFormItem", "?^esForm"], link: function ($scope, $element, $attrs, $controllers, $transclude) { - let [esFormItem] = $controllers; + let [esFormItem, esForm] = $controllers; esNgAntd.createStyle("ant-input", style); + $scope.esForm = esForm.getContext(); $scope.esFormItem = esFormItem.getContext(); $scope.style = $attrs.style; + $scope.esForm.state.formItems.push($scope); $element.replaceWith($compile($scope.getTemplate())($scope)); }, }; diff --git a/build/Option/Option.js b/build/Option/Option.js index 467f915..8d9910d 100644 --- a/build/Option/Option.js +++ b/build/Option/Option.js @@ -2,9 +2,9 @@ * 选项 */ import template from "./Option.html"; -angular.module("esNgAntd").directive("esOption", function () { +angular.module("esNgAntd").directive("esSelectOption", function () { return { - controllerAs: "esOption", + controllerAs: "esSelectOption", restrict: "E", transclude: true, replace: true, diff --git a/build/Pagination/Pagination.html b/build/Pagination/Pagination.html index d34bb46..1ba497b 100644 --- a/build/Pagination/Pagination.html +++ b/build/Pagination/Pagination.html @@ -1,22 +1,26 @@ \ No newline at end of file diff --git a/build/Pagination/Pagination.js b/build/Pagination/Pagination.js index 57f3bd3..8bec572 100644 --- a/build/Pagination/Pagination.js +++ b/build/Pagination/Pagination.js @@ -1,5 +1,6 @@ import template from "./Pagination.html"; -angular.module("esNgAntd").directive("esPagination", function () { +import style from "antd/lib/pagination/style/index.css"; +angular.module("esNgAntd").directive("esPagination", function (esNgAntd) { return { controllerAs: "esPagination", restrict: "E", @@ -114,6 +115,7 @@ angular.module("esNgAntd").directive("esPagination", function () { }; }, link: function ($scope, $element, $attrs, $controllers, $transclude) { + esNgAntd.createStyle("ant-pagination", style); $scope.state.total = Number($scope.total || 0); $scope.state.current = Number( $scope.current || $scope.defaultCurrent || 1 diff --git a/build/Select/Select.html b/build/Select/Select.html index 154713d..3d682c8 100644 --- a/build/Select/Select.html +++ b/build/Select/Select.html @@ -1,16 +1,9 @@ -
-
-
-
{{placeholder}}
-
{{undefined}}
-
- - - - - - - +
+
+ {{state.label}}
- + + + +
\ No newline at end of file diff --git a/build/Select/Select.js b/build/Select/Select.js index 8a70c73..9dcbd83 100644 --- a/build/Select/Select.js +++ b/build/Select/Select.js @@ -1,119 +1,149 @@ import template from "./Select.html"; -angular.module("esNgAntd").directive("esSelect", function ($compile, $timeout) { - return { - controllerAs: "esSelect", - restrict: "E", - transclude: true, - replace: true, - scope: { - value: "@", - placeholder: "@", - onChange: "&", - placeholder: "@", - getPopupContainer: "&", - }, - template: template, - controller: function ($scope, $element) { - this.getContext = function () { - return $scope; - }; +import style from "antd/lib/select/style/index.css"; +angular + .module("esNgAntd") + .directive("esSelect", function ($compile, $timeout, esNgAntd) { + return { + controllerAs: "esSelect", + restrict: "E", + transclude: true, + replace: true, + scope: { + value: "@", + placeholder: "@", + onChange: "&", + placeholder: "@", + getPopupContainer: "&", + }, + template: template, + controller: function ($scope, $element) { + this.getContext = function () { + return $scope; + }; - $scope.state = { - open: false, - childrens: [], - label: null, - value: null, - popup: null, - }; + $scope.state = { + open: false, + childrens: [], + label: null, + value: null, + popup: null, + }; - $scope.addOption = function (option) { - $scope.state.childrens.push(option); - }; + $scope.addOption = function (option) { + $scope.state.childrens.push(option); + }; - $scope.handleClick = function (option) { - $scope.state.open = !$scope.state.open; - $scope.state.label = option.label; - $scope.state.value = option.value; - $scope.onChange({ - value: $scope.state.value, - }); - }; + $scope.handleClick = function (option) { + $scope.state.open = !$scope.state.open; + $scope.state.label = option.label; + $scope.state.value = option.value; + $scope.onChange({ + value: $scope.state.value, + }); + }; - $scope.getOffset = function (ele) { - if (!ele || ele.nodeType != 1) { - return; - } + $scope.getOffset = function (ele) { + if (!ele || ele.nodeType != 1) { + return; + } - let func = $scope.getPopupContainer(); + let func = $scope.getPopupContainer(); - if (typeof func === "function" && func() !== undefined) { - return { - top: $element[0].offsetTop, - left: $element[0].offsetLeft, - }; - } else { - let rect = ele.getBoundingClientRect(); - let doc = ele.ownerDocument.documentElement; - return { - top: rect.top + window.pageYOffset - doc.clientTop, - left: rect.left + window.pageXOffset - doc.clientLeft, - }; - } - }; + if (typeof func === "function" && func() !== undefined) { + return { + top: $element[0].offsetTop, + left: $element[0].offsetLeft, + }; + } else { + let rect = ele.getBoundingClientRect(); + let doc = ele.ownerDocument.documentElement; + return { + top: rect.top + window.pageYOffset - doc.clientTop, + left: + rect.left + window.pageXOffset - doc.clientLeft, + }; + } + }; - $scope.myEvent = function () { - $timeout(() => { - $scope.state.open = false; - document.body.removeEventListener("click", $scope.myEvent); - }, 0); - }; + $scope.myEvent = function () { + $timeout(() => { + $scope.state.open = false; + document.body.removeEventListener( + "click", + $scope.myEvent + ); + }, 0); + }; - $scope.handleBlur = function () { - // 事件绑定 - document.body.addEventListener("click", $scope.myEvent); - }; + $scope.handleBlur = function () { + // 事件绑定 + document.body.addEventListener("click", $scope.myEvent); + }; - $scope.handleOpen = function (event) { - event.stopPropagation(); - const { height, width } = $element[0].getBoundingClientRect(); - const { top, left } = $scope.getOffset($element[0]); - let div = document.createElement("div"); - div.style.position = "absolute"; - div.style.left = 0; - div.style.top = 0; - div.style.width = "100%"; - div.appendChild( - $compile(`
-
    -
  • {{option.label}}
  • -
+ $scope.handleOpen = function (event) { + event.stopPropagation(); + const { height, width } = + $element[0].getBoundingClientRect(); + const { top, left } = $scope.getOffset($element[0]); // 处理标签 + + $scope.state.childrens.forEach(function (item) { + item.label = item.element.text(); + }); + let div = document.createElement("div"); + div.style.position = "absolute"; + div.style.left = 0; + div.style.top = 0; + div.style.width = "100%"; + div.appendChild( + $compile(`
+
+
{{option.label}}
+
`)($scope)[0] - ); + ); - if ($scope.state.popup === null) { - let func = $scope.getPopupContainer(); + if ($scope.state.popup === null) { + let func = $scope.getPopupContainer(); - if (typeof func === "function" && func() !== undefined) { - $element[0].style.position = "relative"; - $scope.getPopupContainer()().appendChild(div); - } else { - document.body.appendChild(div); + if ( + typeof func === "function" && + func() !== undefined + ) { + $element[0].style.position = "relative"; + $scope.getPopupContainer()().appendChild(div); + } else { + document.body.appendChild(div); + } + + $scope.state.popup = div; } - $scope.state.popup = div; - } + $scope.state.open = !$scope.state.open; + $scope.handleBlur(); + }; + }, + require: ["?^esForm", "?^esFormItem"], + link: function ( + $scope, + $element, + $attrs, + $controllers, + $transclude + ) { + let [esForm, esFormItem] = $controllers; + esNgAntd.createStyle("ant-select", style); + $scope.esForm = esForm.getContext(); + $scope.esFormItem = esFormItem.getContext(); + $scope.esForm.state.formItems.push($scope); + let option = $scope.state.childrens.find(function (option) { + return option.value === $scope.value; + }); - $scope.state.open = !$scope.state.open; - $scope.handleBlur(); - }; - }, - link: function ($scope, $element, $attrs, $controllers, $transclude) { - let option = $scope.state.childrens.find(function (option) { - return option.value === $scope.value; - }); - $scope.state.label = option.label; - }, - }; -}); + if (option) { + $scope.state.label = option.label; + } + }, + }; + }); diff --git a/build/SelectOption/SelectOption.html b/build/SelectOption/SelectOption.html new file mode 100644 index 0000000..b68f35b --- /dev/null +++ b/build/SelectOption/SelectOption.html @@ -0,0 +1 @@ +
  • \ No newline at end of file diff --git a/build/SelectOption/SelectOption.js b/build/SelectOption/SelectOption.js new file mode 100644 index 0000000..a6af3f4 --- /dev/null +++ b/build/SelectOption/SelectOption.js @@ -0,0 +1,35 @@ +/** + * 选项 + */ +import template from "./SelectOption.html"; +angular.module("esNgAntd").directive("esSelectOption", function () { + return { + controllerAs: "esSelectOption", + restrict: "E", + transclude: true, + replace: true, + scope: { + value: "@", + }, + template: template, + controller: function ($scope, $element) { + this.getContext = function () { + return $scope; + }; + + $scope.state = { + label: null, + }; + }, + require: ["?^esSelect"], + link: function ($scope, $element, $attrs, $controllers, $transclude) { + let [esSelect] = $controllers; + $scope.esSelect = esSelect.getContext(); + $scope.esSelect.addOption({ + value: $scope.value, + label: null, + element: $element, + }); + }, + }; +}); diff --git a/build/Table/Table.html b/build/Table/Table.html index d549b3b..af99830 100644 --- a/build/Table/Table.html +++ b/build/Table/Table.html @@ -2,47 +2,50 @@
    -
    - - - - - + + + + + + + + + + + + +
    - -
    - -
    - -
    -
    -
    -
    -
    - -
    - {{column.title}} + + + + - - - - - - - - - - - -
    + +
    + +
    +
    -
    - - - - - -
    暂无数据
    -
    + +
    +
    + {{column.title}} +
    + {{column.title}} + + + + + + +
    +
    + + + + + +
    暂无数据
    diff --git a/build/Table/Table.js b/build/Table/Table.js index 0c34d2e..ffd97b5 100644 --- a/build/Table/Table.js +++ b/build/Table/Table.js @@ -12,6 +12,7 @@ angular.module("esNgAntd").directive("esTable", function (esNgAntd) { rowSelection: "=", rowKey: "@", loading: "@", + onChange: "&", }, template: template, controller: function ($scope, $element) { @@ -25,6 +26,11 @@ angular.module("esNgAntd").directive("esTable", function (esNgAntd) { selectedrecords: [], isSelectAll: false, rowKey: $scope.rowKey || "id", + sortDirections: ["ascend", "descend"], + sorter: { + field: null, + order: null, + }, }; $scope.watch = { dSource: (newValue) => { @@ -122,6 +128,23 @@ angular.module("esNgAntd").directive("esTable", function (esNgAntd) { $scope.state.selectedrecords ); }; + + $scope.handleSorter = function (key) { + $scope.state.sorter.field = key; + + if ($scope.state.sorter.order === null) { + $scope.state.sorter.order = "ascend"; + } else if ($scope.state.sorter.order === "ascend") { + $scope.state.sorter.order = "descend"; + } else if ($scope.state.sorter.order === "descend") { + $scope.state.sorter.order = null; + $scope.state.sorter.field = null; + } + + $scope.onChange({ + sorter: $scope.state.sorter, + }); + }; }, link: function ($scope, $element, $attrs, $controllers, $transclude) { esNgAntd.createStyle("ant-table", style); diff --git a/build/index.js b/build/index.js index fd7b1ee..aed872a 100644 --- a/build/index.js +++ b/build/index.js @@ -27,7 +27,7 @@ require("./Spin/Spin"); require("./Card/Card"); require("./Table/Table"); require("./Textarea/Textarea"); -require("./Option/Option"); +require("./SelectOption/SelectOption"); require("./Select/Select"); require("./Divider/Divider"); require("./Row/Row"); diff --git a/dist/ng-antd.js b/dist/ng-antd.js index db5a854..513584b 100644 --- a/dist/ng-antd.js +++ b/dist/ng-antd.js @@ -137,7 +137,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Emp /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -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?"); +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?"); /***/ }), @@ -159,7 +159,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _For /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -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 `${(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 );\n },\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Icon/Icon.js?"); +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: ``,\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?"); /***/ }), @@ -192,7 +192,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Ima /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -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 ``,\n `\n \n {{addonBefore}}\n \n {{addonAfter}}\n \n `,\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?"); +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 ``,\n `\n \n {{addonBefore}}\n \n {{addonAfter}}\n \n `,\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?"); /***/ }), @@ -273,17 +273,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Mod /***/ }), -/***/ "./build/Option/Option.js": -/*!********************************!*\ - !*** ./build/Option/Option.js ***! - \********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -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?"); - -/***/ }), - /***/ "./build/Pagination/Pagination.js": /*!****************************************!*\ !*** ./build/Pagination/Pagination.js ***! @@ -291,7 +280,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Opt /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -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?"); +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?"); /***/ }), @@ -357,7 +346,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Row /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -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(`
    \n
      \n
    • {{option.label}}
    • \n
    \n
    `)($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?"); +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(`
    \n
    \n
    {{option.label}}
    \n
    \n
    `)($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?"); + +/***/ }), + +/***/ "./build/SelectOption/SelectOption.js": +/*!********************************************!*\ + !*** ./build/SelectOption/SelectOption.js ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +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?"); /***/ }), @@ -400,7 +400,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Tab /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -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?"); +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?"); /***/ }), @@ -432,7 +432,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Tex \************************/ /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { -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?"); +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?"); /***/ }), @@ -9269,6 +9269,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./node_modules/antd/lib/pagination/style/index.css": +/*!**********************************************************!*\ + !*** ./node_modules/antd/lib/pagination/style/index.css ***! + \**********************************************************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +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?"); + +/***/ }), + /***/ "./node_modules/antd/lib/radio/style/index.css": /*!*****************************************************!*\ !*** ./node_modules/antd/lib/radio/style/index.css ***! @@ -9280,6 +9291,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./node_modules/antd/lib/select/style/index.css": +/*!******************************************************!*\ + !*** ./node_modules/antd/lib/select/style/index.css ***! + \******************************************************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +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?"); + +/***/ }), + /***/ "./node_modules/antd/lib/style/index.css": /*!***********************************************!*\ !*** ./node_modules/antd/lib/style/index.css ***! @@ -9577,17 +9599,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./build/Option/Option.html": -/*!**********************************!*\ - !*** ./build/Option/Option.html ***! - \**********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -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 = \"
  • \";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Option/Option.html?"); - -/***/ }), - /***/ "./build/Pagination/Pagination.html": /*!******************************************!*\ !*** ./build/Pagination/Pagination.html ***! @@ -9595,7 +9606,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -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 = \"
      \\n
    • \\n \\n
    • \\n
    • \\n {{value}}\\n
    • \\n
    • \\n \\n
    • \\n
    • \\n \\n 10 条/页\\n 20 条/页\\n 30 条/页\\n 40 条/页\\n \\n
      \\n 跳至页\\n
      \\n
    • \\n
    \";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Pagination/Pagination.html?"); +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 = \"
      \\n
    • \\n \\n
    • \\n
    • \\n {{value}}\\n
    • \\n
    • \\n \\n
    • \\n
    • \\n \\n 10 条/页\\n 20 条/页\\n 30 条/页\\n 40 条/页\\n \\n
      \\n 跳至页\\n
      \\n
    • \\n
    \";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Pagination/Pagination.html?"); /***/ }), @@ -9661,7 +9672,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -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 = \"
    \\n
    \\n
    \\n
    {{placeholder}}
    \\n
    {{undefined}}
    \\n
    \\n \\n \\n \\n \\n \\n \\n \\n
    \\n \\n
    \";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Select/Select.html?"); +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 = \"
    \\n
    \\n {{state.label}}\\n
    \\n \\n \\n \\n \\n
    \";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Select/Select.html?"); + +/***/ }), + +/***/ "./build/SelectOption/SelectOption.html": +/*!**********************************************!*\ + !*** ./build/SelectOption/SelectOption.html ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +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 = \"
  • \";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/SelectOption/SelectOption.html?"); /***/ }), @@ -9694,7 +9716,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -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 = \"
    \\n \\n
    \\n
    \\n
    \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
    \\n \\n
    \\n \\n
    \\n \\n
    \\n
    \\n
    \\n
    \\n
    \\n \\n
    \\n {{column.title}}\\n
    \\n
    \\n
    \\n \\n \\n \\n \\n \\n
    暂无数据
    \\n
    \\n
    \\n
    \\n
    \\n
    \";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Table/Table.html?"); +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 = \"
    \\n \\n
    \\n
    \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
    \\n \\n
    \\n \\n
    \\n \\n
    \\n
    \\n
    \\n
    \\n
    \\n {{column.title}}\\n
    \\n {{column.title}}\\n \\n \\n \\n \\n \\n \\n
    \\n
    \\n \\n \\n \\n \\n \\n
    暂无数据
    \\n
    \\n
    \\n
    \\n
    \";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);\n\n//# sourceURL=webpack://ng-antd/./build/Table/Table.html?"); /***/ }), diff --git a/example/form.html b/example/form.html index 83c4127..fabcb1c 100644 --- a/example/form.html +++ b/example/form.html @@ -14,12 +14,19 @@
    - + + + + AAA + BBB + + Submit + Reset @@ -39,9 +46,15 @@ angular .module("esNgAntd") .controller("mainCtrl", function ($scope) { + $scope.form = null; + $scope.onFinish = function (values) { console.log(values) }; + + $scope.onReset = function() { + $scope.form.resetFields(); + } }); diff --git a/example/pagination.html b/example/pagination.html index 058cafd..7fe6fe3 100644 --- a/example/pagination.html +++ b/example/pagination.html @@ -4,10 +4,6 @@ - diff --git a/example/select.html b/example/select.html index c4c15e6..2d7187b 100644 --- a/example/select.html +++ b/example/select.html @@ -3,17 +3,12 @@ -
    - AAA - BBB + {{value}}
    @@ -23,6 +18,7 @@ angular .module("esNgAntd") .controller("mainCtrl", function ($scope) { + $scope.options = ["AAA", "BBB"] $scope.handleChange = function(value) { console.log("mainCtrl:value", value) } diff --git a/example/table.html b/example/table.html index 6bac7cb..0cd7fb5 100644 --- a/example/table.html +++ b/example/table.html @@ -9,7 +9,7 @@
    - +
    @@ -29,6 +29,7 @@ { title: "航线", key: "age", + sorter: true, }, { title: "状态", @@ -67,6 +68,10 @@ }), }; + $scope.handleChange = (sorter) => { + console.log(sorter); + }; + $scope.handleClick = (key) => { $scope.dataSource[key].status = $scope.dataSource[key].status ? 0 : 1; $scope.dataSource.splice(key, 1); diff --git a/package.json b/package.json index 6ee284a..5b1675b 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@ant-design/icons-svg": "^4.2.1", "antd": "^4.18.2", - "beanboom": "0.8.4", + "beanboom": "0.8.5", "css-loader": "^6.5.1", "html-loader": "^3.0.1", "style-loader": "^3.3.1", diff --git a/src/Form/Form.js b/src/Form/Form.js index 4ab47ff..c9b0c7b 100644 --- a/src/Form/Form.js +++ b/src/Form/Form.js @@ -4,18 +4,25 @@ import style from "antd/lib/form/style/index.css"; class Form { useModules = ["esNgAntd"]; + template = template; + props = { name: String, labelCol: Object, wrapperCol: Object, onFinish: Function, + form: Object, + }; + + state = { + formItems: [] }; - state = {}; - template = template; constructor() { esNgAntd.createStyle("ant-form", style); + this.form = $scope; + if (this.props.name) { let inputs = $element[0].querySelectorAll("input"); for (let i = 0; i < inputs.length; i++) { @@ -25,20 +32,30 @@ class Form { } } + resetFields() { + this.state.formItems.forEach(function (item) { + item.value = null; + }) + } + handleSubmit() { let values = {}; - let inputs = $element[0].querySelectorAll("input"); - for (let i = 0; i < inputs.length; i++) { - const element = inputs[i]; - const value = element.value === "" ? null : element.value; - if (element.id) { - if (element.id.split("_").length > 1) { - values[element.id.split("_")[1]] = value; - } else { - values[element.id] = value; - } - } - } + this.state.formItems.forEach(function (item) { + let name = item.esFormItem && item.esFormItem.name; + let value = item.value || item.state.value || null; + values[name] = value; + }) + // for (let i = 0; i < inputs.length; i++) { + // const element = inputs[i]; + // const value = element.value === "" ? null : element.value; + // if (element.id) { + // if (element.id.split("_").length > 1) { + // values[element.id.split("_")[1]] = value; + // } else { + // values[element.id] = value; + // } + // } + // } this.props.onFinish({ values: values, }); diff --git a/src/Icon/Icon.js b/src/Icon/Icon.js index 42d4ab8..86d3c9f 100644 --- a/src/Icon/Icon.js +++ b/src/Icon/Icon.js @@ -2,19 +2,25 @@ import * as iconsSvg from "@ant-design/icons-svg"; import { renderIconDefinitionToSVGElement } from "@ant-design/icons-svg/es/helpers"; class Icon { + useModules = ["$compile"]; + + template = `` + props = { type: String, }; constructor() { - $element.replaceWith( - renderIconDefinitionToSVGElement(iconsSvg[this.props.type], { + let template = renderIconDefinitionToSVGElement( + iconsSvg[$scope.type], + { extraSVGAttrs: { width: "1em", height: "1em", fill: "currentColor", }, - }) - ); + } + ) + $element.append(template); } } diff --git a/src/Input/Input.js b/src/Input/Input.js index 4275c7a..931ac7d 100644 --- a/src/Input/Input.js +++ b/src/Input/Input.js @@ -18,10 +18,12 @@ class Input { inputEventTarget: null, } - constructor(esFormItem) { + constructor(esFormItem, esForm) { esNgAntd.createStyle("ant-input", style); + this.esForm = esForm.getContext(); this.esFormItem = esFormItem.getContext(); this.props.style = $attrs.style; + this.esForm.state.formItems.push($scope); $element.replaceWith($compile(this.getTemplate())($scope)); } diff --git a/src/Option/Option.html b/src/Option/Option.html deleted file mode 100644 index 2cb95dd..0000000 --- a/src/Option/Option.html +++ /dev/null @@ -1 +0,0 @@ -
  • {children}
  • diff --git a/src/Option/Option.js b/src/Option/Option.js deleted file mode 100644 index 6cbc1e1..0000000 --- a/src/Option/Option.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 选项 - */ -import template from "./Option.html"; - -class Option { - props = { value: String }; - - state = { - label: null, - }; - - template = template; - - constructor(esSelect) { - this.esSelect = esSelect.getContext(); - this.esSelect.addOption({ - value: this.props.value, - label: $element.text(), - }); - } -} diff --git a/src/Pagination/Pagination.html b/src/Pagination/Pagination.html index f1b3fd2..ce500b2 100644 --- a/src/Pagination/Pagination.html +++ b/src/Pagination/Pagination.html @@ -1,22 +1,28 @@
      -
    • - +
    • +
    • -
    • - {value} -
    • -
    • - + {state.pageNumList.map(function (value) { + return
    • + {value} +
    • + })} +
    • +
    • - + {showSizeChanger === 'true' && 10 条/页 20 条/页 30 条/页 40 条/页 - -
      - 跳至页 -
      +
      } + {showQuickJumper === 'true' &&
      + 跳至页 +
      }
    diff --git a/src/Pagination/Pagination.js b/src/Pagination/Pagination.js index 5ba745b..284fb9c 100644 --- a/src/Pagination/Pagination.js +++ b/src/Pagination/Pagination.js @@ -1,7 +1,10 @@ import template from "./Pagination.html"; +import style from "antd/lib/pagination/style/index.css"; class Pagination { + useModules = ["esNgAntd"]; + template = template; props = { @@ -25,6 +28,7 @@ class Pagination { }; constructor() { + esNgAntd.createStyle("ant-pagination", style); this.state.total = Number(this.props.total || 0); this.state.current = Number(this.props.current || this.props.defaultCurrent || 1); this.state.pageSize = this.props.pageSize || this.props.defaultPageSize || 10; diff --git a/src/Select/Select.html b/src/Select/Select.html index 967e9da..18ab317 100644 --- a/src/Select/Select.html +++ b/src/Select/Select.html @@ -1,29 +1,9 @@ -
    -
    -
    -
    {placeholder}
    -
    {state.label}
    -
    - - - - - - - +
    +
    + {state.label}
    - + + + +
    diff --git a/src/Select/Select.js b/src/Select/Select.js index 3218164..5c7ab2e 100644 --- a/src/Select/Select.js +++ b/src/Select/Select.js @@ -1,6 +1,11 @@ import template from "./Select.html"; +import style from "antd/lib/select/style/index.css"; + class Select { + + useModules = ["$compile", "$timeout", "esNgAntd"]; + props = { value: String, placeholder: String, @@ -19,13 +24,17 @@ class Select { template = template; - useModules = ["$compile", "$timeout"]; - - constructor() { + constructor(esForm, esFormItem) { + esNgAntd.createStyle("ant-select", style); + this.esForm = esForm.getContext(); + this.esFormItem = esFormItem.getContext(); + this.esForm.state.formItems.push($scope); let option = this.state.childrens.find(function (option) { return option.value === this.props.value; }); - this.state.label = option.label; + if (option) { + this.state.label = option.label; + } } addOption(option) { @@ -77,18 +86,22 @@ class Select { event.stopPropagation(); const { height, width } = $element[0].getBoundingClientRect(); const { top, left } = this.getOffset($element[0]); + + // 处理标签 + this.state.childrens.forEach(function (item) { + item.label = item.element.text(); + }) + let div = document.createElement("div"); div.style.position = "absolute"; div.style.left = 0; div.style.top = 0; div.style.width = "100%"; div.appendChild( - $compile(`
    -
      -
    • {{option.label}}
    • -
    + $compile(`
    +
    +
    {{option.label}}
    +
    `)($scope)[0] ); if (this.state.popup === null) { diff --git a/src/SelectOption/SelectOption.html b/src/SelectOption/SelectOption.html new file mode 100644 index 0000000..2cb95dd --- /dev/null +++ b/src/SelectOption/SelectOption.html @@ -0,0 +1 @@ +
  • {children}
  • diff --git a/src/SelectOption/SelectOption.js b/src/SelectOption/SelectOption.js new file mode 100644 index 0000000..6eb438d --- /dev/null +++ b/src/SelectOption/SelectOption.js @@ -0,0 +1,23 @@ +/** + * 选项 + */ +import template from "./SelectOption.html"; + +class SelectOption { + template = template; + + props = { value: String }; + + state = { + label: null, + }; + + constructor(esSelect) { + this.esSelect = esSelect.getContext(); + this.esSelect.addOption({ + value: this.props.value, + label: null, + element: $element, + }); + } +} diff --git a/src/Table/Table.html b/src/Table/Table.html index 7baf8f4..1f3a980 100644 --- a/src/Table/Table.html +++ b/src/Table/Table.html @@ -2,55 +2,58 @@
    -
    - - - - {rowSelection &&} - {columns.map(function (column, key) { - return + + + {state.dataSource.map(function (record, key) { + return + {rowSelection && } + {columns.map(function (column, key) { + return + })} + + })} + {state.dataSource.length === 0 && + + } + +
    - -
    - -
    - -
    -
    -
    -
    -
    - -
    - {column.title} + + + + {rowSelection && - })} - - - - {state.dataSource.map(function (record, key) { - return - {rowSelection && } - {columns.map(function (column, key) { - return - })} - + + + } + {columns.map(function (column, key) { + return })} - {state.dataSource.length === 0 && - - } - -
    + +
    + +
    +
    -
    - - - - - -
    + {!column.sorter && {column.title}} + {column.sorter &&
    + {column.title} + + + + + + +
    } +
    暂无数据
    -
    +
    + + + + + +
    暂无数据
    diff --git a/src/Table/Table.js b/src/Table/Table.js index 1464157..2fce78b 100644 --- a/src/Table/Table.js +++ b/src/Table/Table.js @@ -10,6 +10,7 @@ class Table { rowSelection: Object, rowKey: String, loading: Number, + onChange: Function, }; state = { @@ -18,6 +19,11 @@ class Table { selectedrecords: [], isSelectAll: false, rowKey: this.props.rowKey || "id", + sortDirections: ["ascend", "descend"], + sorter: { + field: null, + order: null, + }, }; template = template; @@ -32,12 +38,19 @@ class Table { row.checked = false; row.disabled = false; } - if (this.props.rowSelection && typeof this.props.rowSelection.getCheckboxProps === "function") { - let extraAttr = this.props.rowSelection.getCheckboxProps(record); + if ( + this.props.rowSelection && + typeof this.props.rowSelection.getCheckboxProps === + "function" + ) { + let extraAttr = + this.props.rowSelection.getCheckboxProps(record); row = Object.assign(row, extraAttr); } this.props.columns.forEach((column) => { - row[column.key] = column.render ? column.render(record[column.key], record, index) : record[column.key]; + row[column.key] = column.render + ? column.render(record[column.key], record, index) + : record[column.key]; }); // 主键 if (this.props.rowKey !== undefined) { @@ -70,11 +83,16 @@ class Table { } return record; }); - this.props.rowSelection.onChange(this.state.selectedrecordKeys, this.state.selectedrecords); + this.props.rowSelection.onChange( + this.state.selectedrecordKeys, + this.state.selectedrecords + ); } handleSelect(event, index) { - let pos = this.state.selectedrecordKeys.findIndex((value) => value === index); + let pos = this.state.selectedrecordKeys.findIndex( + (value) => value === index + ); if (event.target.checked && pos === -1) { this.state.selectedrecordKeys.push(index); this.state.selectedrecords.push(this.props.dSource[index]); @@ -85,6 +103,24 @@ class Table { if (this.state.selectedrecordKeys.length === 0) { this.state.isSelectAll = false; } - this.props.rowSelection.onChange(this.state.selectedrecordKeys, this.state.selectedrecords); + this.props.rowSelection.onChange( + this.state.selectedrecordKeys, + this.state.selectedrecords + ); + } + + handleSorter(key) { + this.state.sorter.field = key; + if (this.state.sorter.order === null) { + this.state.sorter.order = "ascend"; + } else if (this.state.sorter.order === "ascend") { + this.state.sorter.order = "descend" + } else if (this.state.sorter.order === "descend") { + this.state.sorter.order = null + this.state.sorter.field = null; + } + this.props.onChange({ + sorter: this.state.sorter, + }); } } diff --git a/yarn.lock b/yarn.lock index 69d98b0..e99e2bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1320,10 +1320,10 @@ babel-plugin-polyfill-regenerator@^0.2.3: dependencies: "@babel/helper-define-polyfill-provider" "^0.2.4" -beanboom@0.8.4: - version "0.8.4" - resolved "https://registry.npmmirror.com/beanboom/download/beanboom-0.8.4.tgz#7d4f424316f6b774986e2e3dcfec5e1685e2ca71" - integrity sha512-t3fd/fBhx1tu+s5HnLmXIp7WACgE+GL17q0YUfOrnLFXzXWxMQ7bDcSud+ocxFwBVFY94w461VkznNqI8YihtQ== +beanboom@0.8.5: + version "0.8.5" + resolved "https://registry.npmmirror.com/beanboom/download/beanboom-0.8.5.tgz#f661201a4ab1f082e485bae35a74395222407783" + integrity sha512-hVP/QBRpUGHQxqpAAZHREN64LIfhbsIH1KWTItGNkIcT6u/rGrtqqv/m3xUDV7pxOV6UTU5vVaYgkoit38KfGA== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.13.0" -- libgit2 0.21.2