chunk-cd485218.b55bcca6.js 9.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cd485218"],{2422:function(e,t,n){"use strict";var i=n("2481"),o=n.n(i);o.a},2481:function(e,t,n){},"39ab":function(e,t,n){},6037:function(e,t,n){},"7a9f":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"c-view"},[n("div",{staticClass:"box"},[n("div",{staticClass:"box-hd"},[n("div",{staticClass:"title-wrap"},[e._v("\n "+e._s(e.isPrivate?e.group.privateName:e.group.groupName)+"\n "),e.isPrivate?e._e():n("span",[e._v("("+e._s(e.group.membersNum)+")")]),!e.isPrivate&&e.group.url?n("a",{staticClass:"icon-link",attrs:{href:e.group.url,target:"_blank"}}):e._e(),!e.isPrivate&&e.isJoin?n("i",{staticClass:"el-icon-more",on:{click:function(t){t.stopPropagation(),e.groupSet=!e.groupSet}}}):e._e()])]),n("chat-pin",e._b({on:{pinMsgClose:e.pinMsgClose,scrollToView:e.scrollToView}},"chat-pin",e.pinMsg,!1)),n("div",{staticClass:"box-bd",class:{hidden:e.bdHiden}},[n("div",{ref:"scrollWrap",staticClass:"bar",on:{scroll:e.handleScroll}},[n("div",{ref:"msgWrap",staticClass:"scroll-wrapper"},[n("div",{staticClass:"msg-wrap"},[e.lockEnd?n("div",{staticClass:"msg-top-more"},[n("em",[e._v(e._s(e.$t("chat.noMore")))])]):e._e(),e.lockMore&&!e.lockEnd?n("div",{staticClass:"msg-top-load"},[n("i",{staticClass:"msg-loading-icon"})]):e._e(),e._l(e.chatList,function(t){return n("msg-item",e._b({key:t.hash,attrs:{isPrivate:e.isPrivate,msgItem:t,isAdmin:e.isAdmin},on:{quoteMsg:e.quoteMsg,deleteMsg:e.deleteMsg}},"msg-item",t,!1))})],2)])]),e.isPrivate?e._e():n("at-me",{attrs:{atList:e.atList},on:{scrollToMsg:e.scrollToMsg}}),n("div",{directives:[{name:"show",rawName:"v-show",value:e.group.unreadNums>0&&e.enableScroll&&!e.isBottom,expression:"group.unreadNums > 0 && enableScroll && !isBottom"}],staticClass:"msg-unread",on:{click:e.doSetRead}},[n("em",[n("i",{staticClass:"el-icon-d-arrow-right"}),e._v("\n "+e._s(e.group.unreadNums)+e._s(e.$t("chat.unreadMsg"))+"\n ")])])],1),n("input-area",{directives:[{name:"show",rawName:"v-show",value:1==e.isJoinGroup,expression:"isJoinGroup==1"}],ref:"inputArea",on:{toBottom:e.resizeToBottom,handleFocus:function(t){return e.showCharSet(0)}}}),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.isJoinGroup,expression:"isJoinGroup==0"}],staticClass:"btn-join",on:{click:function(t){return e.joinGroup()}}},[e._v(e._s(e.$t("chat.joinGroup")))])],1),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isLoadingRoom,expression:"isLoadingRoom"}],staticClass:"pub-loading"}),e.isPrivate||1!=e.isJoinGroup?e._e():n("chat-set",{class:{"move-left":e.groupSet},on:{showLoadingRoom:e.showLoadingRoom,showCharSet:e.showCharSet,handleShowGroudMgr:e.showGroudMgr}}),!e.isPrivate&&e.isCreator?n("chat-groud-mgr",{class:{"move-left":e.isShowGroudMgr},on:{handleShowGroudMgr:e.showGroudMgr,handleShowCharSet:e.showCharSet}}):e._e()],1)},o=[],s=(n("3a23"),n("39ab"),n("3050"),n("c843")),a=n.n(s),r=n("6e6d"),l=n("2f35"),c=n("34d0"),u=n("9360"),d=n("3868"),h=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"box-ft"},[n("transition",{attrs:{name:"msgbox-fade"}},[n("Emoji",{directives:[{name:"show",rawName:"v-show",value:e.emojiShow,expression:"emojiShow"}],attrs:{emojiShow:e.emojiShow},on:{addEmoji:e.addEmoji,closeEmojiList:e.closeEmojiList}})],1),n("file-preview",{directives:[{name:"show",rawName:"v-show",value:e.filePreviewShow,expression:"filePreviewShow"}],attrs:{fileInfo:e.fileInfo},on:{handleFileSend:e.handleFileSend,closeFilePreview:e.closeFilePreview}}),e.atShow?n("chat-at",{ref:"chatAt",attrs:{curInd:e.atInd,filterList:e.filterMembers},on:{atperson:e.atPerson}}):e._e(),n("div",{staticClass:"toolbar"},[n("i",{staticClass:"look-icon",on:{click:function(t){return t.stopPropagation(),e.handleEmoji(t)}}}),n("div",{staticClass:"file-icon"},[n("input",{ref:"inputFile",attrs:{type:"file"},on:{change:e.handleFile,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFileEnter(t)}}})]),n("i",{staticClass:"icon-packet",on:{click:e.$packetSend}})]),n("div",{staticClass:"send-content"},[n("form",{staticClass:"input-wrap",on:{submit:e.handleSend}},[n("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputMsg,expression:"inputMsg"}],ref:"chatInput",attrs:{cols:"1",rows:"1",placeholder:""},domProps:{value:e.inputMsg},on:{click:function(t){return t.stopPropagation(),e.handleClick(t)},input:[function(t){t.target.composing||(e.inputMsg=t.target.value)},e.handleInput],keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:e.handleUp(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:e.handleDown(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])?null:"button"in t&&0!==t.button?null:e.handleLeft(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:"button"in t&&2!==t.button?null:e.handleRight(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"delete",[8,46],t.key,["Backspace","Delete","Del"])?null:e.handleDel(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.handleEsc(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleKeyDown(t)}],focus:e.handleFocus,blur:e.handleBlur,contextmenu:function(t){return t.preventDefault(),e.handleContextmenu(t)}}})]),n("ul",{directives:[{name:"show",rawName:"v-show",value:e.isShowContextmenu,expression:"isShowContextmenu"}],staticClass:"pub-pop-toolbar",style:{top:e.menuTop+"px",left:e.menuLeft+"px"}},[n("li",{on:{click:function(t){return t.preventDefault(),e.handlePaste(t)}}},[e._v(e._s(e.$t("chat.paste")))])])]),n("div",{staticClass:"send-action"},[e._v(e._s(e.$t("chat.enterTips"))+"\n "),n("el-button",{attrs:{disabled:!e.inputMsg},on:{click:e.handleSend}},[e._v(e._s(e.$t("chat.send")))])],1)],1)},f=[],p=(n("612f"),n("ab6b")),m=n.n(p),v=n("3f47"),w=n("4e81"),g=n("a1aa"),k=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"preview-wrap"},[n("div",{staticClass:"preview-hd"},[e._v(e._s(e.fileInfo&&1==e.fileInfo.type?e.$t("chat.imageComfirm"):e.$t("chat.videoComfirm"))+":")]),n("div",{staticClass:"preview-bd"},[e.fileInfo&&1==e.fileInfo.type?n("img",{attrs:{src:this.fileInfo&&this.fileInfo.preview}}):e._e(),!e.fileInfo||2!=e.fileInfo.type&&3!=e.fileInfo.type?e._e():n("video",{class:[{"ext-audio":3==e.fileInfo.type}],attrs:{controls:"",src:this.fileInfo&&this.fileInfo.preview}})]),n("div",{staticClass:"preview-ft"},[n("el-button",{on:{click:e.closeFilePreview}},[e._v(e._s(e.$t("public.cancel")))]),n("el-button",{attrs:{type:"primary"},on:{click:e.handleFileSend}},[e._v(e._s(e.$t("public.confirm")))])],1)])},b=[];r["default"].component(a.a.name,a.a);var C={props:{fileInfo:Object},computed:{previewUrl:function(){return this.fileInfo?1==this.fileInfo.type?this.fileInfo.preview:window.webkitURL.createObjectURL(this.fileInfo.res):""}},methods:{closeFilePreview:function(){this.$emit("closeFilePreview")},handleFileSend:function(){this.$emit("handleFileSend",this.fileInfo)}}},_=C,y=(n("2422"),n("17cc")),S=Object(y["a"])(_,k,b,!1,null,"934a997a",null),x=S.exports,M=n("52c1"),P=n("8869"),E={name:"inputArea",mixins:[P["c"],P["d"],d["c"]],components:{Emoji:w["a"],chatAt:g["a"],filePreview:x},watch:{$route:function(){this.$refs.chatInput.focus(),this.inputMsg=""}},computed:Object(v["a"])({},Object(M["e"])(["curSession"])),mounted:function(){document.addEventListener("paste",this.initPaste),document.addEventListener("drop",this.initDrop),document.addEventListener("dragover",this.initDragOver)},beforeDestroy:function(){document.removeEventListener("paste",this.initPaste),document.removeEventListener("drop",this.initDrop),document.removeEventListener("dragover",this.initDragOver)},methods:{handleFileEnter:function(e){this.filePreviewShow&&(e.stopPropagation(),e.preventDefault(),this.handleFileSend(this.fileInfo))},handleEmoji:function(){this.emojiShow=!this.emojiShow},initDrop:function(e){var t=this;e.preventDefault();var n=m()(e.dataTransfer.files);n.forEach(function(e){return t.handleFile(e)})},initDragOver:function(e){e.preventDefault()},initPaste:function(e){var t=this,n=(e.clipboardData||window.clipboardData).items;n&&n.length&&m()(n).forEach(function(e){var n=e.getAsFile();n&&t.handleFile(n)})}}},I=E,j=(n("e5b2"),Object(y["a"])(I,h,f,!1,null,"cf7b40d8",null)),L=j.exports,D=n("33f8");r["default"].component(a.a.name,a.a);var F={name:"chatRoom",mixins:[d["b"],d["a"]],data:function(){return{isShowGroudMgr:!1,bdHiden:!0}},components:{msgItem:l["a"],inputArea:L,chatPin:c["a"],atMe:u["a"],chatGroudMgr:function(){return n.e("chunk-008bd727").then(n.bind(null,"17a3"))},chatSet:function(){return n.e("chunk-0cf37cea").then(n.bind(null,"5fa4"))}},methods:{showCharSet:function(e){this.groupSet=1==e,this.isShowGroudMgr=!1},showGroudMgr:function(e){this.isShowGroudMgr=1==e}},mounted:function(){var e=this;this.scrollHeight=Object(D["p"])(),window.onresize=function(){e.scrollHeight=Object(D["p"])()}}},O=F,$=(n("e64d"),Object(y["a"])(O,i,o,!1,null,"a60166f2",null));t["default"]=$.exports},"7e2e":function(e,t,n){},e5b2:function(e,t,n){"use strict";var i=n("7e2e"),o=n.n(i);o.a},e64d:function(e,t,n){"use strict";var i=n("6037"),o=n.n(i);o.a}}]);