You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
124 KiB
2 lines
124 KiB
5 years ago
|
/*! For license information please see 109.528f0eea.chunk.js.LICENSE.txt */
|
||
|
(this.webpackJsonph5=this.webpackJsonph5||[]).push([[109,10,133],{1e3:function(e,t,n){},1049:function(e,t,n){},1100:function(e,t,n){"use strict";var a=n(8),o=n(7),r=n(10),i=n(9),s=n(11),c=n(0),l=n.n(c),u=n(28),p=(n(1101),window.$),d=function(e){function t(e){var n;return Object(a.a)(this,t),(n=Object(r.a)(this,Object(i.a)(t).call(this,e))).initMDEditor=function(){var e="".concat(Object(u.Q)());n.isMDInited||(n.isMDInited=!0,window.__tt=400,setTimeout((function(){var t=window.create_editorMD_4comment("memo_comment_editorMd","",n.props.height||240,"\u6211\u8981\u56de\u590d...",e,(function(){n.initDrag(),t.cm.on("change",(function(e,t){n.setState({isError:!1,errorMsg:""})}))}),{watch:!1,dialogLockScreen:!1});n.commentMDEditor=t,window.commentMDEditor=t}),window.__tt))},n.initDrag=function(){window.initMDEditorDragResize(".editor__resize",n.commentMDEditor)},n.onCommit=function(){if(!1!==n.props.checkIfLogin())if(!1!==n.props.checkIfProfileCompleted()){var e=n.commentMDEditor.getValue();if(1==n.props.showError){if(!e||""==e.trim())return void n.setState({isError:!0,errorMsg:"\u4e0d\u80fd\u4e3a\u7a7a"});if(2e3<e.length)return void n.setState({isError:!0,errorMsg:"\u4e0d\u80fd\u8d85\u8fc72000\u4e2a\u5b57\u7b26"});n.setState({isError:!1,errorMsg:""})}n.props.replyComment?n.props.replyComment(e,n.props.memo.id,n.commentMDEditor):window.$(document).trigger("onReply",{commentContent:e,id:n.props.memo.id,editor:n.commentMDEditor})}else n.props.showaccountprofileDialog();else n.props.showLoginDialog()},n.close=function(){n.setState({isInited:!1})},n.onMockInputClick=function(){n.setState({isInited:!0}),n.isMDInited?setTimeout((function(){n.commentMDEditor&&n.commentMDEditor.cm.focus()}),10):n.initMDEditor()},n.state={isInited:!n.props.usingMockInput,isError:!1,errorMsg:""},n}return Object(s.a)(t,e),Object(o.a)(t,[{key:"componentDidUpdate",value:function(e){!this.props.memo||e.memo&&(this.props.memo.id,e.memo.id)}},{key:"componentDidMount",value:function(){this.props.usingMockInput||this.initMDEditor()}},{key:"showEditor",value:function(){var e=this;p("html, body").animate({scrollTop:p(".commentInput:visible").offset().top-100},1e3,(function(){e.commentMDEditor?e.commentMDEditor.cm.focus():e.onMockInputClick()}))}},{key:"render",value:function(){var e=this.props,t=(e.match,e.history,e.memo),n=e.placeholder,a=e.className,o=e.imageExpand,r=this.state,i=r.isInited,s=r.errorMsg;return t?l.a.createElement(l.a.Fragment,null,l.a.createElement("style",null,"\n\t\t\t\t\t\t.mockInputWrapper {\n\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\tpadding: 20px 30px 20px 30px;\n\t\t\t\t\t\t\tborder-bottom: 1px solid #EEEEEE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.mockInputWrapper input {\n\t\t\t\t\t\t\tflex:1;\n\t\t\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t\t\t\theight: 40px;\n\t\t\t\t\t\t\tbackground: rgb(246,246,246);\n\t\t\t\t\t\t\tmargin-right: 20px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.mockInputWrapper a.commentsbtn {\n\t\t\t\t\t\t\theight: 40px;\n\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\tmargin-top: 0px !important;\n\t\t\t\t\t\t\tvertical-align: text-top;\n\t\t\t\t\t\t\tpadding-top: 6px;\n\t\t\t\t\t\t\twidth: 60px;\n\t\t\t\t\t\t\tmargin-right: 0px !important;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.commentInput {\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.commentInput .editormd{\n\t\t\t\t\t\t\twidth:100%!important;\n\t\t\t\t\t\t}\n\t\t\t\t\t"),l.a.createElement("div",{style:{display:i?"none":"",borderBottom:"".concat(0==this.props.commentsLength?"none":"1px solid #EEEEEE")},className:"mockInputWrapper commentInput ".concat(a)},l.a.createElement("input",{onClick:this.onMockInputClick,placeholder:n||"\u6211\u8981\u56de\u590d"}),l.a.createElement("a",{href:"javascript:void(0)",onClick:this.onMockInputClick,className:"commentsbtn task-btn task-btn-blue"},this.props.buttonText||"\u53d1\u9001")),l.a.createElement("style",null),l.a.createElement("div",{nhname:"new_message_".concat(t.id),className:"commentInput commentInputs ".concat(a," ").concat(o&&"editormd-image-click-expand"),style:{padding:"30px",boxSizing:"border-box",display:i?"":"none",paddingBottom:"40px"}},l.a.createElement("div
|