浏览代码

import components on demand

hk 5 年前
父节点
当前提交
3ed3dce184

+ 1
- 1
.babelrc 查看文件

@@ -4,7 +4,7 @@
4 4
     "transform-object-rest-spread",
5 5
     [
6 6
       "import",
7
-      { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }
7
+      { "libraryName": "antd", "libraryDirectory": "es", "style": true }
8 8
     ]
9 9
   ]
10 10
 }

+ 1
- 1
lib/App.js 查看文件

@@ -13,7 +13,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
13 13
 
14 14
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
15 15
 
16
-require("antd/es/message/style/css");
16
+require("antd/es/message/style");
17 17
 
18 18
 var _react = require("react");
19 19
 

+ 1
- 1
lib/components/CommentBox/index.js 查看文件

@@ -10,7 +10,7 @@ var _icon2 = _interopRequireDefault(_icon);
10 10
 
11 11
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
12 12
 
13
-require("antd/es/icon/style/css");
13
+require("antd/es/icon/style");
14 14
 
15 15
 var _react = require("react");
16 16
 

+ 2
- 2
lib/components/CommentList/index.js 查看文件

@@ -14,9 +14,9 @@ var _pagination2 = _interopRequireDefault(_pagination);
14 14
 
15 15
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
16 16
 
17
-require("antd/es/spin/style/css");
17
+require("antd/es/spin/style");
18 18
 
19
-require("antd/es/pagination/style/css");
19
+require("antd/es/pagination/style");
20 20
 
21 21
 var _react = require("react");
22 22
 

+ 2
- 2
lib/components/ContentItem/AvatarHoverCard.js 查看文件

@@ -14,9 +14,9 @@ var _row2 = _interopRequireDefault(_row);
14 14
 
15 15
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
16 16
 
17
-require("antd/es/col/style/css");
17
+require("antd/es/col/style");
18 18
 
19
-require("antd/es/row/style/css");
19
+require("antd/es/row/style");
20 20
 
21 21
 var _react = require("react");
22 22
 

+ 1
- 1
lib/components/ContentItem/index.css 查看文件

@@ -89,7 +89,7 @@
89 89
 .comment-item-reply {
90 90
   margin-left: 20px;
91 91
   cursor: pointer;
92
-  color: #3C9CFE;
92
+  color: #3c9cfe;
93 93
 }
94 94
 .comment-item-bottom-left {
95 95
   color: #71c135;

+ 4
- 4
lib/components/ContentItem/index.js 查看文件

@@ -24,13 +24,13 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
24 24
 
25 25
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
26 26
 
27
-require("antd/es/popconfirm/style/css");
27
+require("antd/es/popconfirm/style");
28 28
 
29
-require("antd/es/icon/style/css");
29
+require("antd/es/icon/style");
30 30
 
31
-require("antd/es/tooltip/style/css");
31
+require("antd/es/tooltip/style");
32 32
 
33
-require("antd/es/popover/style/css");
33
+require("antd/es/popover/style");
34 34
 
35 35
 var _react = require("react");
36 36
 

+ 2
- 2
lib/components/EditComment/EditComment.js 查看文件

@@ -14,9 +14,9 @@ var _icon2 = _interopRequireDefault(_icon);
14 14
 
15 15
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
16 16
 
17
-require("antd/es/modal/style/css");
17
+require("antd/es/modal/style");
18 18
 
19
-require("antd/es/icon/style/css");
19
+require("antd/es/icon/style");
20 20
 
21 21
 var _react = require("react");
22 22
 

+ 1
- 1
lib/components/Editor/Emoji.js 查看文件

@@ -10,7 +10,7 @@ var _carousel2 = _interopRequireDefault(_carousel);
10 10
 
11 11
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
12 12
 
13
-require("antd/es/carousel/style/css");
13
+require("antd/es/carousel/style");
14 14
 
15 15
 var _react = require("react");
16 16
 

+ 1
- 1
lib/components/Editor/Upload.css 查看文件

@@ -27,7 +27,7 @@
27 27
   justify-content: center;
28 28
 }
29 29
 .ant-upload-list-picture-card {
30
-  float: none!important;
30
+  float: none !important;
31 31
 }
32 32
 .upload-close-icon {
33 33
   position: absolute;

+ 5
- 5
lib/components/Editor/Upload.js 查看文件

@@ -26,15 +26,15 @@ var _message3 = _interopRequireDefault(_message2);
26 26
 
27 27
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
28 28
 
29
-require("antd/es/modal/style/css");
29
+require("antd/es/modal/style");
30 30
 
31
-require("antd/es/spin/style/css");
31
+require("antd/es/spin/style");
32 32
 
33
-require("antd/es/upload/style/css");
33
+require("antd/es/upload/style");
34 34
 
35
-require("antd/es/icon/style/css");
35
+require("antd/es/icon/style");
36 36
 
37
-require("antd/es/message/style/css");
37
+require("antd/es/message/style");
38 38
 
39 39
 var _react = require("react");
40 40
 

+ 5
- 5
lib/components/Editor/index.js 查看文件

@@ -26,15 +26,15 @@ var _input2 = _interopRequireDefault(_input);
26 26
 
27 27
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
28 28
 
29
-require("antd/es/button/style/css");
29
+require("antd/es/button/style");
30 30
 
31
-require("antd/es/popover/style/css");
31
+require("antd/es/popover/style");
32 32
 
33
-require("antd/es/icon/style/css");
33
+require("antd/es/icon/style");
34 34
 
35
-require("antd/es/message/style/css");
35
+require("antd/es/message/style");
36 36
 
37
-require("antd/es/input/style/css");
37
+require("antd/es/input/style");
38 38
 
39 39
 var _react = require("react");
40 40
 

+ 1
- 1
lib/components/Editor/index.js.map
文件差异内容过多而无法显示
查看文件


+ 2
- 2
lib/components/ImagePreviewer/ImagePreviewer.js 查看文件

@@ -14,9 +14,9 @@ var _icon2 = _interopRequireDefault(_icon);
14 14
 
15 15
 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
16 16
 
17
-require("antd/es/spin/style/css");
17
+require("antd/es/spin/style");
18 18
 
19
-require("antd/es/icon/style/css");
19
+require("antd/es/icon/style");
20 20
 
21 21
 var _react = require("react");
22 22
 

+ 1
- 1
lib/helper.js 查看文件

@@ -75,7 +75,7 @@ function renderContent(content, onClick) {
75 75
     }
76 76
     // 如果不存在对应的表情, 则返回原文
77 77
     // const emoji = emojiObejct[src];
78
-    if(sessionStorage.getItem("emojiMap") && JSON.parse(sessionStorage.getItem("emojiMap"))){
78
+    if (sessionStorage.getItem("emojiMap") && JSON.parse(sessionStorage.getItem("emojiMap"))) {
79 79
       var emoji = JSON.parse(sessionStorage.getItem("emojiMap"))[src];
80 80
       if (emoji) {
81 81
         return "<img class=\"comment-emoji\" src=\"" + emoji + "\" alt=\"" + emoji.title + "\" style=\"width:28px\"/>";

+ 1
- 1
lib/helper.js.map
文件差异内容过多而无法显示
查看文件


+ 3
- 3
lib/version.json 查看文件

@@ -1,8 +1,8 @@
1 1
 {
2 2
     "name":       "comment",
3
-    "buildDate":  1565745352505,
3
+    "buildDate":  1573731377000,
4 4
     "version":    "1.0.4",
5
-    "numCommits": 184,
6
-    "hash":       "865439d",
5
+    "numCommits": 192,
6
+    "hash":       "e027c33",
7 7
     "dirty":      true
8 8
 }