Browse Source

fix:未登录头像hover判断

zhengyingya 5 years ago
parent
commit
bb0340789f

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

53
   _createClass(AvatarHoverCard, [{
53
   _createClass(AvatarHoverCard, [{
54
     key: "componentDidMount",
54
     key: "componentDidMount",
55
     value: function componentDidMount() {
55
     value: function componentDidMount() {
56
+      var isLogin = this.props.currentUser.user_id > 0;
56
       this.props.getUserInfo({
57
       this.props.getUserInfo({
57
-        id: this.props.user_id
58
+        id: this.props.user_id,
59
+        noCheckFollowed: !isLogin
58
       });
60
       });
59
     }
61
     }
60
   }, {
62
   }, {
134
             )
136
             )
135
           )
137
           )
136
         ),
138
         ),
137
-        currentUser.user_id !== user_id && _react2.default.createElement(
139
+        currentUser.user_id > 0 && currentUser.user_id !== user_id && _react2.default.createElement(
138
           _row2.default,
140
           _row2.default,
139
           { type: "flex", className: "rowBtn" },
141
           { type: "flex", className: "rowBtn" },
140
           followed ? _react2.default.createElement(
142
           followed ? _react2.default.createElement(

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


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

24
   background-size: cover;
24
   background-size: cover;
25
   cursor: pointer;
25
   cursor: pointer;
26
 }
26
 }
27
-.comment-item-name{
27
+.comment-item-name {
28
   font-size: 16px;
28
   font-size: 16px;
29
 }
29
 }
30
 .comment-item-content {
30
 .comment-item-content {
135
   }
135
   }
136
   .comment-item-name {
136
   .comment-item-name {
137
     font-size: 14px;
137
     font-size: 14px;
138
-  } 
138
+  }
139
   .comment-item-content {
139
   .comment-item-content {
140
     font-size: 14px;
140
     font-size: 14px;
141
     margin: 4px 0;
141
     margin: 4px 0;

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


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

14
 }
14
 }
15
 
15
 
16
 .ant-upload-list-item {
16
 .ant-upload-list-item {
17
-  padding: 0!important;
17
+  padding: 0 !important;
18
 }
18
 }
19
 .ant-popover-inner-content {
19
 .ant-popover-inner-content {
20
   position: relative;
20
   position: relative;

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

338
                   trigger: "click",
338
                   trigger: "click",
339
                   placement: emojiPopoverPlacement,
339
                   placement: emojiPopoverPlacement,
340
                   autoAdjustOverflow: false,
340
                   autoAdjustOverflow: false,
341
-                  overlayStyle: { zIndex: 999 },
341
+                  overlayStyle: { zIndex: 9999 },
342
                   content: _react2.default.createElement(
342
                   content: _react2.default.createElement(
343
                     "div",
343
                     "div",
344
                     {
344
                     {
365
                   , placement: uploadPopoverPlacement,
365
                   , placement: uploadPopoverPlacement,
366
                   overlayClassName: uploadOverlayClassName,
366
                   overlayClassName: uploadOverlayClassName,
367
                   autoAdjustOverflow: false,
367
                   autoAdjustOverflow: false,
368
-                  overlayStyle: { zIndex: 999 },
368
+                  overlayStyle: { zIndex: 9999 },
369
                   onVisibleChange: closeUploadWhenBlur ? function (visible) {
369
                   onVisibleChange: closeUploadWhenBlur ? function (visible) {
370
                     _this3.handleShowUpload(visible);
370
                     _this3.handleShowUpload(visible);
371
                   } : null,
371
                   } : null,

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


+ 4
- 4
lib/version.json View File

1
 {
1
 {
2
     "name":       "comment",
2
     "name":       "comment",
3
-    "buildDate":  1563502412201,
3
+    "buildDate":  1563590515482,
4
     "version":    "1.0.4",
4
     "version":    "1.0.4",
5
-    "numCommits": 168,
6
-    "hash":       "778cc0a",
7
-    "dirty":      false
5
+    "numCommits": 169,
6
+    "hash":       "d78b943",
7
+    "dirty":      true
8
 }
8
 }

+ 4
- 2
src/components/ContentItem/AvatarHoverCard.js View File

12
   }
12
   }
13
 
13
 
14
   componentDidMount() {
14
   componentDidMount() {
15
+    const isLogin = this.props.currentUser.user_id > 0;
15
     this.props.getUserInfo({
16
     this.props.getUserInfo({
16
-      id: this.props.user_id
17
+      id: this.props.user_id,
18
+      noCheckFollowed: !isLogin
17
     });
19
     });
18
   }
20
   }
19
 
21
 
71
             </div>
73
             </div>
72
           </Col>
74
           </Col>
73
         </Row>
75
         </Row>
74
-        {currentUser.user_id !== user_id && (
76
+        {currentUser.user_id > 0 && currentUser.user_id !== user_id && (
75
           <Row type="flex" className="rowBtn">
77
           <Row type="flex" className="rowBtn">
76
             {followed ? (
78
             {followed ? (
77
               <div
79
               <div

+ 2
- 2
src/components/Editor/index.js View File

236
                   trigger="click"
236
                   trigger="click"
237
                   placement={emojiPopoverPlacement}
237
                   placement={emojiPopoverPlacement}
238
                   autoAdjustOverflow={false}
238
                   autoAdjustOverflow={false}
239
-                  overlayStyle={{ zIndex: 999 }}
239
+                  overlayStyle={{ zIndex: 9999 }}
240
                   content={
240
                   content={
241
                     <div
241
                     <div
242
                       style={{ width: 240, height: 205 }}
242
                       style={{ width: 240, height: 205 }}
266
                   placement={uploadPopoverPlacement}
266
                   placement={uploadPopoverPlacement}
267
                   overlayClassName={uploadOverlayClassName}
267
                   overlayClassName={uploadOverlayClassName}
268
                   autoAdjustOverflow={false}
268
                   autoAdjustOverflow={false}
269
-                  overlayStyle={{ zIndex: 999 }}
269
+                  overlayStyle={{ zIndex: 9999 }}
270
                   onVisibleChange={
270
                   onVisibleChange={
271
                     closeUploadWhenBlur
271
                     closeUploadWhenBlur
272
                       ? visible => {
272
                       ? visible => {