bhd-components 0.9.22 → 0.9.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -400,16 +400,29 @@ const CustomerService = (props)=>{
400
400
  getHistoryMessage(pageNum, 1);
401
401
  }
402
402
  }
403
+ // //复制代码功能
404
+ // let chat_content = document.getElementById('chat_content');
405
+ // if(chat_content){
406
+ // chat_content = document.getElementById('chat_content');
407
+ // delegate(chat_content, 'click', `.${styles.copyCode}`, (event:any, target:any) => {
408
+ // findCopyContent(event);
409
+ // });
410
+ // }
411
+ }, [
412
+ roomId
413
+ ]);
414
+ useEffect(()=>{
403
415
  //复制代码功能
404
- let chat_content = document.getElementById('chat_content');
416
+ let chat_content = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
405
417
  if (chat_content) {
406
- chat_content = document.getElementById('chat_content');
418
+ chat_content = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
407
419
  delegate(chat_content, 'click', `.${styles.copyCode}`, (event, target)=>{
408
420
  findCopyContent(event);
409
421
  });
410
422
  }
411
423
  }, [
412
- roomId
424
+ roomId,
425
+ showType
413
426
  ]);
414
427
  //进入页面,发送打招呼信息
415
428
  useEffect(()=>{
@@ -438,7 +438,8 @@ class ViewImage extends React.Component {
438
438
  });
439
439
  _define_property(this, "imgErr", ()=>{
440
440
  this.setState({
441
- imgError: true
441
+ imgError: true,
442
+ actionCloseFlag: 1 //报错时关闭按钮固定右上角
442
443
  }, ()=>{
443
444
  this.moveActionClose();
444
445
  });
@@ -405,16 +405,29 @@ var CustomerService = function(props) {
405
405
  getHistoryMessage(pageNum, 1);
406
406
  }
407
407
  }
408
+ // //复制代码功能
409
+ // let chat_content = document.getElementById('chat_content');
410
+ // if(chat_content){
411
+ // chat_content = document.getElementById('chat_content');
412
+ // delegate(chat_content, 'click', `.${styles.copyCode}`, (event:any, target:any) => {
413
+ // findCopyContent(event);
414
+ // });
415
+ // }
416
+ }, [
417
+ roomId
418
+ ]);
419
+ useEffect(function() {
408
420
  //复制代码功能
409
- var chat_content = document.getElementById("chat_content");
421
+ var chat_content = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
410
422
  if (chat_content) {
411
- chat_content = document.getElementById("chat_content");
423
+ chat_content = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
412
424
  delegate(chat_content, "click", ".".concat(styles.copyCode), function(event, target) {
413
425
  findCopyContent(event);
414
426
  });
415
427
  }
416
428
  }, [
417
- roomId
429
+ roomId,
430
+ showType
418
431
  ]);
419
432
  //进入页面,发送打招呼信息
420
433
  useEffect(function() {
@@ -340,7 +340,8 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
340
340
  });
341
341
  _define_property(_assert_this_initialized(_this), "imgErr", function() {
342
342
  _this.setState({
343
- imgError: true
343
+ imgError: true,
344
+ actionCloseFlag: 1 //报错时关闭按钮固定右上角
344
345
  }, function() {
345
346
  _this.moveActionClose();
346
347
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.9.22",
3
+ "version": "0.9.23",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {