Commit a4efb55ffc8ab450cb9452f35fede881ea6a2b3c
1 parent
cc35f3f0
feat(table): 优化组件
Showing
4 changed files
with
2 additions
and
4 deletions
Show diff stats
build/Slot/Slot.js
... | ... | @@ -17,7 +17,6 @@ angular.module("esNgAntd").directive("antdSlot", function ($compile) { |
17 | 17 | content: (newValue) => { |
18 | 18 | if (newValue !== undefined) { |
19 | 19 | if (/<[^>]+>/.test(newValue)) { |
20 | - console.log(newValue); | |
21 | 20 | $element.replaceWith( |
22 | 21 | $compile(newValue)( |
23 | 22 | $scope.context ? $scope.context : $scope | ... | ... |
dist/ng-antd.js
... | ... | @@ -367,7 +367,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Sel |
367 | 367 | \****************************/ |
368 | 368 | /***/ (() => { |
369 | 369 | |
370 | -eval("angular.module(\"esNgAntd\").directive(\"antdSlot\", function ($compile) {\n return {\n controllerAs: \"antdSlot\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n content: \"@\",\n context: \"=\",\n },\n controller: function ($scope, $element, $attrs) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.watch = {\n content: (newValue) => {\n if (newValue !== undefined) {\n if (/<[^>]+>/.test(newValue)) {\n console.log(newValue);\n $element.replaceWith(\n $compile(newValue)(\n $scope.context ? $scope.context : $scope\n )\n );\n } else {\n $element.text(newValue);\n }\n }\n },\n };\n\n for (const key in $scope.watch) {\n $scope.$watch(key, $scope.watch[key], true);\n }\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {},\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Slot/Slot.js?"); | |
370 | +eval("angular.module(\"esNgAntd\").directive(\"antdSlot\", function ($compile) {\n return {\n controllerAs: \"antdSlot\",\n restrict: \"E\",\n transclude: true,\n replace: true,\n scope: {\n content: \"@\",\n context: \"=\",\n },\n controller: function ($scope, $element, $attrs) {\n this.getContext = function () {\n return $scope;\n };\n\n $scope.watch = {\n content: (newValue) => {\n if (newValue !== undefined) {\n if (/<[^>]+>/.test(newValue)) {\n $element.replaceWith(\n $compile(newValue)(\n $scope.context ? $scope.context : $scope\n )\n );\n } else {\n $element.text(newValue);\n }\n }\n },\n };\n\n for (const key in $scope.watch) {\n $scope.$watch(key, $scope.watch[key], true);\n }\n },\n link: function ($scope, $element, $attrs, $controllers, $transclude) {},\n };\n});\n\n\n//# sourceURL=webpack://ng-antd/./build/Slot/Slot.js?"); | |
371 | 371 | |
372 | 372 | /***/ }), |
373 | 373 | ... | ... |
example/table/inner-scope.html renamed to example/table/render-scope.html
src/Slot/Slot.js