消息
This commit is contained in:
160
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.js
vendored
Normal file
160
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.js
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
require("../../../adapter-vue.js");
|
||||
const TUIKit_constant = require("../../../constant.js");
|
||||
const TUIKit_utils_env = require("../../../utils/env.js");
|
||||
if (!Math) {
|
||||
(Dialog + Overlay)();
|
||||
}
|
||||
const Overlay = () => "../../common/Overlay/index.js";
|
||||
const Dialog = () => "../../common/Dialog/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
actionsMenuPosition: {},
|
||||
selectedConversation: {},
|
||||
selectedConversationDomRect: {}
|
||||
},
|
||||
emits: ["closeConversationActionMenu"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
var _a, _b;
|
||||
const emits = __emit;
|
||||
const props = __props;
|
||||
const thisInstance = ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.proxy) || common_vendor.getCurrentInstance();
|
||||
const actionsMenuDomRef = common_vendor.ref();
|
||||
const isHiddenActionsMenu = common_vendor.ref(true);
|
||||
const isShowDeleteConversationDialog = common_vendor.ref(false);
|
||||
const currentConversation = common_vendor.Jt.getConversationModel(
|
||||
((_b = props.selectedConversation) == null ? void 0 : _b.conversationID) || ""
|
||||
);
|
||||
const _actionsMenuPosition = common_vendor.ref(props.actionsMenuPosition);
|
||||
common_vendor.onMounted(() => {
|
||||
checkExceedBounds();
|
||||
});
|
||||
const deleteConversationDialogTitle = common_vendor.computed(() => {
|
||||
var _a2, _b2;
|
||||
return ((_a2 = props.selectedConversation) == null ? void 0 : _a2.type) === common_vendor.qt.TYPES.CONV_C2C ? "TUIConversation.删除后,将清空该聊天的消息记录" : ((_b2 = props.selectedConversation) == null ? void 0 : _b2.type) === common_vendor.qt.TYPES.CONV_GROUP ? "TUIConversation.删除后,将清空该群聊的消息记录" : "";
|
||||
});
|
||||
function checkExceedBounds() {
|
||||
common_vendor.nextTick$1(() => {
|
||||
var _a2, _b2;
|
||||
if (TUIKit_utils_env.isUniFrameWork) {
|
||||
const query = (_a2 = common_vendor.i) == null ? void 0 : _a2.createSelectorQuery().in(thisInstance);
|
||||
query.select(`#conversation-actions-menu`).boundingClientRect((data) => {
|
||||
var _a3, _b3;
|
||||
if (data) {
|
||||
if (data.bottom > ((_b3 = (_a3 = common_vendor.i) == null ? void 0 : _a3.getWindowInfo) == null ? void 0 : _b3.call(_a3).windowHeight)) {
|
||||
_actionsMenuPosition.value = {
|
||||
...props.actionsMenuPosition,
|
||||
top: props.actionsMenuPosition.top - (props.actionsMenuPosition.conversationHeight || 0) - data.height
|
||||
};
|
||||
}
|
||||
if (_actionsMenuPosition.value.left + data.width + 5 > common_vendor.i.getWindowInfo().windowWidth) {
|
||||
_actionsMenuPosition.value.left = common_vendor.i.getWindowInfo().windowWidth - data.width - 5;
|
||||
}
|
||||
}
|
||||
isHiddenActionsMenu.value = false;
|
||||
}).exec();
|
||||
} else {
|
||||
const rect = (_b2 = actionsMenuDomRef.value) == null ? void 0 : _b2.getBoundingClientRect();
|
||||
if (TUIKit_utils_env.isPC && typeof props.actionsMenuPosition.left !== "undefined") {
|
||||
_actionsMenuPosition.value.left = props.actionsMenuPosition.left;
|
||||
}
|
||||
if (rect && rect.bottom > window.innerHeight) {
|
||||
_actionsMenuPosition.value.top = props.actionsMenuPosition.top - (props.actionsMenuPosition.conversationHeight || 0) - rect.height;
|
||||
}
|
||||
isHiddenActionsMenu.value = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
const handleItem = (params) => {
|
||||
const { name } = params;
|
||||
const conversationModel = currentConversation;
|
||||
if (!name || !conversationModel || !conversationModel.conversationID) {
|
||||
return;
|
||||
}
|
||||
switch (name) {
|
||||
case TUIKit_constant.CONV_OPERATION.DELETE:
|
||||
conversationModel == null ? void 0 : conversationModel.deleteConversation();
|
||||
break;
|
||||
case TUIKit_constant.CONV_OPERATION.ISPINNED:
|
||||
conversationModel == null ? void 0 : conversationModel.pinConversation();
|
||||
break;
|
||||
case TUIKit_constant.CONV_OPERATION.DISPINNED:
|
||||
conversationModel == null ? void 0 : conversationModel.pinConversation();
|
||||
break;
|
||||
case TUIKit_constant.CONV_OPERATION.MUTE:
|
||||
conversationModel == null ? void 0 : conversationModel.muteConversation();
|
||||
break;
|
||||
case TUIKit_constant.CONV_OPERATION.NOTMUTE:
|
||||
conversationModel == null ? void 0 : conversationModel.muteConversation();
|
||||
break;
|
||||
}
|
||||
emits("closeConversationActionMenu");
|
||||
};
|
||||
const deleteConversation = () => {
|
||||
isShowDeleteConversationDialog.value = true;
|
||||
};
|
||||
const updateShowDeleteConversationDialog = (isShow) => {
|
||||
if (!isShow) {
|
||||
emits("closeConversationActionMenu");
|
||||
}
|
||||
isShowDeleteConversationDialog.value = isShow;
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIConversation.删除会话")),
|
||||
b: common_vendor.o$1(($event) => deleteConversation()),
|
||||
c: !(props.selectedConversation && props.selectedConversation.isPinned)
|
||||
}, !(props.selectedConversation && props.selectedConversation.isPinned) ? {
|
||||
d: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIConversation.置顶会话")),
|
||||
e: common_vendor.o$1(($event) => handleItem({
|
||||
name: common_vendor.unref(TUIKit_constant.CONV_OPERATION).ISPINNED
|
||||
}))
|
||||
} : {}, {
|
||||
f: props.selectedConversation && props.selectedConversation.isPinned
|
||||
}, props.selectedConversation && props.selectedConversation.isPinned ? {
|
||||
g: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIConversation.取消置顶")),
|
||||
h: common_vendor.o$1(($event) => handleItem({
|
||||
name: common_vendor.unref(TUIKit_constant.CONV_OPERATION).DISPINNED
|
||||
}))
|
||||
} : {}, {
|
||||
i: !(props.selectedConversation && props.selectedConversation.isMuted)
|
||||
}, !(props.selectedConversation && props.selectedConversation.isMuted) ? {
|
||||
j: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIConversation.消息免打扰")),
|
||||
k: common_vendor.o$1(($event) => handleItem({
|
||||
name: common_vendor.unref(TUIKit_constant.CONV_OPERATION).MUTE
|
||||
}))
|
||||
} : {}, {
|
||||
l: props.selectedConversation && props.selectedConversation.isMuted
|
||||
}, props.selectedConversation && props.selectedConversation.isMuted ? {
|
||||
m: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIConversation.取消免打扰")),
|
||||
n: common_vendor.o$1(($event) => handleItem({
|
||||
name: common_vendor.unref(TUIKit_constant.CONV_OPERATION).NOTMUTE
|
||||
}))
|
||||
} : {}, {
|
||||
o: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isPC) && "actions-menu-pc"),
|
||||
p: common_vendor.n(!common_vendor.unref(isHiddenActionsMenu) && "cancel-hidden"),
|
||||
q: `${common_vendor.unref(_actionsMenuPosition).top}px`,
|
||||
r: `${common_vendor.unref(_actionsMenuPosition).left}px`,
|
||||
s: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(common_vendor.unref(deleteConversationDialogTitle))),
|
||||
t: common_vendor.o$1(($event) => handleItem({
|
||||
name: common_vendor.unref(TUIKit_constant.CONV_OPERATION).DELETE
|
||||
})),
|
||||
v: common_vendor.o$1(updateShowDeleteConversationDialog),
|
||||
w: common_vendor.p({
|
||||
show: common_vendor.unref(isShowDeleteConversationDialog),
|
||||
center: true,
|
||||
isHeaderShow: common_vendor.unref(TUIKit_utils_env.isPC)
|
||||
}),
|
||||
x: common_vendor.o$1(() => emits("closeConversationActionMenu")),
|
||||
y: common_vendor.p({
|
||||
maskColor: "transparent"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-63e37304"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.json
vendored
Normal file
7
unpackage/dist/dev/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/dev/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<overlay wx:if="{{y}}" class="data-v-63e37304" u-s="{{['d']}}" bindonOverlayClick="{{x}}" u-i="63e37304-0" bind:__l="__l" u-p="{{y}}"><view id="conversation-actions-menu" ref="actionsMenuDomRef" class="{{['data-v-63e37304', o, 'actions-menu', p]}}" style="{{'top:' + q + ';' + ('left:' + r)}}"><view class="{{['data-v-63e37304', 'actions-menu-item']}}" catchtap="{{b}}">{{a}}</view><view wx:if="{{c}}" class="{{['data-v-63e37304', 'actions-menu-item']}}" catchtap="{{e}}">{{d}}</view><view wx:if="{{f}}" class="{{['data-v-63e37304', 'actions-menu-item']}}" catchtap="{{h}}">{{g}}</view><view wx:if="{{i}}" class="{{['data-v-63e37304', 'actions-menu-item']}}" catchtap="{{k}}">{{j}}</view><view wx:if="{{l}}" class="{{['data-v-63e37304', 'actions-menu-item']}}" catchtap="{{n}}">{{m}}</view></view><dialog wx:if="{{w}}" class="data-v-63e37304" u-s="{{['d']}}" bindsubmit="{{t}}" bindupdateShow="{{v}}" u-i="63e37304-1,63e37304-0" bind:__l="__l" u-p="{{w}}"><view class="delDialog-title data-v-63e37304">{{s}}</view></dialog></overlay>
|
||||
47
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.wxss
vendored
Normal file
47
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/actions-menu/index.wxss
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.cancel-hidden.data-v-63e37304 {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
.actions-menu.data-v-63e37304 {
|
||||
position: absolute;
|
||||
left: 164px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e0e0e0;
|
||||
box-shadow: 0 -4px 12px 0 rgba(0, 0, 0, 0.06);
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
.actions-menu .actions-menu-item.data-v-63e37304 {
|
||||
cursor: pointer;
|
||||
padding: 10px 20px;
|
||||
font-size: 12px;
|
||||
word-break: keep-all;
|
||||
}
|
||||
.actions-menu.actions-menu-pc .actions-menu-item.data-v-63e37304:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
79
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-header/index.js
vendored
Normal file
79
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-header/index.js
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
require("../../../adapter-vue.js");
|
||||
const TUIKit_components_TUIConversation_conversationHeader_server = require("./server.js");
|
||||
if (!Math) {
|
||||
Icon();
|
||||
}
|
||||
const Icon = () => "../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
setup(__props, { expose: __expose }) {
|
||||
const showChildren = common_vendor.ref([]);
|
||||
const convHeaderRef = common_vendor.ref();
|
||||
const menuList = common_vendor.computed(() => {
|
||||
return TUIKit_components_TUIConversation_conversationHeader_server.ConversationHeaderServer.getInstance().getMenu();
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
showChildren.value = [];
|
||||
});
|
||||
const handleMenu = (item) => {
|
||||
const { data: { children }, listener = { onClicked: () => {
|
||||
} } } = item;
|
||||
if (children) {
|
||||
showChildren.value = showChildren.value.length > 0 ? [] : children;
|
||||
} else {
|
||||
listener.onClicked(item);
|
||||
closeChildren();
|
||||
}
|
||||
};
|
||||
const closeChildren = () => {
|
||||
showChildren.value = [];
|
||||
};
|
||||
__expose({
|
||||
closeChildren
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.unref(menuList).length > 0
|
||||
}, common_vendor.unref(menuList).length > 0 ? {
|
||||
b: common_vendor.f(common_vendor.unref(menuList), (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.icon && !item.data.children
|
||||
}, item.icon && !item.data.children ? {
|
||||
b: "c7a8f8e3-0-" + i0,
|
||||
c: common_vendor.p({
|
||||
file: item.icon
|
||||
})
|
||||
} : {}, {
|
||||
d: common_vendor.t(item.text),
|
||||
e: common_vendor.o$1(($event) => handleMenu(item), index),
|
||||
f: index
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
c: common_vendor.unref(showChildren).length > 0
|
||||
}, common_vendor.unref(showChildren).length > 0 ? {
|
||||
d: common_vendor.f(common_vendor.unref(showChildren), (childrenItem, childrenIndex, i0) => {
|
||||
return common_vendor.e({
|
||||
a: childrenItem.icon
|
||||
}, childrenItem.icon ? {
|
||||
b: "c7a8f8e3-1-" + i0,
|
||||
c: common_vendor.p({
|
||||
file: childrenItem.icon
|
||||
})
|
||||
} : {}, {
|
||||
d: common_vendor.t(childrenItem.text),
|
||||
e: common_vendor.o$1(($event) => handleMenu(childrenItem), childrenIndex),
|
||||
f: childrenIndex
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
e: common_vendor.unref(convHeaderRef)
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c7a8f8e3"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/conversation-header/index.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../common/Icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view ref="{{e}}" class="tui-conversation-header data-v-c7a8f8e3"><view wx:if="{{a}}" class="list data-v-c7a8f8e3"><view wx:for="{{b}}" wx:for-item="item" wx:key="f" class="list-item data-v-c7a8f8e3"><view class="tui-conversation-header-item data-v-c7a8f8e3" catchtap="{{item.e}}"><icon wx:if="{{item.a}}" class="tui-conversation-header-item-icon data-v-c7a8f8e3" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"/><view wx:else class="plus data-v-c7a8f8e3"/><view class="tui-conversation-header-item-title data-v-c7a8f8e3">{{item.d}}</view></view></view></view><view wx:if="{{c}}" class="tui-conversation-header-children list data-v-c7a8f8e3"><view wx:for="{{d}}" wx:for-item="childrenItem" wx:key="f" class="list-item data-v-c7a8f8e3"><view class="tui-conversation-header-item data-v-c7a8f8e3" bindtap="{{childrenItem.e}}"><icon wx:if="{{childrenItem.a}}" class="tui-conversation-header-item-icon data-v-c7a8f8e3" u-i="{{childrenItem.b}}" bind:__l="__l" u-p="{{childrenItem.c}}"/><view class="tui-conversation-header-item-title data-v-c7a8f8e3">{{childrenItem.d}}</view></view></view></view></view>
|
||||
179
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-header/index.wxss
vendored
Normal file
179
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-header/index.wxss
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-c7a8f8e3, div.data-v-c7a8f8e3, ul.data-v-c7a8f8e3, ol.data-v-c7a8f8e3, dt.data-v-c7a8f8e3, dd.data-v-c7a8f8e3, li.data-v-c7a8f8e3, dl.data-v-c7a8f8e3, h1.data-v-c7a8f8e3, h2.data-v-c7a8f8e3, h3.data-v-c7a8f8e3, h4.data-v-c7a8f8e3, p.data-v-c7a8f8e3 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-c7a8f8e3, ul.data-v-c7a8f8e3, li.data-v-c7a8f8e3 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-c7a8f8e3 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-c7a8f8e3 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-c7a8f8e3 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-c7a8f8e3 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-c7a8f8e3:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-c7a8f8e3, textarea.data-v-c7a8f8e3 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-c7a8f8e3:focus, input.data-v-c7a8f8e3:active, textarea.data-v-c7a8f8e3:focus, textarea.data-v-c7a8f8e3:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-c7a8f8e3 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.tui-conversation.data-v-c7a8f8e3 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-conversation-list.data-v-c7a8f8e3 {
|
||||
overflow: auto;
|
||||
}
|
||||
.tui-conversation-header.data-v-c7a8f8e3 {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.tui-conversation-header .list.data-v-c7a8f8e3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #F4F5F9;
|
||||
padding: 7px 0;
|
||||
}
|
||||
.tui-conversation-header .list-item.data-v-c7a8f8e3 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
position: relative;
|
||||
padding: 7px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.tui-conversation-header-item.data-v-c7a8f8e3 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-conversation-header-item-title.data-v-c7a8f8e3 {
|
||||
padding: 0 8px;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.tui-conversation-header-children.data-v-c7a8f8e3 {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
z-index: 3;
|
||||
padding: 7px 9px;
|
||||
border-bottom: none;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 3px 7px 0 #0003;
|
||||
flex-direction: column;
|
||||
}
|
||||
.network.data-v-c7a8f8e3 {
|
||||
padding: 0 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.network .icon-error.data-v-c7a8f8e3 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 15px;
|
||||
background: red;
|
||||
color: #fff;
|
||||
font-style: normal;
|
||||
}
|
||||
.network-content.data-v-c7a8f8e3 {
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.plus.data-v-c7a8f8e3 {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
.plus.data-v-c7a8f8e3::before,
|
||||
.plus.data-v-c7a8f8e3::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-color: #232832;
|
||||
border-radius: 0.5px;
|
||||
width: 1px;
|
||||
height: 14px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
}
|
||||
.plus.data-v-c7a8f8e3::after {
|
||||
transform: rotate(90deg);
|
||||
width: 0.5px;
|
||||
}
|
||||
.tui-conversation.data-v-c7a8f8e3 {
|
||||
background: #fff;
|
||||
}
|
||||
.network-content.data-v-c7a8f8e3 {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
color: #e54545;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
60
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-header/server.js
vendored
Normal file
60
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-header/server.js
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const TUIKit_utils_env = require("../../../utils/env.js");
|
||||
const common_assets = require("../../../../common/assets.js");
|
||||
const TUIKit_constant = require("../../../constant.js");
|
||||
class ConversationHeaderServer {
|
||||
static getInstance() {
|
||||
if (!ConversationHeaderServer.instance) {
|
||||
ConversationHeaderServer.instance = new ConversationHeaderServer();
|
||||
}
|
||||
return ConversationHeaderServer.instance;
|
||||
}
|
||||
getMenu() {
|
||||
const list = this.generateMenuList();
|
||||
if (!TUIKit_utils_env.isPC && list.length > 0) {
|
||||
return [{
|
||||
text: common_vendor.Wt.t("TUIConversation.发起会话"),
|
||||
data: {
|
||||
name: "all",
|
||||
children: list
|
||||
}
|
||||
}];
|
||||
}
|
||||
return list;
|
||||
}
|
||||
generateMenuList() {
|
||||
const list = [
|
||||
{
|
||||
icon: common_assets.C2C,
|
||||
text: common_vendor.Wt.t("TUIConversation.发起单聊"),
|
||||
data: {
|
||||
name: TUIKit_constant.CONV_CREATE_TYPE.TYPEC2C
|
||||
},
|
||||
listener: {
|
||||
onClicked: this.createConversation.bind(this)
|
||||
}
|
||||
},
|
||||
{
|
||||
icon: common_assets.createGroup,
|
||||
text: common_vendor.Wt.t("TUIConversation.发起群聊"),
|
||||
data: {
|
||||
name: TUIKit_constant.CONV_CREATE_TYPE.TYPEGROUP
|
||||
},
|
||||
listener: {
|
||||
onClicked: this.createConversation.bind(this)
|
||||
}
|
||||
}
|
||||
];
|
||||
return list;
|
||||
}
|
||||
createConversation(item) {
|
||||
common_vendor.R.callService({
|
||||
serviceName: common_vendor.E.TUIConversation.SERVICE.NAME,
|
||||
method: common_vendor.E.TUIConversation.SERVICE.METHOD.CREATE_CONVERSATION,
|
||||
params: item
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.ConversationHeaderServer = ConversationHeaderServer;
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/conversation-header/server.js.map
|
||||
216
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.js
vendored
Normal file
216
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.js
vendored
Normal file
@@ -0,0 +1,216 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
require("../../../adapter-vue.js");
|
||||
const common_assets = require("../../../../common/assets.js");
|
||||
const TUIKit_utils_env = require("../../../utils/env.js");
|
||||
if (!Math) {
|
||||
(ActionsMenu + Avatar + Icon)();
|
||||
}
|
||||
const Icon = () => "../../common/Icon.js";
|
||||
const Avatar = () => "../../common/Avatar/index.js";
|
||||
const ActionsMenu = () => "../actions-menu/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
emits: ["handleSwitchConversation", "getPassingRef"],
|
||||
setup(__props, { expose: __expose, emit: __emit }) {
|
||||
const emits = __emit;
|
||||
const currentConversation = common_vendor.ref();
|
||||
const currentConversationID = common_vendor.ref();
|
||||
const currentConversationDomRect = common_vendor.ref();
|
||||
const isShowOverlay = common_vendor.ref(false);
|
||||
const conversationList = common_vendor.ref([]);
|
||||
const conversationListDomRef = common_vendor.ref();
|
||||
const conversationListInnerDomRef = common_vendor.ref();
|
||||
const actionsMenuPosition = common_vendor.ref({
|
||||
top: 0,
|
||||
left: void 0,
|
||||
conversationHeight: void 0
|
||||
});
|
||||
const displayOnlineStatus = common_vendor.ref(false);
|
||||
const userOnlineStatusMap = common_vendor.ref();
|
||||
let lastestOpenActionsMenuTime = null;
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.Jt.watch(common_vendor.o.CONV, {
|
||||
currentConversationID: onCurrentConversationIDUpdated,
|
||||
conversationList: onConversationListUpdated,
|
||||
currentConversation: onCurrentConversationUpdated
|
||||
});
|
||||
common_vendor.Jt.watch(common_vendor.o.USER, {
|
||||
displayOnlineStatus: onDisplayOnlineStatusUpdated,
|
||||
userStatusList: onUserStatusListUpdated
|
||||
});
|
||||
if (!TUIKit_utils_env.isUniFrameWork && common_vendor.f$1 && !TUIKit_utils_env.isPC) {
|
||||
addLongPressHandler();
|
||||
}
|
||||
});
|
||||
common_vendor.onUnmounted(() => {
|
||||
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
|
||||
currentConversationID: onCurrentConversationIDUpdated,
|
||||
conversationList: onConversationListUpdated,
|
||||
currentConversation: onCurrentConversationUpdated
|
||||
});
|
||||
common_vendor.Jt.unwatch(common_vendor.o.USER, {
|
||||
displayOnlineStatus: onDisplayOnlineStatusUpdated,
|
||||
userStatusList: onUserStatusListUpdated
|
||||
});
|
||||
});
|
||||
const isShowUserOnlineStatus = (conversation) => {
|
||||
return displayOnlineStatus.value && conversation.type === common_vendor.qt.TYPES.CONV_C2C;
|
||||
};
|
||||
const showConversationActionMenu = (event, conversation, index, isContextMenuEvent) => {
|
||||
if (isContextMenuEvent) {
|
||||
event.preventDefault();
|
||||
if (TUIKit_utils_env.isUniFrameWork) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
currentConversation.value = conversation;
|
||||
lastestOpenActionsMenuTime = Date.now();
|
||||
getActionsMenuPosition(event, index);
|
||||
};
|
||||
const closeConversationActionMenu = () => {
|
||||
if (lastestOpenActionsMenuTime && Date.now() - lastestOpenActionsMenuTime > 300) {
|
||||
currentConversation.value = void 0;
|
||||
isShowOverlay.value = false;
|
||||
}
|
||||
};
|
||||
const getActionsMenuPosition = (event, index) => {
|
||||
var _a, _b;
|
||||
if (TUIKit_utils_env.isUniFrameWork) {
|
||||
if (typeof conversationListDomRef.value === "undefined") {
|
||||
emits("getPassingRef", conversationListDomRef);
|
||||
}
|
||||
const query = (_a = common_vendor.i) == null ? void 0 : _a.createSelectorQuery().in(conversationListDomRef.value);
|
||||
query.select(`#convlistitem-${index}`).boundingClientRect((data) => {
|
||||
if (data) {
|
||||
actionsMenuPosition.value = {
|
||||
// The uni-page-head of uni-h5 is not considered a member of the viewport, so the height of the head is manually increased.
|
||||
top: data.bottom + (TUIKit_utils_env.isH5 ? 44 : 0),
|
||||
// @ts-expect-error in uniapp event has touches property
|
||||
left: event.touches[0].pageX,
|
||||
conversationHeight: data.height
|
||||
};
|
||||
isShowOverlay.value = true;
|
||||
}
|
||||
}).exec();
|
||||
} else {
|
||||
const rect = ((_b = event.currentTarget || event.target) == null ? void 0 : _b.getBoundingClientRect()) || {};
|
||||
if (rect) {
|
||||
actionsMenuPosition.value = {
|
||||
top: rect.bottom,
|
||||
left: TUIKit_utils_env.isPC ? event.clientX : void 0,
|
||||
conversationHeight: rect.height
|
||||
};
|
||||
}
|
||||
isShowOverlay.value = true;
|
||||
}
|
||||
};
|
||||
const enterConversationChat = (conversationID) => {
|
||||
emits("handleSwitchConversation", conversationID);
|
||||
common_vendor.Xt.switchConversation(conversationID);
|
||||
};
|
||||
function addLongPressHandler() {
|
||||
if (!conversationListInnerDomRef.value) {
|
||||
return;
|
||||
}
|
||||
common_vendor.k({
|
||||
element: conversationListInnerDomRef.value,
|
||||
onLongPress: (event, target) => {
|
||||
const index = Array.from(conversationListInnerDomRef.value.children).indexOf(target);
|
||||
showConversationActionMenu(event, conversationList.value[index], index);
|
||||
},
|
||||
options: {
|
||||
eventDelegation: {
|
||||
subSelector: ".tui-conversation-content"
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function onCurrentConversationUpdated(conversation) {
|
||||
currentConversation.value = conversation;
|
||||
}
|
||||
function onConversationListUpdated(list) {
|
||||
conversationList.value = list;
|
||||
}
|
||||
function onCurrentConversationIDUpdated(id) {
|
||||
currentConversationID.value = id;
|
||||
}
|
||||
function onDisplayOnlineStatusUpdated(status) {
|
||||
displayOnlineStatus.value = status;
|
||||
}
|
||||
function onUserStatusListUpdated(list) {
|
||||
if (list.size !== 0) {
|
||||
userOnlineStatusMap.value = [...list.entries()].reduce(
|
||||
(obj, [key, value]) => {
|
||||
obj[key] = value;
|
||||
return obj;
|
||||
},
|
||||
{}
|
||||
);
|
||||
}
|
||||
}
|
||||
__expose({ closeChildren: closeConversationActionMenu });
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.unref(isShowOverlay)
|
||||
}, common_vendor.unref(isShowOverlay) ? {
|
||||
b: common_vendor.o$1(closeConversationActionMenu),
|
||||
c: common_vendor.p({
|
||||
selectedConversation: common_vendor.unref(currentConversation),
|
||||
actionsMenuPosition: common_vendor.unref(actionsMenuPosition),
|
||||
selectedConversationDomRect: common_vendor.unref(currentConversationDomRect)
|
||||
})
|
||||
} : {}, {
|
||||
d: common_vendor.f(common_vendor.unref(conversationList), (conversation, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: "4ef42c1d-1-" + i0,
|
||||
b: common_vendor.p({
|
||||
useSkeletonAnimation: true,
|
||||
url: conversation.getAvatar(),
|
||||
size: "30px"
|
||||
}),
|
||||
c: common_vendor.unref(userOnlineStatusMap) && isShowUserOnlineStatus(conversation)
|
||||
}, common_vendor.unref(userOnlineStatusMap) && isShowUserOnlineStatus(conversation) ? {
|
||||
d: common_vendor.n(Object.keys(common_vendor.unref(userOnlineStatusMap)).length > 0 && Object.keys(common_vendor.unref(userOnlineStatusMap)).includes(conversation.userProfile.userID) && common_vendor.unref(userOnlineStatusMap)[conversation.userProfile.userID].statusType === 1 ? "online-status-online" : "online-status-offline")
|
||||
} : {}, {
|
||||
e: conversation.unreadCount > 0 && !conversation.isMuted
|
||||
}, conversation.unreadCount > 0 && !conversation.isMuted ? {
|
||||
f: common_vendor.t(conversation.unreadCount > 99 ? "99+" : conversation.unreadCount)
|
||||
} : {}, {
|
||||
g: conversation.unreadCount > 0 && conversation.isMuted
|
||||
}, conversation.unreadCount > 0 && conversation.isMuted ? {} : {}, {
|
||||
h: common_vendor.t(conversation.getShowName()),
|
||||
i: conversation.draftText && conversation.conversationID !== common_vendor.unref(currentConversationID)
|
||||
}, conversation.draftText && conversation.conversationID !== common_vendor.unref(currentConversationID) ? {
|
||||
j: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.[草稿]"))
|
||||
} : conversation.type === "GROUP" && conversation.groupAtInfoList && conversation.groupAtInfoList.length > 0 ? {
|
||||
l: common_vendor.t(conversation.getGroupAtInfo())
|
||||
} : {}, {
|
||||
k: conversation.type === "GROUP" && conversation.groupAtInfoList && conversation.groupAtInfoList.length > 0,
|
||||
m: common_vendor.t(conversation.getLastMessage("text")),
|
||||
n: common_vendor.t(conversation.getLastMessage("time")),
|
||||
o: conversation.isMuted
|
||||
}, conversation.isMuted ? {
|
||||
p: "4ef42c1d-2-" + i0,
|
||||
q: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.muteIcon)
|
||||
})
|
||||
} : {}, {
|
||||
r: common_vendor.n(common_vendor.unref(currentConversationID) === conversation.conversationID && "tui-conversation-item-selected"),
|
||||
s: common_vendor.n(conversation.isPinned && "tui-conversation-item-pinned"),
|
||||
t: common_vendor.o$1(($event) => enterConversationChat(conversation.conversationID), index),
|
||||
v: common_vendor.o$1(($event) => showConversationActionMenu($event, conversation, index), index),
|
||||
w: common_vendor.o$1(($event) => showConversationActionMenu($event, conversation, index, true), index),
|
||||
x: `convlistitem-${index}`,
|
||||
y: index
|
||||
});
|
||||
}),
|
||||
e: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isPC) && "isPC"),
|
||||
f: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isMobile) && "tui-conversation-content-h5 disable-select")
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4ef42c1d"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.js.map
|
||||
8
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.json
vendored
Normal file
8
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../common/Icon",
|
||||
"avatar": "../../common/Avatar/index",
|
||||
"actions-menu": "../actions-menu/index"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view ref="conversationListInnerDomRef" class="tui-conversation-list data-v-4ef42c1d"><actions-menu wx:if="{{a}}" class="data-v-4ef42c1d" bindcloseConversationActionMenu="{{b}}" u-i="4ef42c1d-0" bind:__l="__l" u-p="{{c}}"/><view wx:for="{{d}}" wx:for-item="conversation" wx:key="y" id="{{conversation.x}}" class="{{['data-v-4ef42c1d', 'tui-conversation-content', f]}}"><view class="{{['data-v-4ef42c1d', e, 'tui-conversation-item', conversation.r, conversation.s]}}" bindtap="{{conversation.t}}" bindlongpress="{{conversation.v}}" bindcontextmenu="{{conversation.w}}"><view class="left data-v-4ef42c1d"><avatar wx:if="{{conversation.b}}" class="data-v-4ef42c1d" u-i="{{conversation.a}}" bind:__l="__l" u-p="{{conversation.b}}"/><view wx:if="{{conversation.c}}" class="{{['data-v-4ef42c1d', 'online-status', conversation.d]}}"/><label wx:if="{{conversation.e}}" class="num data-v-4ef42c1d">{{conversation.f}}</label><label wx:if="{{conversation.g}}" class="num-notify data-v-4ef42c1d"/></view><view class="content data-v-4ef42c1d"><view class="content-header data-v-4ef42c1d"><label class="content-header-label data-v-4ef42c1d"><view class="name data-v-4ef42c1d">{{conversation.h}}</view></label><view class="middle-box data-v-4ef42c1d"><label wx:if="{{conversation.i}}" class="middle-box-draft data-v-4ef42c1d">{{conversation.j}}</label><label wx:elif="{{conversation.k}}" class="middle-box-at data-v-4ef42c1d">{{conversation.l}}</label><view class="middle-box-content data-v-4ef42c1d">{{conversation.m}}</view></view></view><view class="content-footer data-v-4ef42c1d"><label class="time data-v-4ef42c1d">{{conversation.n}}</label><icon wx:if="{{conversation.o}}" class="data-v-4ef42c1d" u-i="{{conversation.p}}" bind:__l="__l" u-p="{{conversation.q}}"/></view></view></view></view></view>
|
||||
342
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.wxss
vendored
Normal file
342
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-list/index.wxss
vendored
Normal file
@@ -0,0 +1,342 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-4ef42c1d, div.data-v-4ef42c1d, ul.data-v-4ef42c1d, ol.data-v-4ef42c1d, dt.data-v-4ef42c1d, dd.data-v-4ef42c1d, li.data-v-4ef42c1d, dl.data-v-4ef42c1d, h1.data-v-4ef42c1d, h2.data-v-4ef42c1d, h3.data-v-4ef42c1d, h4.data-v-4ef42c1d, p.data-v-4ef42c1d {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-4ef42c1d, ul.data-v-4ef42c1d, li.data-v-4ef42c1d {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-4ef42c1d {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-4ef42c1d {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-4ef42c1d {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-4ef42c1d {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-4ef42c1d:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-4ef42c1d, textarea.data-v-4ef42c1d {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-4ef42c1d:focus, input.data-v-4ef42c1d:active, textarea.data-v-4ef42c1d:focus, textarea.data-v-4ef42c1d:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-4ef42c1d {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.tui-conversation-item-pinned.data-v-4ef42c1d {
|
||||
background: #eef0f3;
|
||||
}
|
||||
.tui-conversation-item-selected.data-v-4ef42c1d, .tui-conversation-item-toggled.data-v-4ef42c1d {
|
||||
background: rgba(0, 110, 255, 0.1);
|
||||
}
|
||||
.tui-conversation-item .left .num.data-v-4ef42c1d {
|
||||
background: red;
|
||||
color: #fff;
|
||||
}
|
||||
.tui-conversation-item .left .num-notify.data-v-4ef42c1d {
|
||||
background: red;
|
||||
color: #fff;
|
||||
}
|
||||
.tui-conversation-item .content-header-label.data-v-4ef42c1d {
|
||||
color: #000;
|
||||
}
|
||||
.tui-conversation-item .content-header .name.data-v-4ef42c1d {
|
||||
font-weight: 400;
|
||||
letter-spacing: 0;
|
||||
color: #000;
|
||||
}
|
||||
.tui-conversation-item .middle-box-at.data-v-4ef42c1d, .tui-conversation-item .middle-box-draft.data-v-4ef42c1d {
|
||||
color: #fb5059 !important;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
}
|
||||
.tui-conversation-item .middle-box-content.data-v-4ef42c1d {
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
.tui-conversation-item .content-footer.data-v-4ef42c1d {
|
||||
color: #999;
|
||||
}
|
||||
.tui-conversation-item .content-footer .time.data-v-4ef42c1d {
|
||||
color: #bbb;
|
||||
}
|
||||
.tui-conversation-content .dialog.data-v-4ef42c1d {
|
||||
background: #fff;
|
||||
}
|
||||
.tui-conversation-content .dialog-item.data-v-4ef42c1d {
|
||||
background: #fff;
|
||||
border: 1px solid #e0e0e0;
|
||||
box-shadow: 0 -4px 12px 0 rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
.tui-conversation-content .dialog .conversation-options.data-v-4ef42c1d {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
color: #4f4f4f;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
.tui-conversation-list.data-v-4ef42c1d {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
.tui-conversation-item.data-v-4ef42c1d {
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-conversation-item .left.data-v-4ef42c1d {
|
||||
position: relative;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
.tui-conversation-item .left .num.data-v-4ef42c1d {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
right: 0;
|
||||
top: -5px;
|
||||
min-width: 10px;
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
padding: 0 2.5px;
|
||||
height: 15px;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
line-height: 15px;
|
||||
border-radius: 7.5px;
|
||||
}
|
||||
.tui-conversation-item .left .num-notify.data-v-4ef42c1d {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
right: 2px;
|
||||
top: -2px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
line-height: 15px;
|
||||
border-radius: 65%;
|
||||
}
|
||||
.tui-conversation-item .left .avatar.data-v-4ef42c1d {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.tui-conversation-item .left .online-status.data-v-4ef42c1d {
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
left: 24px;
|
||||
top: 22px;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 50%;
|
||||
}
|
||||
.tui-conversation-item .left .online-status-online.data-v-4ef42c1d {
|
||||
background: #29cc85;
|
||||
}
|
||||
.tui-conversation-item .left .online-status-offline.data-v-4ef42c1d {
|
||||
background: #a4a4a4;
|
||||
}
|
||||
.tui-conversation-item .content-footer.data-v-4ef42c1d {
|
||||
line-height: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-conversation-item .content-footer .time.data-v-4ef42c1d {
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tui-conversation-item .content.data-v-4ef42c1d {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
padding-left: 8px;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-conversation-item .content .content-footer.data-v-4ef42c1d {
|
||||
align-items: flex-end;
|
||||
}
|
||||
.tui-conversation-item .content .content-footer .icon.data-v-4ef42c1d {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 0;
|
||||
}
|
||||
.tui-conversation-item .content-header.data-v-4ef42c1d {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.tui-conversation-item .content-header-label.data-v-4ef42c1d {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
}
|
||||
.tui-conversation-item .content-header .name.data-v-4ef42c1d {
|
||||
width: 110px;
|
||||
letter-spacing: 0;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tui-conversation-item .content-header .middle-box.data-v-4ef42c1d {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-conversation-item .content-header .middle-box-at.data-v-4ef42c1d, .tui-conversation-item .content-header .middle-box-draft.data-v-4ef42c1d {
|
||||
font-size: 12px;
|
||||
}
|
||||
.tui-conversation-item .content-header .middle-box-content.data-v-4ef42c1d {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
}
|
||||
.tui-conversation-item-content.data-v-4ef42c1d {
|
||||
position: relative;
|
||||
}
|
||||
.tui-conversation-item-content .tui-conversation-item.data-v-4ef42c1d:hover {
|
||||
background: rgba(0, 110, 255, 0.1);
|
||||
}
|
||||
.tui-conversation-item-content .dialog.data-v-4ef42c1d {
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
padding: 2px 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tui-conversation-item-content .dialog-item.data-v-4ef42c1d {
|
||||
top: 30px;
|
||||
left: 164px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.tui-conversation-item-content .dialog .conversation-options.data-v-4ef42c1d {
|
||||
padding: 5px 0;
|
||||
height: 17px;
|
||||
font-size: 12px;
|
||||
line-height: 17px;
|
||||
}
|
||||
.tui-conversation-item-content .dialog-item-up.data-v-4ef42c1d {
|
||||
top: -50px;
|
||||
}
|
||||
.tui-conversation-list-h5 .tui-conversation-content .dialog.data-v-4ef42c1d {
|
||||
left: auto;
|
||||
right: 18px;
|
||||
padding: 0;
|
||||
}
|
||||
.tui-conversation-list-h5 .tui-conversation-content .dialog .conversation-options.data-v-4ef42c1d {
|
||||
padding: 12px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.tui-conversation-list-h5 .tui-conversation-content .dialog-item-up.data-v-4ef42c1d {
|
||||
top: -70px;
|
||||
}
|
||||
.tui-conversation-list-h5 .tui-conversation-content .tui-conversation-item.data-v-4ef42c1d {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.tui-conversation-list-h5 .tui-conversation-content .tui-conversation-item .content .name.data-v-4ef42c1d {
|
||||
font-size: 16px;
|
||||
}
|
||||
.tui-conversation-list-h5 .tui-conversation-content .tui-conversation-item .content .middle-box p.data-v-4ef42c1d {
|
||||
font-size: 14px;
|
||||
}
|
||||
.tui-conversation-list-h5 .tui-conversation-content .tui-conversation-item .time.data-v-4ef42c1d {
|
||||
font-size: 14px;
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.disable-select.data-v-4ef42c1d {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
24
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-network/index.js
vendored
Normal file
24
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-network/index.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
require("../../../adapter-vue.js");
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const isNotNetwork = common_vendor.ref(false);
|
||||
common_vendor.Jt.watch(common_vendor.o.USER, {
|
||||
netStateChange: (value) => {
|
||||
isNotNetwork.value = value === common_vendor.qt.TYPES.NET_STATE_DISCONNECTED;
|
||||
}
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.unref(isNotNetwork)
|
||||
}, common_vendor.unref(isNotNetwork) ? {
|
||||
b: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIConversation.网络异常,请您检查网络设置"))
|
||||
} : {});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-36a06860"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/conversation-network/index.js.map
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view wx:if="{{a}}" class="network data-v-36a06860"><view class="icon icon-error data-v-36a06860">!</view><view class="network-content data-v-36a06860">{{b}}</view></view>
|
||||
179
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-network/index.wxss
vendored
Normal file
179
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/conversation-network/index.wxss
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-36a06860, div.data-v-36a06860, ul.data-v-36a06860, ol.data-v-36a06860, dt.data-v-36a06860, dd.data-v-36a06860, li.data-v-36a06860, dl.data-v-36a06860, h1.data-v-36a06860, h2.data-v-36a06860, h3.data-v-36a06860, h4.data-v-36a06860, p.data-v-36a06860 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-36a06860, ul.data-v-36a06860, li.data-v-36a06860 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-36a06860 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-36a06860 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-36a06860 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-36a06860 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-36a06860:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-36a06860, textarea.data-v-36a06860 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-36a06860:focus, input.data-v-36a06860:active, textarea.data-v-36a06860:focus, textarea.data-v-36a06860:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-36a06860 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.tui-conversation.data-v-36a06860 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-conversation-list.data-v-36a06860 {
|
||||
overflow: auto;
|
||||
}
|
||||
.tui-conversation-header.data-v-36a06860 {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.tui-conversation-header .list.data-v-36a06860 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #F4F5F9;
|
||||
padding: 7px 0;
|
||||
}
|
||||
.tui-conversation-header .list-item.data-v-36a06860 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
position: relative;
|
||||
padding: 7px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.tui-conversation-header-item.data-v-36a06860 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-conversation-header-item-title.data-v-36a06860 {
|
||||
padding: 0 8px;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.tui-conversation-header-children.data-v-36a06860 {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
z-index: 3;
|
||||
padding: 7px 9px;
|
||||
border-bottom: none;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 3px 7px 0 #0003;
|
||||
flex-direction: column;
|
||||
}
|
||||
.network.data-v-36a06860 {
|
||||
padding: 0 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.network .icon-error.data-v-36a06860 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 15px;
|
||||
background: red;
|
||||
color: #fff;
|
||||
font-style: normal;
|
||||
}
|
||||
.network-content.data-v-36a06860 {
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.plus.data-v-36a06860 {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
.plus.data-v-36a06860::before,
|
||||
.plus.data-v-36a06860::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-color: #232832;
|
||||
border-radius: 0.5px;
|
||||
width: 1px;
|
||||
height: 14px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
}
|
||||
.plus.data-v-36a06860::after {
|
||||
transform: rotate(90deg);
|
||||
width: 0.5px;
|
||||
}
|
||||
.tui-conversation.data-v-36a06860 {
|
||||
background: #fff;
|
||||
}
|
||||
.network-content.data-v-36a06860 {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
color: #e54545;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
5
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/entry.js
vendored
Normal file
5
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/entry.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
var _a;
|
||||
const TUIKit_index = require("../../index.js");
|
||||
(_a = TUIKit_index.TUIChatKit) == null ? void 0 : _a.init();
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/entry.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/index.js
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/index.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
const TUIKit_components_index = require("../index.js");
|
||||
wx.createPage(TUIKit_components_index.MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/index.js.map
|
||||
9
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/index.json
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/index.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "腾讯云 IM",
|
||||
"usingComponents": {
|
||||
"t-u-i-search": "../TUISearch/index",
|
||||
"conversation-list": "./conversation-list/index",
|
||||
"conversation-header": "./conversation-header/index",
|
||||
"conversation-network": "./conversation-network/index"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="tui-conversation data-v-40b33296" bindtap="{{g}}" bindtouchstart="{{h}}" bindtouchend="{{i}}"><t-u-i-search wx:if="{{a}}" class="data-v-40b33296" u-i="40b33296-0" bind:__l="__l" u-p="{{a}}"/><conversation-header wx:if="{{b}}" class="r data-v-40b33296" u-r="headerRef" u-i="40b33296-1" bind:__l="__l"/><conversation-network class="data-v-40b33296" u-i="40b33296-2" bind:__l="__l"/><conversation-list u-r="conversationListDomRef" class="tui-conversation-list r data-v-40b33296" bindhandleSwitchConversation="{{e}}" bindgetPassingRef="{{f}}" u-i="40b33296-3" bind:__l="__l"/></view>
|
||||
615
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/index.wxss
vendored
Normal file
615
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/index.wxss
vendored
Normal file
@@ -0,0 +1,615 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-04dfedea, div.data-v-04dfedea, ul.data-v-04dfedea, ol.data-v-04dfedea, dt.data-v-04dfedea, dd.data-v-04dfedea, li.data-v-04dfedea, dl.data-v-04dfedea, h1.data-v-04dfedea, h2.data-v-04dfedea, h3.data-v-04dfedea, h4.data-v-04dfedea, p.data-v-04dfedea {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-04dfedea, ul.data-v-04dfedea, li.data-v-04dfedea {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-04dfedea {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-04dfedea {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-04dfedea {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-04dfedea {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-04dfedea:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-04dfedea, textarea.data-v-04dfedea {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-04dfedea:focus, input.data-v-04dfedea:active, textarea.data-v-04dfedea:focus, textarea.data-v-04dfedea:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-04dfedea {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.tui-chat.data-v-04dfedea {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
}
|
||||
.tui-chat-default.data-v-04dfedea {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
.tui-chat-header.data-v-04dfedea {
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
.tui-chat-message-list.data-v-04dfedea {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
}
|
||||
.tui-chat-leave-group.data-v-04dfedea {
|
||||
font-size: 14px;
|
||||
height: 160px;
|
||||
border-top: 1px solid #efefef;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-chat-leave-group-mobile.data-v-04dfedea {
|
||||
height: 50px;
|
||||
}
|
||||
.tui-chat-message-input.data-v-04dfedea {
|
||||
height: 160px;
|
||||
display: flex;
|
||||
}
|
||||
.chat.data-v-04dfedea {
|
||||
display: block;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-chat-h5-message-list.data-v-04dfedea {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
}
|
||||
.tui-chat-h5-message-input.data-v-04dfedea {
|
||||
height: auto;
|
||||
padding: 10px 10px 0;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
.tui-chat-h5-message-input-toolbar.data-v-04dfedea {
|
||||
order: 1;
|
||||
border: none;
|
||||
}
|
||||
.tui-chat-uniapp-header.data-v-04dfedea {
|
||||
display: none;
|
||||
}
|
||||
.group-profile.data-v-04dfedea {
|
||||
position: absolute;
|
||||
top: 14%;
|
||||
right: 0;
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
color: #000;
|
||||
font-size: 10px;
|
||||
border-top-left-radius: 20px;
|
||||
border-bottom-left-radius: 20px;
|
||||
padding-left: 15px;
|
||||
z-index: 100;
|
||||
background-color: #ccc;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.tui-chat-uni-message-input.data-v-04dfedea {
|
||||
max-height: 370px;
|
||||
padding: 10px;
|
||||
}
|
||||
.tui-chat-uni-message-input-toolbar.data-v-04dfedea {
|
||||
z-index: 100;
|
||||
}
|
||||
.tui-chat-wx-message-input.data-v-04dfedea {
|
||||
padding: 0;
|
||||
}
|
||||
.data-v-04dfedea:not(not) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
min-width: 0;
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-fdde69b1, div.data-v-fdde69b1, ul.data-v-fdde69b1, ol.data-v-fdde69b1, dt.data-v-fdde69b1, dd.data-v-fdde69b1, li.data-v-fdde69b1, dl.data-v-fdde69b1, h1.data-v-fdde69b1, h2.data-v-fdde69b1, h3.data-v-fdde69b1, h4.data-v-fdde69b1, p.data-v-fdde69b1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-fdde69b1, ul.data-v-fdde69b1, li.data-v-fdde69b1 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-fdde69b1 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-fdde69b1 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-fdde69b1 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-fdde69b1 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-fdde69b1:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-fdde69b1, textarea.data-v-fdde69b1 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-fdde69b1:focus, input.data-v-fdde69b1:active, textarea.data-v-fdde69b1:focus, textarea.data-v-fdde69b1:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-fdde69b1 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.tui-search-main-global.data-v-fdde69b1 {
|
||||
width: 100%;
|
||||
height: -webkit-fit-content;
|
||||
height: fit-content;
|
||||
}
|
||||
.tui-search-main-conversation.data-v-fdde69b1 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 10px 0 rgba(2, 16, 43, 0.15);
|
||||
}
|
||||
.tui-search .tui-search-global-header.data-v-fdde69b1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-search .tui-search-conversation.data-v-fdde69b1 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-search-h5-full-screen.data-v-fdde69b1 {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 1000;
|
||||
background: #fff;
|
||||
}
|
||||
.tui-search-h5-global.data-v-fdde69b1, .tui-search-h5-conversation.data-v-fdde69b1 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-search-h5-conversation.data-v-fdde69b1 {
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-search-h5.tui-search-main-conversation.data-v-fdde69b1 {
|
||||
box-shadow: none;
|
||||
}
|
||||
.tui-search-h5 .search-input.data-v-fdde69b1,
|
||||
.tui-search-h5 .search-container.data-v-fdde69b1,
|
||||
.tui-search-h5 .search-result.data-v-fdde69b1 {
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-32d81a7d, div.data-v-32d81a7d, ul.data-v-32d81a7d, ol.data-v-32d81a7d, dt.data-v-32d81a7d, dd.data-v-32d81a7d, li.data-v-32d81a7d, dl.data-v-32d81a7d, h1.data-v-32d81a7d, h2.data-v-32d81a7d, h3.data-v-32d81a7d, h4.data-v-32d81a7d, p.data-v-32d81a7d {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-32d81a7d, ul.data-v-32d81a7d, li.data-v-32d81a7d {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-32d81a7d {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-32d81a7d {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-32d81a7d {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-32d81a7d {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-32d81a7d:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-32d81a7d, textarea.data-v-32d81a7d {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-32d81a7d:focus, input.data-v-32d81a7d:active, textarea.data-v-32d81a7d:focus, textarea.data-v-32d81a7d:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-32d81a7d {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.tui-contact.data-v-32d81a7d {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-contact-left.data-v-32d81a7d {
|
||||
min-width: 285px;
|
||||
flex: 0 0 24%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-contact-right.data-v-32d81a7d {
|
||||
border-left: 1px solid #f4f5f9;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-contact-h5.data-v-32d81a7d {
|
||||
position: relative;
|
||||
}
|
||||
.tui-contact-h5-left.data-v-32d81a7d, .tui-contact-h5-right.data-v-32d81a7d {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
.tui-contact-h5-right.data-v-32d81a7d {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
}
|
||||
.tui-contact-h5-left-list.data-v-32d81a7d {
|
||||
overflow-y: auto;
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.tui-group.data-v-61238656 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-40b33296, div.data-v-40b33296, ul.data-v-40b33296, ol.data-v-40b33296, dt.data-v-40b33296, dd.data-v-40b33296, li.data-v-40b33296, dl.data-v-40b33296, h1.data-v-40b33296, h2.data-v-40b33296, h3.data-v-40b33296, h4.data-v-40b33296, p.data-v-40b33296 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-40b33296, ul.data-v-40b33296, li.data-v-40b33296 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-40b33296 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-40b33296 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-40b33296 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-40b33296 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-40b33296:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-40b33296, textarea.data-v-40b33296 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-40b33296:focus, input.data-v-40b33296:active, textarea.data-v-40b33296:focus, textarea.data-v-40b33296:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-40b33296 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.tui-conversation.data-v-40b33296 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-conversation-list.data-v-40b33296 {
|
||||
overflow: auto;
|
||||
}
|
||||
.tui-conversation-header.data-v-40b33296 {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.tui-conversation-header .list.data-v-40b33296 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #F4F5F9;
|
||||
padding: 7px 0;
|
||||
}
|
||||
.tui-conversation-header .list-item.data-v-40b33296 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
position: relative;
|
||||
padding: 7px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.tui-conversation-header-item.data-v-40b33296 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-conversation-header-item-title.data-v-40b33296 {
|
||||
padding: 0 8px;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.tui-conversation-header-children.data-v-40b33296 {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
z-index: 3;
|
||||
padding: 7px 9px;
|
||||
border-bottom: none;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 3px 7px 0 #0003;
|
||||
flex-direction: column;
|
||||
}
|
||||
.network.data-v-40b33296 {
|
||||
padding: 0 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.network .icon-error.data-v-40b33296 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 15px;
|
||||
background: red;
|
||||
color: #fff;
|
||||
font-style: normal;
|
||||
}
|
||||
.network-content.data-v-40b33296 {
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.plus.data-v-40b33296 {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
.plus.data-v-40b33296::before,
|
||||
.plus.data-v-40b33296::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-color: #232832;
|
||||
border-radius: 0.5px;
|
||||
width: 1px;
|
||||
height: 14px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
}
|
||||
.plus.data-v-40b33296::after {
|
||||
transform: rotate(90deg);
|
||||
width: 0.5px;
|
||||
}
|
||||
.tui-conversation.data-v-40b33296 {
|
||||
background: #fff;
|
||||
}
|
||||
.network-content.data-v-40b33296 {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
color: #e54545;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
138
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/server.js
vendored
Normal file
138
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIConversation/server.js
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const TUIKit_constant = require("../../constant.js");
|
||||
const TUIKit_utils_env = require("../../utils/env.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const TUIKit_utils_enableSampleTaskStatus = require("../../utils/enableSampleTaskStatus.js");
|
||||
class TUIConversationServer {
|
||||
constructor() {
|
||||
this.hideConversationHeader = () => {
|
||||
common_vendor.Jt.update(common_vendor.o.CUSTOM, "isShowConversationHeader", false);
|
||||
};
|
||||
common_vendor.R.registerService(common_vendor.E.TUIConversation.SERVICE.NAME, this);
|
||||
common_vendor.R.registerExtension(common_vendor.E.TUISearch.EXTENSION.SEARCH_MORE.EXT_ID, this);
|
||||
this.onCallParamsMap = /* @__PURE__ */ new Map();
|
||||
this.onCallCallbackMap = /* @__PURE__ */ new Map();
|
||||
this.constants = common_vendor.E;
|
||||
}
|
||||
static getInstance() {
|
||||
if (!TUIConversationServer.instance) {
|
||||
TUIConversationServer.instance = new TUIConversationServer();
|
||||
}
|
||||
return TUIConversationServer.instance;
|
||||
}
|
||||
getOnCallParams(method) {
|
||||
return this.onCallParamsMap.get(method);
|
||||
}
|
||||
getOnCallCallback(method) {
|
||||
return this.onCallCallbackMap.get(method);
|
||||
}
|
||||
onCall(method, params, callback) {
|
||||
this.onCallParamsMap.set(method, params);
|
||||
this.onCallCallbackMap.set(method, callback);
|
||||
switch (method) {
|
||||
case common_vendor.E.TUIConversation.SERVICE.METHOD.CREATE_CONVERSATION:
|
||||
this.createConversation(params);
|
||||
break;
|
||||
case common_vendor.E.TUIConversation.SERVICE.METHOD.HIDE_CONVERSATION_HEADER:
|
||||
this.hideConversationHeader();
|
||||
break;
|
||||
}
|
||||
}
|
||||
onGetExtension(extensionID) {
|
||||
if (extensionID === common_vendor.E.TUISearch.EXTENSION.SEARCH_MORE.EXT_ID) {
|
||||
const list = [
|
||||
{
|
||||
weight: 100,
|
||||
icon: common_assets.C2C,
|
||||
text: common_vendor.Wt.t("TUIConversation.发起单聊"),
|
||||
data: {
|
||||
name: TUIKit_constant.CONV_CREATE_TYPE.TYPEC2C
|
||||
},
|
||||
listener: {
|
||||
onClicked: this.createConversation.bind(this)
|
||||
}
|
||||
},
|
||||
{
|
||||
weight: 100,
|
||||
icon: common_assets.createGroup,
|
||||
text: common_vendor.Wt.t("TUIConversation.发起群聊"),
|
||||
data: {
|
||||
name: TUIKit_constant.CONV_CREATE_TYPE.TYPEGROUP
|
||||
},
|
||||
listener: {
|
||||
onClicked: this.createConversation.bind(this)
|
||||
}
|
||||
}
|
||||
];
|
||||
return list;
|
||||
}
|
||||
}
|
||||
createConversation(item) {
|
||||
common_vendor.R.callService({
|
||||
serviceName: common_vendor.E.TUIContact.SERVICE.NAME,
|
||||
method: common_vendor.E.TUIContact.SERVICE.METHOD.SELECT_FRIEND,
|
||||
params: {
|
||||
title: item.text,
|
||||
isRadio: item.data.name !== TUIKit_constant.CONV_CREATE_TYPE.TYPEGROUP,
|
||||
isNeedSearch: !common_vendor.Jt.getData(common_vendor.o.APP, "isOfficial")
|
||||
},
|
||||
callback: async (memberList) => {
|
||||
if (!memberList || memberList.length === 0) {
|
||||
return this.routerForward(null);
|
||||
}
|
||||
if (item.data.name === TUIKit_constant.CONV_CREATE_TYPE.TYPEGROUP) {
|
||||
this.createGroup(memberList);
|
||||
} else {
|
||||
const { userID } = memberList[0];
|
||||
await this.generateConversation(`C2C${userID}`);
|
||||
this.routerForward(`C2C${userID}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
createGroup(memberList) {
|
||||
common_vendor.R.callService({
|
||||
serviceName: common_vendor.E.TUIGroup.SERVICE.NAME,
|
||||
method: common_vendor.E.TUIGroup.SERVICE.METHOD.CREATE_GROUP,
|
||||
params: {
|
||||
title: common_vendor.Wt.t("TUIConversation.发起群聊"),
|
||||
memberList
|
||||
},
|
||||
callback: async (group) => {
|
||||
let conversationID = null;
|
||||
if (group) {
|
||||
const { groupID } = group;
|
||||
await this.generateConversation(`GROUP${groupID}`);
|
||||
conversationID = `GROUP${groupID}`;
|
||||
}
|
||||
this.routerForward(conversationID);
|
||||
}
|
||||
});
|
||||
}
|
||||
async routerForward(conversationID) {
|
||||
var _a, _b;
|
||||
if (TUIKit_utils_env.isUniFrameWork) {
|
||||
await ((_a = common_vendor.i) == null ? void 0 : _a.reLaunch({
|
||||
url: "/TUIKit/components/TUIConversation/index"
|
||||
}));
|
||||
if (conversationID) {
|
||||
(_b = common_vendor.i) == null ? void 0 : _b.navigateTo({
|
||||
url: "/TUIKit/components/TUIChat/index"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
generateConversation(conversationID) {
|
||||
common_vendor.Xt.switchConversation(conversationID).then(() => {
|
||||
if (conversationID.startsWith("GROUP")) {
|
||||
TUIKit_utils_enableSampleTaskStatus.enableSampleTaskStatus("groupChat");
|
||||
}
|
||||
common_vendor.index.__f__("warn", "at TUIKit/components/TUIConversation/server.ts:153", "打开会话成功");
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("warn", "at TUIKit/components/TUIConversation/server.ts:156", "打开会话失败", err.code, err.msg);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.TUIConversationServer = TUIConversationServer;
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUIConversation/server.js.map
|
||||
Reference in New Issue
Block a user