Browse Source

import components on demand

hk 5 years ago
parent
commit
3ed3dce184

+ 1
- 1
.babelrc View File

4
     "transform-object-rest-spread",
4
     "transform-object-rest-spread",
5
     [
5
     [
6
       "import",
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 View File

13
 
13
 
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; }; }();
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
 var _react = require("react");
18
 var _react = require("react");
19
 
19
 

+ 1
- 1
lib/components/CommentBox/index.js View File

10
 
10
 
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; }; }();
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
 var _react = require("react");
15
 var _react = require("react");
16
 
16
 

+ 2
- 2
lib/components/CommentList/index.js View File

14
 
14
 
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; }; }();
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
 var _react = require("react");
21
 var _react = require("react");
22
 
22
 

+ 2
- 2
lib/components/ContentItem/AvatarHoverCard.js View File

14
 
14
 
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; }; }();
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
 var _react = require("react");
21
 var _react = require("react");
22
 
22
 

+ 1
- 1
lib/components/ContentItem/index.css View File

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

+ 4
- 4
lib/components/ContentItem/index.js View File

24
 
24
 
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; }; }();
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
 var _react = require("react");
35
 var _react = require("react");
36
 
36
 

+ 2
- 2
lib/components/EditComment/EditComment.js View File

14
 
14
 
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; }; }();
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
 var _react = require("react");
21
 var _react = require("react");
22
 
22
 

+ 1
- 1
lib/components/Editor/Emoji.js View File

10
 
10
 
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; }; }();
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
 var _react = require("react");
15
 var _react = require("react");
16
 
16
 

+ 1
- 1
lib/components/Editor/Upload.css View File

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

+ 5
- 5
lib/components/Editor/Upload.js View File

26
 
26
 
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; }; }();
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
 var _react = require("react");
39
 var _react = require("react");
40
 
40
 

+ 5
- 5
lib/components/Editor/index.js View File

26
 
26
 
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; }; }();
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
 var _react = require("react");
39
 var _react = require("react");
40
 
40
 

+ 1
- 1
lib/components/Editor/index.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
lib/components/ImagePreviewer/ImagePreviewer.js View File

14
 
14
 
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; }; }();
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
 var _react = require("react");
21
 var _react = require("react");
22
 
22
 

+ 1
- 1
lib/helper.js View File

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

+ 1
- 1
lib/helper.js.map
File diff suppressed because it is too large
View File


+ 3
- 3
lib/version.json View File

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