优化页面
This commit is contained in:
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../../../common/vendor.js");require("../../../adapter-vue.js");const n=require("../../../constant.js"),o=require("../../../utils/env.js");Math||(i+t)();const t=()=>"../../common/Overlay/index.js",i=()=>"../../common/Dialog/index.js",s=e.defineComponent({__name:"index",props:{actionsMenuPosition:{},selectedConversation:{},selectedConversationDomRect:{}},emits:["closeConversationActionMenu"],setup(t,{emit:i}){var s,r;const a=i,c=t,l=(null==(s=e.getCurrentInstance())?void 0:s.proxy)||e.getCurrentInstance(),u=e.ref(),v=e.ref(!0),d=e.ref(!1),C=e.Jt.getConversationModel((null==(r=c.selectedConversation)?void 0:r.conversationID)||""),f=e.ref(c.actionsMenuPosition);e.onMounted((()=>{e.nextTick$1((()=>{var n,t;if(o.isUniFrameWork)(null==(n=e.i)?void 0:n.createSelectorQuery().in(l)).select("#conversation-actions-menu").boundingClientRect((n=>{var o,t;n&&(n.bottom>(null==(t=null==(o=e.i)?void 0:o.getWindowInfo)?void 0:t.call(o).windowHeight)&&(f.value={...c.actionsMenuPosition,top:c.actionsMenuPosition.top-(c.actionsMenuPosition.conversationHeight||0)-n.height}),f.value.left+n.width+5>e.i.getWindowInfo().windowWidth&&(f.value.left=e.i.getWindowInfo().windowWidth-n.width-5)),v.value=!1})).exec();else{const e=null==(t=u.value)?void 0:t.getBoundingClientRect();o.isPC&&void 0!==c.actionsMenuPosition.left&&(f.value.left=c.actionsMenuPosition.left),e&&e.bottom>window.innerHeight&&(f.value.top=c.actionsMenuPosition.top-(c.actionsMenuPosition.conversationHeight||0)-e.height),v.value=!1}}))}));const O=e.computed((()=>{var n,o;return(null==(n=c.selectedConversation)?void 0:n.type)===e.qt.TYPES.CONV_C2C?"TUIConversation.删除后,将清空该聊天的消息记录":(null==(o=c.selectedConversation)?void 0:o.type)===e.qt.TYPES.CONV_GROUP?"TUIConversation.删除后,将清空该群聊的消息记录":""}));const I=e=>{const{name:o}=e,t=C;if(o&&t&&t.conversationID){switch(o){case n.CONV_OPERATION.DELETE:null==t||t.deleteConversation();break;case n.CONV_OPERATION.ISPINNED:case n.CONV_OPERATION.DISPINNED:null==t||t.pinConversation();break;case n.CONV_OPERATION.MUTE:case n.CONV_OPERATION.NOTMUTE:null==t||t.muteConversation()}a("closeConversationActionMenu")}},P=e=>{e||a("closeConversationActionMenu"),d.value=e};return(t,i)=>e.e({a:e.t(e.unref(e.Wt).t("TUIConversation.删除会话")),b:e.o$1((e=>{d.value=!0})),c:!(c.selectedConversation&&c.selectedConversation.isPinned)},c.selectedConversation&&c.selectedConversation.isPinned?{}:{d:e.t(e.unref(e.Wt).t("TUIConversation.置顶会话")),e:e.o$1((o=>I({name:e.unref(n.CONV_OPERATION).ISPINNED})))},{f:c.selectedConversation&&c.selectedConversation.isPinned},c.selectedConversation&&c.selectedConversation.isPinned?{g:e.t(e.unref(e.Wt).t("TUIConversation.取消置顶")),h:e.o$1((o=>I({name:e.unref(n.CONV_OPERATION).DISPINNED})))}:{},{i:!(c.selectedConversation&&c.selectedConversation.isMuted)},c.selectedConversation&&c.selectedConversation.isMuted?{}:{j:e.t(e.unref(e.Wt).t("TUIConversation.消息免打扰")),k:e.o$1((o=>I({name:e.unref(n.CONV_OPERATION).MUTE})))},{l:c.selectedConversation&&c.selectedConversation.isMuted},c.selectedConversation&&c.selectedConversation.isMuted?{m:e.t(e.unref(e.Wt).t("TUIConversation.取消免打扰")),n:e.o$1((o=>I({name:e.unref(n.CONV_OPERATION).NOTMUTE})))}:{},{o:e.n(e.unref(o.isPC)&&"actions-menu-pc"),p:e.n(!e.unref(v)&&"cancel-hidden"),q:`${e.unref(f).top}px`,r:`${e.unref(f).left}px`,s:e.t(e.unref(e.Wt).t(e.unref(O))),t:e.o$1((o=>I({name:e.unref(n.CONV_OPERATION).DELETE}))),v:e.o$1(P),w:e.p({show:e.unref(d),center:!0,isHeaderShow:e.unref(o.isPC)}),x:e.o$1((()=>a("closeConversationActionMenu"))),y:e.p({maskColor:"transparent"})})}}),r=e._export_sfc(s,[["__scopeId","data-v-6ae97666"]]);wx.createComponent(r);
|
||||
7
unpackage/dist/build/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.json
vendored
Normal file
7
unpackage/dist/build/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"overlay": "../../common/Overlay/index",
|
||||
"dialog": "../../common/Dialog/index"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<overlay wx:if="{{y}}" class="data-v-6ae97666" u-s="{{['d']}}" bindonOverlayClick="{{x}}" u-i="6ae97666-0" bind:__l="__l" u-p="{{y}}"><view id="conversation-actions-menu" ref="actionsMenuDomRef" class="{{['data-v-6ae97666', o, 'actions-menu', p]}}" style="{{'top:' + q + ';' + ('left:' + r)}}"><view class="{{['data-v-6ae97666', 'actions-menu-item']}}" catchtap="{{b}}">{{a}}</view><view wx:if="{{c}}" class="{{['data-v-6ae97666', 'actions-menu-item']}}" catchtap="{{e}}">{{d}}</view><view wx:if="{{f}}" class="{{['data-v-6ae97666', 'actions-menu-item']}}" catchtap="{{h}}">{{g}}</view><view wx:if="{{i}}" class="{{['data-v-6ae97666', 'actions-menu-item']}}" catchtap="{{k}}">{{j}}</view><view wx:if="{{l}}" class="{{['data-v-6ae97666', 'actions-menu-item']}}" catchtap="{{n}}">{{m}}</view></view><dialog wx:if="{{w}}" class="data-v-6ae97666" u-s="{{['d']}}" bindsubmit="{{t}}" bindupdateShow="{{v}}" u-i="6ae97666-1,6ae97666-0" bind:__l="__l" u-p="{{w}}"><view class="delDialog-title data-v-6ae97666">{{s}}</view></dialog></overlay>
|
||||
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.cancel-hidden.data-v-6ae97666{opacity:1!important}.actions-menu.data-v-6ae97666{position:absolute;left:164px;border-radius:8px;border:1px solid #e0e0e0;box-shadow:0 -4px 12px rgba(0,0,0,.06);background-color:#fff;overflow:hidden;opacity:0}.actions-menu .actions-menu-item.data-v-6ae97666{cursor:pointer;padding:10px 20px;font-size:12px;word-break:keep-all}.actions-menu.actions-menu-pc .actions-menu-item.data-v-6ae97666:hover{background-color:#eee}
|
||||
Reference in New Issue
Block a user