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.
 
 
 
 
 

10 lines
3.9 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/tui-conversation/conversation-item/index"],{"05d7":function(t,e,n){},"32f6":function(t,e,n){"use strict";n.r(e);var a=n("bfbf"),o=n("f235");for(var s in o)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(s);n("5928");var i=n("f0c5"),c=Object(i["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=c.exports},5831:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n("0eb4"),o={data:function(){return{xScale:0,conversationName:"",conversationAvatar:"",setConversationAvatar:"",timeago:"",delBtnWidth:72,startX:0,txtStyle:""}},computed:{i18n:function(){return this.$t("index")}},components:{},props:{conversation:{type:Object,default:function(){}}},watch:{conversation:{handler:function(t){this.setData({conversationName:this.getConversationName(t),setConversationAvatar:this.setConversationAvatarHandler(t),timeago:(0,a.caculateTimeago)(1e3*t.lastMessage.lastTime)}),this.$updateTimeago(t)},immediate:!0,deep:!0}},methods:{getConversationName:function(t){return"@TIM#SYSTEM"===t.type?"系统通知":"C2C"===t.type?t.remark||t.userProfile.nick||t.userProfile.userID:"GROUP"===t.type?t.groupProfile.name||t.groupProfile.groupID:void 0},setConversationAvatarHandler:function(t){return"@TIM#SYSTEM"===t.type?"https://web.sdk.qcloud.com/component/TUIKit/assets/system.png":"C2C"===t.type?t.userProfile.avatar||"https://sdk-web-1252463788.cos.ap-hongkong.myqcloud.com/component/TUIKit/assets/avatar_21.png":"GROUP"===t.type?t.groupProfile.avatar||"/static/static/assets/gruopavatar.svg":void 0},deleteConversation:function(){var e=this;t.showModal({content:"确认删除会话?",success:function(n){n.confirm&&(t.$TUIKit.deleteConversation(e.conversation.conversationID),e.setData({conversation:{},xScale:0}))}})},handleTouchMove:function(t){var e=this;this.lock||(this.last=t.detail.x,this.lock=!0),this.lock&&t.detail.x-this.last<-5?(this.setData({xScale:-75}),setTimeout((function(){e.lock=!1}),2e3)):this.lock&&t.detail.x-this.last>5&&(this.setData({xScale:0}),setTimeout((function(){e.lock=!1}),2e3))},$updateTimeago:function(t){t.conversationID&&(t.lastMessage.messageForShow=t.lastMessage.messageForShow.slice(0,15)),this.setData({conversation:t})},handleImageError:function(){this.setData({setConversationAvatar:"/static/static/assets/gruopavatar.svg"})},touchS:function(t){1==t.touches.length&&(this.startX=t.touches[0].clientX)},touchM:function(t){if(1==t.touches.length){var e=t.touches[0].clientX,n=this.startX-e,a=this.delBtnWidth;0==n||n<0?"left:0px":n>0&&("left:-"+n+"px",n>=a&&"left:-"+a+"px")}},touchE:function(t){if(1==t.changedTouches.length){var e=t.changedTouches[0].clientX,n=this.startX-e,a=this.delBtnWidth,o=n>a/2?"left:-"+a+"px":"left:0px";this.txtStyle=o}}}};e.default=o}).call(this,n("543d")["default"])},5928:function(t,e,n){"use strict";var a=n("05d7"),o=n.n(a);o.a},bfbf:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var a=function(){var t=this.$createElement,e=(this._self._c,this.conversation.conversationID?this.conversation.lastMessage.messageForShow.indexOf("TUIKit-kami"):null);this.$mp.data=Object.assign({},{$root:{g0:e}})},o=[]},f235:function(t,e,n){"use strict";n.r(e);var a=n("5831"),o=n.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);e["default"]=o.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/tui-conversation/conversation-item/index-create-component',
{
'components/tui-conversation/conversation-item/index-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("32f6"))
})
},
[['components/tui-conversation/conversation-item/index-create-component']]
]);