Selaa lähdekoodia

fix:未登录头像hover判断

zhengyingya 5 vuotta sitten
vanhempi
commit
bb0340789f

+ 4
- 2
lib/components/ContentItem/AvatarHoverCard.js Näytä tiedosto

@@ -53,8 +53,10 @@ var AvatarHoverCard = function (_Component) {
53 53
   _createClass(AvatarHoverCard, [{
54 54
     key: "componentDidMount",
55 55
     value: function componentDidMount() {
56
+      var isLogin = this.props.currentUser.user_id > 0;
56 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,7 +136,7 @@ var AvatarHoverCard = function (_Component) {
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 140
           _row2.default,
139 141
           { type: "flex", className: "rowBtn" },
140 142
           followed ? _react2.default.createElement(

+ 1
- 1
lib/components/ContentItem/AvatarHoverCard.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 2
- 2
lib/components/ContentItem/index.css Näytä tiedosto

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

+ 1
- 1
lib/components/ContentItem/index.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
lib/components/Editor/Upload.css Näytä tiedosto

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

+ 2
- 2
lib/components/Editor/index.js Näytä tiedosto

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

+ 1
- 1
lib/components/Editor/index.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 4
- 4
lib/version.json Näytä tiedosto

@@ -1,8 +1,8 @@
1 1
 {
2 2
     "name":       "comment",
3
-    "buildDate":  1563502412201,
3
+    "buildDate":  1563590515482,
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 Näytä tiedosto

@@ -12,8 +12,10 @@ class AvatarHoverCard extends Component {
12 12
   }
13 13
 
14 14
   componentDidMount() {
15
+    const isLogin = this.props.currentUser.user_id > 0;
15 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,7 +73,7 @@ class AvatarHoverCard extends Component {
71 73
             </div>
72 74
           </Col>
73 75
         </Row>
74
-        {currentUser.user_id !== user_id && (
76
+        {currentUser.user_id > 0 && currentUser.user_id !== user_id && (
75 77
           <Row type="flex" className="rowBtn">
76 78
             {followed ? (
77 79
               <div

+ 2
- 2
src/components/Editor/index.js Näytä tiedosto

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