bhd-components 0.9.19 → 0.9.21

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.
@@ -1420,7 +1420,7 @@ var TitleBar = function(props) {
1420
1420
  };
1421
1421
  var TitleBar$1 = TitleBar;
1422
1422
 
1423
- var modules_63b47c51$5 = {"AppViewImage":"index_module_AppViewImage__3145c517","viewImgBody":"index_module_viewImgBody__3145c517","viewImgContent":"index_module_viewImgContent__3145c517","viewImgAction":"index_module_viewImgAction__3145c517","actionTop":"index_module_actionTop__3145c517","viewImgBody_load":"index_module_viewImgBody_load__3145c517","viewImgBody_pic":"index_module_viewImgBody_pic__3145c517","viewImgActionClose":"index_module_viewImgActionClose__3145c517","viewImgBody_pre":"index_module_viewImgBody_pre__3145c517","viewImgBody_next":"index_module_viewImgBody_next__3145c517","viewImgBodyScale":"index_module_viewImgBodyScale__3145c517","viewImgBodyScale_minu":"index_module_viewImgBodyScale_minu__3145c517","viewImgBodyScale_add":"index_module_viewImgBodyScale_add__3145c517","viewImgBodyScale_value":"index_module_viewImgBodyScale_value__3145c517","viewImgInfo":"index_module_viewImgInfo__3145c517"};
1423
+ var modules_63b47c51$5 = {"AppViewImage":"index_module_AppViewImage__efd7e21c","viewImgBody":"index_module_viewImgBody__efd7e21c","viewImgContent":"index_module_viewImgContent__efd7e21c","viewImgAction":"index_module_viewImgAction__efd7e21c","actionTop":"index_module_actionTop__efd7e21c","viewImgBody_load":"index_module_viewImgBody_load__efd7e21c","viewImgBody_pic":"index_module_viewImgBody_pic__efd7e21c","viewImgActionClose":"index_module_viewImgActionClose__efd7e21c","viewImgBody_pre":"index_module_viewImgBody_pre__efd7e21c","viewImgBody_next":"index_module_viewImgBody_next__efd7e21c","viewImgBodyScale":"index_module_viewImgBodyScale__efd7e21c","viewImgBodyScale_minu":"index_module_viewImgBodyScale_minu__efd7e21c","viewImgBodyScale_add":"index_module_viewImgBodyScale_add__efd7e21c","viewImgBodyScale_value":"index_module_viewImgBodyScale_value__efd7e21c","viewImgInfo":"index_module_viewImgInfo__efd7e21c"};
1424
1424
 
1425
1425
  //获取css样式
1426
1426
  var getStyle = function getStyle(dom, key) {
@@ -1691,15 +1691,24 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
1691
1691
  });
1692
1692
  _define_property(_assert_this_initialized(_this), "moveActionClose", function() {
1693
1693
  setTimeout(function() {
1694
- var rect = document.getElementById("viewImgBody_pic").getBoundingClientRect();
1695
- if (rect.top >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) - 40 && rect.right <= (window.innerWidth || document.documentElement.clientWidth) - 52) {
1696
- _this.setState({
1697
- actionCloseFlag: 0
1698
- });
1699
- } else {
1700
- _this.setState({
1701
- actionCloseFlag: 1
1702
- });
1694
+ var pic = document.getElementById("viewImgBody_pic");
1695
+ if (pic) {
1696
+ var rect = pic.getBoundingClientRect();
1697
+ if (rect.top >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) - 40 && rect.right <= (window.innerWidth || document.documentElement.clientWidth) - 52) {
1698
+ _this.setState({
1699
+ actionCloseFlag: 0
1700
+ }, function() {
1701
+ var actionCloseDom = document.getElementById("actionClose");
1702
+ if (actionCloseDom) {
1703
+ actionCloseDom.style.top = rect.top + "px";
1704
+ actionCloseDom.style.left = rect.left + rect.width + 12 + "px";
1705
+ }
1706
+ });
1707
+ } else {
1708
+ _this.setState({
1709
+ actionCloseFlag: 1
1710
+ });
1711
+ }
1703
1712
  }
1704
1713
  }, 10);
1705
1714
  });
@@ -1847,11 +1856,15 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
1847
1856
  imgTop: "auto",
1848
1857
  rotateValue: 0,
1849
1858
  scaleValue: 100
1859
+ }, function() {
1860
+ _this.moveActionClose();
1850
1861
  });
1851
1862
  });
1852
1863
  _define_property(_assert_this_initialized(_this), "rotate", function() {
1853
1864
  _this.setState({
1854
1865
  rotateValue: _this.state.rotateValue + 90
1866
+ }, function() {
1867
+ _this.moveActionClose();
1855
1868
  });
1856
1869
  });
1857
1870
  _define_property(_assert_this_initialized(_this), "close", function() {
@@ -1895,6 +1908,10 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
1895
1908
  _this1.setState({
1896
1909
  imgSrc: src,
1897
1910
  loading: false
1911
+ }, function() {
1912
+ setTimeout(function() {
1913
+ _this1.moveActionClose();
1914
+ }, 100);
1898
1915
  });
1899
1916
  return [
1900
1917
  2
@@ -1953,11 +1970,15 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
1953
1970
  _define_property(_assert_this_initialized(_this), "imgLoad", function() {
1954
1971
  _this.setState({
1955
1972
  imgError: false
1973
+ }, function() {
1974
+ _this.moveActionClose();
1956
1975
  });
1957
1976
  });
1958
1977
  _define_property(_assert_this_initialized(_this), "imgErr", function() {
1959
1978
  _this.setState({
1960
1979
  imgError: true
1980
+ }, function() {
1981
+ _this.moveActionClose();
1961
1982
  });
1962
1983
  });
1963
1984
  return _this;
@@ -1980,6 +2001,7 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
1980
2001
  document.oncontextmenu = function() {
1981
2002
  return false;
1982
2003
  };
2004
+ this.moveActionClose();
1983
2005
  }
1984
2006
  },
1985
2007
  {
@@ -2066,33 +2088,57 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
2066
2088
  color: "#FFFFFF"
2067
2089
  },
2068
2090
  children: imgSrc ? "图片加载错误" : "暂无内容"
2069
- }) : /*#__PURE__*/ jsxs("div", {
2070
- onMouseDown: this.moveImg,
2071
- style: {
2072
- transform: "scale(".concat(scaleValue / 100, ",").concat(scaleValue / 100, ")"),
2073
- left: imgLeft == "auto" ? "auto" : imgLeft + "px",
2074
- top: imgTop == "auto" ? "auto" : imgTop + "px"
2075
- },
2076
- className: modules_63b47c51$5.viewImgBody_pic,
2091
+ }) : // <div onMouseDown={this.moveImg}
2092
+ // style={{
2093
+ // transform: `scale(${scaleValue / 100},${
2094
+ // scaleValue / 100
2095
+ // })`,
2096
+ // left: imgLeft == "auto" ? "auto" : imgLeft + "px",
2097
+ // top: imgTop == "auto" ? "auto" : imgTop + "px",
2098
+ // }}
2099
+ // className={styles.viewImgBody_pic}>
2100
+ // <img
2101
+ // id="viewImgBody_pic"
2102
+ // key="img"
2103
+ // src={imgSrc}
2104
+ // alt="图片加载错误"
2105
+ // draggable="false"
2106
+ // style={{transform:`rotate(${rotateValue}deg)`}}
2107
+ // onLoad={this.imgLoad}
2108
+ // onError={this.imgErr}
2109
+ // />
2110
+ // {
2111
+ // this.state.actionCloseFlag===0&&(
2112
+ // <span
2113
+ // id="actionClose"
2114
+ // style={{right:`calc(-40px + (-12px * (1 / ${scaleValue / 100}) ))` ,transform: `scale(calc(1 / ${scaleValue / 100}),calc(1 / ${scaleValue / 100}))`,transformOrigin: `top left`}}
2115
+ // className={styles.viewImgActionClose}
2116
+ // title="关闭"
2117
+ // onClick={this.close}>
2118
+ // <CustomClose />
2119
+ // </span>
2120
+ // )
2121
+ // }
2122
+ // </div>
2123
+ /*#__PURE__*/ jsxs(Fragment, {
2077
2124
  children: [
2078
2125
  /*#__PURE__*/ jsx("img", {
2079
2126
  id: "viewImgBody_pic",
2080
2127
  src: imgSrc,
2081
2128
  alt: "图片加载错误",
2082
2129
  draggable: "false",
2130
+ onMouseDown: this.moveImg,
2083
2131
  style: {
2084
- transform: "rotate(".concat(rotateValue, "deg)")
2132
+ transform: "scale(".concat(scaleValue / 100, ",").concat(scaleValue / 100, ") rotate(").concat(rotateValue, "deg)"),
2133
+ left: imgLeft == "auto" ? "auto" : imgLeft + "px",
2134
+ top: imgTop == "auto" ? "auto" : imgTop + "px"
2085
2135
  },
2136
+ className: modules_63b47c51$5.viewImgBody_pic,
2086
2137
  onLoad: this.imgLoad,
2087
2138
  onError: this.imgErr
2088
2139
  }, "img"),
2089
2140
  this.state.actionCloseFlag === 0 && /*#__PURE__*/ jsx("span", {
2090
2141
  id: "actionClose",
2091
- style: {
2092
- right: "calc(-40px + (-12px * (1 / ".concat(scaleValue / 100, ") ))"),
2093
- transform: "scale(calc(1 / ".concat(scaleValue / 100, "),calc(1 / ").concat(scaleValue / 100, "))"),
2094
- transformOrigin: "top left"
2095
- },
2096
2142
  className: modules_63b47c51$5.viewImgActionClose,
2097
2143
  title: "关闭",
2098
2144
  onClick: this.close,
@@ -2575,7 +2621,7 @@ function BhdAppLayout(props) {
2575
2621
  });
2576
2622
  }
2577
2623
 
2578
- var modules_63b47c51$1 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__cf49a5ea","ChatWindow_Modal":"index_module_ChatWindow_Modal__cf49a5ea","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__cf49a5ea","header_wrap":"index_module_header_wrap__cf49a5ea","top":"index_module_top__cf49a5ea","user":"index_module_user__cf49a5ea","count":"index_module_count__cf49a5ea","operate":"index_module_operate__cf49a5ea","line":"index_module_line__cf49a5ea","popover_main":"index_module_popover_main__cf49a5ea","popover":"index_module_popover__cf49a5ea","header_wrap_newlabo":"index_module_header_wrap_newlabo__cf49a5ea","Drawer_main":"index_module_Drawer_main__cf49a5ea","loading":"index_module_loading__cf49a5ea","message_con":"index_module_message_con__cf49a5ea","left":"index_module_left__cf49a5ea","head_sculpture":"index_module_head_sculpture__cf49a5ea","main_content":"index_module_main_content__cf49a5ea","right":"index_module_right__cf49a5ea","main":"index_module_main__cf49a5ea","main_content_flag":"index_module_main_content_flag__cf49a5ea","operate_modal":"index_module_operate_modal__cf49a5ea","operate_modal_bottom":"index_module_operate_modal_bottom__cf49a5ea","active":"index_module_active__cf49a5ea","stop_generate":"index_module_stop_generate__cf49a5ea","icon":"index_module_icon__cf49a5ea","find_teacher":"index_module_find_teacher__cf49a5ea","stop_findTeacher":"index_module_stop_findTeacher__cf49a5ea","content":"index_module_content__cf49a5ea","content_child":"index_module_content_child__cf49a5ea","find_teacher_con":"index_module_find_teacher_con__cf49a5ea","sign":"index_module_sign__cf49a5ea","ask_question":"index_module_ask_question__cf49a5ea","bottom":"index_module_bottom__cf49a5ea","association_problem":"index_module_association_problem__cf49a5ea","association_problem_flag":"index_module_association_problem_flag__cf49a5ea","related_issues_flag":"index_module_related_issues_flag__cf49a5ea","img_con":"index_module_img_con__cf49a5ea","mask_zoom":"index_module_mask_zoom__cf49a5ea","img_con2":"index_module_img_con2__cf49a5ea","copyCode":"index_module_copyCode__cf49a5ea","time":"index_module_time__cf49a5ea","citation_content":"index_module_citation_content__cf49a5ea","text_exceed":"index_module_text_exceed__cf49a5ea","popover_content":"index_module_popover_content__cf49a5ea","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__cf49a5ea","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__cf49a5ea","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__cf49a5ea","issues_list_teacherList":"index_module_issues_list_teacherList__cf49a5ea","item":"index_module_item__cf49a5ea","issues_list":"index_module_issues_list__cf49a5ea","issues_list_flag":"index_module_issues_list_flag__cf49a5ea","Drawer_buttom":"index_module_Drawer_buttom__cf49a5ea","input_wrap":"index_module_input_wrap__cf49a5ea","input":"index_module_input__cf49a5ea","picture_layout":"index_module_picture_layout__cf49a5ea","icon_close":"index_module_icon_close__cf49a5ea","icon_zoom":"index_module_icon_zoom__cf49a5ea","anticon":"index_module_anticon__cf49a5ea","no_AI":"index_module_no_AI__cf49a5ea","screenshot":"index_module_screenshot__cf49a5ea","disabled":"index_module_disabled__cf49a5ea","content_main":"index_module_content_main__cf49a5ea","content_con":"index_module_content_con__cf49a5ea","delete_quote":"index_module_delete_quote__cf49a5ea","sending":"index_module_sending__cf49a5ea","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__cf49a5ea","main_list":"index_module_main_list__cf49a5ea","chat_content":"index_module_chat_content__cf49a5ea","popover_main_content":"index_module_popover_main_content__cf49a5ea","popover_main_content_name":"index_module_popover_main_content_name__cf49a5ea","teacher_layout":"index_module_teacher_layout__cf49a5ea","delete":"index_module_delete__cf49a5ea","num":"index_module_num__cf49a5ea","shrink":"index_module_shrink__cf49a5ea","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__cf49a5ea","teacher_layout_modal":"index_module_teacher_layout_modal__cf49a5ea","ai":"index_module_ai__cf49a5ea","user_info":"index_module_user_info__cf49a5ea","message":"index_module_message__cf49a5ea","con":"index_module_con__cf49a5ea","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__cf49a5ea","history_list":"index_module_history_list__cf49a5ea","search_layout":"index_module_search_layout__cf49a5ea","mymove":"index_module_mymove__cf49a5ea","title":"index_module_title__cf49a5ea","search_top":"index_module_search_top__cf49a5ea","list_item":"index_module_list_item__cf49a5ea","list_summary":"index_module_list_summary__cf49a5ea","head_img":"index_module_head_img__cf49a5ea","list_desc":"index_module_list_desc__cf49a5ea","name":"index_module_name__cf49a5ea","decs":"index_module_decs__cf49a5ea","open":"index_module_open__cf49a5ea","list_summary_active":"index_module_list_summary_active__cf49a5ea","list_detail":"index_module_list_detail__cf49a5ea","list":"index_module_list__cf49a5ea","list_more":"index_module_list_more__cf49a5ea","no_data":"index_module_no_data__cf49a5ea","history_list_broadside":"index_module_history_list_broadside__cf49a5ea","teacher_list":"index_module_teacher_list__cf49a5ea","screenshot_Modal":"index_module_screenshot_Modal__cf49a5ea","ReactCrop":"index_module_ReactCrop__cf49a5ea","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__cf49a5ea"};
2624
+ var modules_63b47c51$1 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__15161658","ChatWindow_Modal":"index_module_ChatWindow_Modal__15161658","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__15161658","header_wrap":"index_module_header_wrap__15161658","top":"index_module_top__15161658","user":"index_module_user__15161658","count":"index_module_count__15161658","operate":"index_module_operate__15161658","line":"index_module_line__15161658","popover_main":"index_module_popover_main__15161658","popover":"index_module_popover__15161658","header_wrap_newlabo":"index_module_header_wrap_newlabo__15161658","Drawer_main":"index_module_Drawer_main__15161658","loading":"index_module_loading__15161658","message_con":"index_module_message_con__15161658","left":"index_module_left__15161658","head_sculpture":"index_module_head_sculpture__15161658","main_content":"index_module_main_content__15161658","right":"index_module_right__15161658","main":"index_module_main__15161658","main_content_flag":"index_module_main_content_flag__15161658","operate_modal":"index_module_operate_modal__15161658","operate_modal_bottom":"index_module_operate_modal_bottom__15161658","active":"index_module_active__15161658","stop_generate":"index_module_stop_generate__15161658","icon":"index_module_icon__15161658","find_teacher":"index_module_find_teacher__15161658","stop_findTeacher":"index_module_stop_findTeacher__15161658","content":"index_module_content__15161658","content_child":"index_module_content_child__15161658","find_teacher_con":"index_module_find_teacher_con__15161658","sign":"index_module_sign__15161658","ask_question":"index_module_ask_question__15161658","bottom":"index_module_bottom__15161658","association_problem":"index_module_association_problem__15161658","association_problem_flag":"index_module_association_problem_flag__15161658","related_issues_flag":"index_module_related_issues_flag__15161658","img_con":"index_module_img_con__15161658","mask_zoom":"index_module_mask_zoom__15161658","img_con2":"index_module_img_con2__15161658","copyCode":"index_module_copyCode__15161658","time":"index_module_time__15161658","citation_content":"index_module_citation_content__15161658","text_exceed":"index_module_text_exceed__15161658","popover_content":"index_module_popover_content__15161658","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__15161658","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__15161658","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__15161658","issues_list_teacherList":"index_module_issues_list_teacherList__15161658","item":"index_module_item__15161658","issues_list":"index_module_issues_list__15161658","issues_list_flag":"index_module_issues_list_flag__15161658","Drawer_buttom":"index_module_Drawer_buttom__15161658","input_wrap":"index_module_input_wrap__15161658","input":"index_module_input__15161658","picture_layout":"index_module_picture_layout__15161658","icon_close":"index_module_icon_close__15161658","icon_zoom":"index_module_icon_zoom__15161658","anticon":"index_module_anticon__15161658","no_AI":"index_module_no_AI__15161658","screenshot":"index_module_screenshot__15161658","disabled":"index_module_disabled__15161658","content_main":"index_module_content_main__15161658","content_con":"index_module_content_con__15161658","delete_quote":"index_module_delete_quote__15161658","sending":"index_module_sending__15161658","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__15161658","main_list":"index_module_main_list__15161658","chat_content":"index_module_chat_content__15161658","popover_main_content":"index_module_popover_main_content__15161658","popover_main_content_name":"index_module_popover_main_content_name__15161658","teacher_layout":"index_module_teacher_layout__15161658","delete":"index_module_delete__15161658","num":"index_module_num__15161658","shrink":"index_module_shrink__15161658","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__15161658","teacher_layout_modal":"index_module_teacher_layout_modal__15161658","ai":"index_module_ai__15161658","user_info":"index_module_user_info__15161658","message":"index_module_message__15161658","con":"index_module_con__15161658","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__15161658","history_list":"index_module_history_list__15161658","search_layout":"index_module_search_layout__15161658","mymove":"index_module_mymove__15161658","title":"index_module_title__15161658","search_top":"index_module_search_top__15161658","list_item":"index_module_list_item__15161658","list_summary":"index_module_list_summary__15161658","head_img":"index_module_head_img__15161658","list_desc":"index_module_list_desc__15161658","name":"index_module_name__15161658","decs":"index_module_decs__15161658","open":"index_module_open__15161658","list_summary_active":"index_module_list_summary_active__15161658","list_detail":"index_module_list_detail__15161658","list":"index_module_list__15161658","list_more":"index_module_list_more__15161658","no_data":"index_module_no_data__15161658","history_list_broadside":"index_module_history_list_broadside__15161658","teacher_list":"index_module_teacher_list__15161658","screenshot_Modal":"index_module_screenshot_Modal__15161658","ReactCrop":"index_module_ReactCrop__15161658","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__15161658"};
2579
2625
 
2580
2626
  //消息已读
2581
2627
  var readMessage = function(roomId, urllocation, userData, http) {
@@ -10948,16 +10994,13 @@ var CustomerService = function(props) {
10948
10994
  //渲染底部按钮
10949
10995
  var renderBottomAnt = function() {
10950
10996
  var placeholder = "";
10951
- var disabled = false;
10952
10997
  if (!finished) {
10953
10998
  placeholder = "答案生成中,请稍后再发送...";
10954
10999
  }
10955
11000
  if (screenshotBese64) {
10956
11001
  placeholder = "在发送之前,请输入需要对这个图片做的操作...";
10957
- disabled = true;
10958
11002
  } else {
10959
11003
  placeholder = "请输入问题,按Enter发送,Shift+Enter换行";
10960
- disabled = true;
10961
11004
  }
10962
11005
  return /*#__PURE__*/ jsxs(Fragment, {
10963
11006
  children: [
@@ -11054,6 +11097,9 @@ var CustomerService = function(props) {
11054
11097
  // console.log('发送内容22222',props)
11055
11098
  // console.log(roomList,roomId,'发送内容22222wewewewewewewe');
11056
11099
  if (!e.shiftKey && !e.altKey && !e.ctrlKey && keyWord.trim() != "") {
11100
+ if (!finished) {
11101
+ return;
11102
+ }
11057
11103
  e.stopPropagation();
11058
11104
  e.preventDefault();
11059
11105
  clearTimeout(timer.current);
@@ -11081,7 +11127,7 @@ var CustomerService = function(props) {
11081
11127
  onFocus: function() {
11082
11128
  onEvent(serverName + serverUrl(), "click_智能问答_输入框", "提交");
11083
11129
  },
11084
- disabled: !disabled || !finished,
11130
+ // disabled={!disabled || !finished}
11085
11131
  maxLength: 1000,
11086
11132
  id: "con_textarea"
11087
11133
  }),
@@ -11142,9 +11188,9 @@ var CustomerService = function(props) {
11142
11188
  /*#__PURE__*/ jsx("p", {
11143
11189
  className: "".concat(styles.sending),
11144
11190
  children: /*#__PURE__*/ jsx("i", {
11145
- className: "".concat(!disabled || keyWord.trim() == "" ? styles.disabled : ""),
11191
+ className: "".concat(!finished || keyWord.trim() == "" ? styles.disabled : ""),
11146
11192
  onClick: function() {
11147
- if (disabled && keyWord.trim() == "") return;
11193
+ if (!finished || keyWord.trim() == "") return;
11148
11194
  setCitationContent({});
11149
11195
  setButtomHei(45);
11150
11196
  if (keyWord.trim() != "") {