消息
This commit is contained in:
@@ -0,0 +1,150 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const common_assets = require("../../../../../common/assets.js");
|
||||
const TUIKit_constant = require("../../../../constant.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
|
||||
const TUIKit_components_TUIChat_emojiConfig_index = require("../../emoji-config/index.js");
|
||||
const TUIKit_components_TUIChat_config = require("../../config.js");
|
||||
if (!Math) {
|
||||
Icon();
|
||||
}
|
||||
const Icon = () => "../../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "emoji-picker-dialog",
|
||||
emits: ["insertEmoji", "onClose", "sendMessage"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
var _a;
|
||||
const faceIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.faceIconDark : common_assets.faceIconLight;
|
||||
const emits = __emit;
|
||||
const currentTabIndex = common_vendor.ref(0);
|
||||
const currentConversation = common_vendor.ref();
|
||||
common_vendor.ref();
|
||||
const emojiPickerListRef = common_vendor.ref();
|
||||
const featureConfig = TUIKit_components_TUIChat_config.ChatConfig.getFeatureConfig();
|
||||
const list = common_vendor.ref(initEmojiList());
|
||||
const currentTabItem = common_vendor.ref(list == null ? void 0 : list.value[0]);
|
||||
const currentEmojiList = common_vendor.ref((_a = list == null ? void 0 : list.value[0]) == null ? void 0 : _a.list);
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.Jt.watch(common_vendor.o.CONV, {
|
||||
currentConversation: onCurrentConversationUpdate
|
||||
});
|
||||
});
|
||||
common_vendor.onUnmounted(() => {
|
||||
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
|
||||
currentConversation: onCurrentConversationUpdate
|
||||
});
|
||||
});
|
||||
const toggleEmojiTab = (index) => {
|
||||
var _a2;
|
||||
currentTabIndex.value = index;
|
||||
currentTabItem.value = list == null ? void 0 : list.value[index];
|
||||
currentEmojiList.value = (_a2 = list == null ? void 0 : list.value[index]) == null ? void 0 : _a2.list;
|
||||
if (!TUIKit_utils_env.isUniFrameWork) {
|
||||
(emojiPickerListRef == null ? void 0 : emojiPickerListRef.value) && (emojiPickerListRef.value.scrollTop = 0);
|
||||
}
|
||||
};
|
||||
const select = (item, index) => {
|
||||
var _a2, _b, _c;
|
||||
const options = {
|
||||
emoji: { key: item, name: TUIKit_components_TUIChat_emojiConfig_index.convertKeyToEmojiName(item) },
|
||||
type: (_a2 = currentTabItem == null ? void 0 : currentTabItem.value) == null ? void 0 : _a2.type
|
||||
};
|
||||
switch ((_b = currentTabItem == null ? void 0 : currentTabItem.value) == null ? void 0 : _b.type) {
|
||||
case TUIKit_constant.EMOJI_TYPE.BASIC:
|
||||
options.url = ((_c = currentTabItem == null ? void 0 : currentTabItem.value) == null ? void 0 : _c.url) + TUIKit_components_TUIChat_emojiConfig_index.BASIC_EMOJI_URL_MAPPING[item];
|
||||
if (TUIKit_utils_env.isUniFrameWork) {
|
||||
common_vendor.index.$emit("insert-emoji", options);
|
||||
} else {
|
||||
emits("insertEmoji", options);
|
||||
}
|
||||
break;
|
||||
case TUIKit_constant.EMOJI_TYPE.BIG:
|
||||
sendFaceMessage(index, currentTabItem.value);
|
||||
break;
|
||||
case TUIKit_constant.EMOJI_TYPE.CUSTOM:
|
||||
sendFaceMessage(index, currentTabItem.value);
|
||||
break;
|
||||
}
|
||||
TUIKit_utils_env.isPC && emits("onClose");
|
||||
};
|
||||
const sendFaceMessage = (index, listItem) => {
|
||||
var _a2, _b, _c, _d, _e;
|
||||
const options = {
|
||||
to: ((_b = (_a2 = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a2.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
|
||||
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
|
||||
payload: {
|
||||
index: listItem.emojiGroupID,
|
||||
data: listItem.list[index]
|
||||
},
|
||||
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
|
||||
};
|
||||
common_vendor.Qt.sendFaceMessage(options);
|
||||
};
|
||||
function sendMessage() {
|
||||
common_vendor.index.$emit("send-message-in-emoji-picker");
|
||||
}
|
||||
function onCurrentConversationUpdate(conversation) {
|
||||
currentConversation.value = conversation;
|
||||
}
|
||||
function initEmojiList() {
|
||||
return TUIKit_components_TUIChat_emojiConfig_index.EMOJI_GROUP_LIST.filter((item) => {
|
||||
if (item.type === TUIKit_constant.EMOJI_TYPE.BASIC) {
|
||||
return featureConfig.InputEmoji;
|
||||
}
|
||||
if (item.type === TUIKit_constant.EMOJI_TYPE.BIG) {
|
||||
return featureConfig.InputStickers;
|
||||
}
|
||||
if (item.type === TUIKit_constant.EMOJI_TYPE.CUSTOM) {
|
||||
return featureConfig.InputStickers;
|
||||
}
|
||||
});
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f(common_vendor.unref(currentEmojiList), (childrenItem, childrenIndex, i0) => {
|
||||
return common_vendor.e(common_vendor.unref(currentTabItem).type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BASIC ? {
|
||||
a: common_vendor.unref(currentTabItem).url + common_vendor.unref(TUIKit_components_TUIChat_emojiConfig_index.BASIC_EMOJI_URL_MAPPING)[childrenItem]
|
||||
} : common_vendor.unref(currentTabItem).type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BIG ? {
|
||||
b: common_vendor.unref(currentTabItem).url + childrenItem + "@2x.png"
|
||||
} : {
|
||||
c: common_vendor.unref(currentTabItem).url + childrenItem
|
||||
}, {
|
||||
d: childrenIndex,
|
||||
e: common_vendor.o$1(($event) => select(childrenItem, childrenIndex), childrenIndex)
|
||||
});
|
||||
}),
|
||||
b: common_vendor.unref(currentTabItem).type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BASIC,
|
||||
c: common_vendor.unref(currentTabItem).type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BIG,
|
||||
d: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "emoji-picker-h5-list"),
|
||||
e: common_vendor.f(common_vendor.unref(list), (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BASIC
|
||||
}, item.type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BASIC ? {
|
||||
b: "194fb307-0-" + i0,
|
||||
c: common_vendor.p({
|
||||
file: common_vendor.unref(faceIcon)
|
||||
})
|
||||
} : item.type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BIG ? {
|
||||
e: item.url + item.list[0] + "@2x.png"
|
||||
} : {
|
||||
f: item.url + item.list[0]
|
||||
}, {
|
||||
d: item.type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BIG,
|
||||
g: index,
|
||||
h: common_vendor.o$1(($event) => toggleEmojiTab(index), index)
|
||||
});
|
||||
}),
|
||||
f: common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
|
||||
}, common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {
|
||||
g: common_vendor.o$1(sendMessage)
|
||||
} : {}, {
|
||||
h: !common_vendor.unref(TUIKit_utils_env.isPC) ? 1 : ""
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-194fb307"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/emoji-picker/emoji-picker-dialog.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../../common/Icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view ref="emojiPickerDialog" class="{{['data-v-194fb307', 'emoji-picker', h && 'emoji-picker-h5']}}"><view ref="emojiPickerListRef" class="{{['data-v-194fb307', 'emoji-picker-list', d]}}"><view wx:for="{{a}}" wx:for-item="childrenItem" wx:key="d" class="emoji-picker-list-item data-v-194fb307" bindtap="{{childrenItem.e}}"><image wx:if="{{b}}" class="emoji data-v-194fb307" src="{{childrenItem.a}}"></image><image wx:elif="{{c}}" class="emoji-big data-v-194fb307" src="{{childrenItem.b}}"></image><image wx:else class="emoji-custom emoji-big data-v-194fb307" src="{{childrenItem.c}}"></image></view></view><view class="emoji-picker-tab data-v-194fb307"><view wx:for="{{e}}" wx:for-item="item" wx:key="g" class="emoji-picker-tab-item data-v-194fb307" bindtap="{{item.h}}"><icon wx:if="{{item.a}}" class="icon data-v-194fb307" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"/><image wx:elif="{{item.d}}" class="icon-big data-v-194fb307" src="{{item.e}}"></image><image wx:else class="icon-custom icon-big data-v-194fb307" src="{{item.f}}"></image></view><view wx:if="{{f}}" class="send-btn data-v-194fb307" bindtap="{{g}}"> 发送 </view></view></view>
|
||||
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-194fb307, div.data-v-194fb307, ul.data-v-194fb307, ol.data-v-194fb307, dt.data-v-194fb307, dd.data-v-194fb307, li.data-v-194fb307, dl.data-v-194fb307, h1.data-v-194fb307, h2.data-v-194fb307, h3.data-v-194fb307, h4.data-v-194fb307, p.data-v-194fb307 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-194fb307, ul.data-v-194fb307, li.data-v-194fb307 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-194fb307 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-194fb307 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-194fb307 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-194fb307 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-194fb307:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-194fb307, textarea.data-v-194fb307 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-194fb307:focus, input.data-v-194fb307:active, textarea.data-v-194fb307:focus, textarea.data-v-194fb307:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-194fb307 {
|
||||
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);
|
||||
}
|
||||
.emoji-picker.data-v-194fb307 {
|
||||
width: 405px;
|
||||
height: 300px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.emoji-picker-list.data-v-194fb307 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
overflow-y: auto;
|
||||
margin: 2px;
|
||||
}
|
||||
.emoji-picker-list.data-v-194fb307::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.emoji-picker-list-item.data-v-194fb307 {
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
}
|
||||
.emoji-picker-list-item .emoji.data-v-194fb307 {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.emoji-picker-list-item .emoji-big.data-v-194fb307 {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
.emoji-picker-tab.data-v-194fb307 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.emoji-picker-tab-item.data-v-194fb307 {
|
||||
padding: 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.emoji-picker-tab-item .icon.data-v-194fb307 {
|
||||
margin: 10px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.emoji-picker-tab-item .icon-big.data-v-194fb307 {
|
||||
margin: 2px 0;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.emoji-picker-h5.data-v-194fb307 {
|
||||
width: 100%;
|
||||
}
|
||||
.emoji-picker-h5-list.data-v-194fb307 {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.emoji-picker-h5-list.data-v-194fb307::after {
|
||||
content: "";
|
||||
display: block;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
.emoji-picker-h5 .send-btn.data-v-194fb307 {
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
background-color: #55C06A;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
}
|
||||
168
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/evaluate/index.js
vendored
Normal file
168
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/evaluate/index.js
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const common_assets = require("../../../../../common/assets.js");
|
||||
const TUIKit_utils_documentLink = require("../../../../utils/documentLink.js");
|
||||
const TUIKit_constant = require("../../../../constant.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
|
||||
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../../offlinePushInfoManager/index.js");
|
||||
const TUIKit_components_TUIChat_config = require("../../config.js");
|
||||
if (!Math) {
|
||||
(Icon + ToolbarItemContainer)();
|
||||
}
|
||||
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
|
||||
const Icon = () => "../../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
starTotal: {
|
||||
type: Number,
|
||||
default: 5
|
||||
}
|
||||
},
|
||||
emits: ["onDialogPopupShowOrHide"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const evaluateIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.evaluateIconDark : common_assets.evaluateIconLight;
|
||||
const props = __props;
|
||||
const emits = __emit;
|
||||
const container = common_vendor.ref();
|
||||
const starList = common_vendor.ref(props.starTotal);
|
||||
const currentStarIndex = common_vendor.ref(-1);
|
||||
const comment = common_vendor.ref("");
|
||||
const currentConversation = common_vendor.ref();
|
||||
common_vendor.Jt.watch(common_vendor.o.CONV, {
|
||||
currentConversation: (conversation) => {
|
||||
currentConversation.value = conversation;
|
||||
}
|
||||
});
|
||||
const isEvaluateValid = common_vendor.computed(() => comment.value.length || currentStarIndex.value >= 0);
|
||||
const onDialogShow = () => {
|
||||
emits("onDialogPopupShowOrHide", true);
|
||||
};
|
||||
const onDialogClose = () => {
|
||||
resetEvaluate();
|
||||
emits("onDialogPopupShowOrHide", false);
|
||||
};
|
||||
const openLink = () => {
|
||||
var _a, _b;
|
||||
if (TUIKit_utils_env.isPC || TUIKit_utils_env.isH5) {
|
||||
window.open((_b = (_a = TUIKit_utils_documentLink.Link) == null ? void 0 : _a.customMessage) == null ? void 0 : _b.url);
|
||||
}
|
||||
};
|
||||
const closeDialog = () => {
|
||||
var _a;
|
||||
(_a = container == null ? void 0 : container.value) == null ? void 0 : _a.toggleDialogDisplay(false);
|
||||
};
|
||||
const resetEvaluate = () => {
|
||||
currentStarIndex.value = -1;
|
||||
comment.value = "";
|
||||
};
|
||||
const selectStar = (starIndex) => {
|
||||
if (currentStarIndex.value === starIndex) {
|
||||
currentStarIndex.value = currentStarIndex.value - 1;
|
||||
} else {
|
||||
currentStarIndex.value = starIndex;
|
||||
}
|
||||
};
|
||||
const submitEvaluate = () => {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
if (currentStarIndex.value < 0 && !comment.value.length) {
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
data: JSON.stringify({
|
||||
businessID: TUIKit_constant.CHAT_MSG_CUSTOM_TYPE.EVALUATE,
|
||||
version: 1,
|
||||
score: currentStarIndex.value + 1,
|
||||
comment: comment.value
|
||||
}),
|
||||
description: "对本次的服务评价",
|
||||
extension: "对本次的服务评价"
|
||||
};
|
||||
const options = {
|
||||
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
|
||||
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
|
||||
payload,
|
||||
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
|
||||
};
|
||||
const offlinePushInfoCreateParams = {
|
||||
conversation: currentConversation.value,
|
||||
payload: options.payload,
|
||||
messageType: common_vendor.qt.TYPES.MSG_CUSTOM
|
||||
};
|
||||
const sendMessageOptions = {
|
||||
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
|
||||
};
|
||||
common_vendor.Qt.sendCustomMessage(options, sendMessageOptions);
|
||||
(_f = container == null ? void 0 : container.value) == null ? void 0 : _f.toggleDialogDisplay(false);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("Evaluate.请对本次服务进行评价")),
|
||||
b: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5-header-content"),
|
||||
c: !common_vendor.unref(TUIKit_utils_env.isPC)
|
||||
}, !common_vendor.unref(TUIKit_utils_env.isPC) ? {
|
||||
d: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("关闭")),
|
||||
e: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5-header-close"),
|
||||
f: common_vendor.o$1(closeDialog)
|
||||
} : {}, {
|
||||
g: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5-header"),
|
||||
h: common_vendor.f(common_vendor.unref(starList), (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: index <= common_vendor.unref(currentStarIndex)
|
||||
}, index <= common_vendor.unref(currentStarIndex) ? {
|
||||
b: "74e4698c-1-" + i0 + ",74e4698c-0",
|
||||
c: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.star),
|
||||
width: common_vendor.unref(TUIKit_utils_env.isPC) ? "20px" : "30px",
|
||||
height: common_vendor.unref(TUIKit_utils_env.isPC) ? "20px" : "30px"
|
||||
})
|
||||
} : {
|
||||
d: "74e4698c-2-" + i0 + ",74e4698c-0",
|
||||
e: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.starIcon),
|
||||
width: common_vendor.unref(TUIKit_utils_env.isPC) ? "20px" : "30px",
|
||||
height: common_vendor.unref(TUIKit_utils_env.isPC) ? "20px" : "30px"
|
||||
})
|
||||
}, {
|
||||
f: index,
|
||||
g: common_vendor.o$1(($event) => selectStar(index), index)
|
||||
});
|
||||
}),
|
||||
i: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5-content-list-item"),
|
||||
j: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5-content-list"),
|
||||
k: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5-content-text"),
|
||||
l: common_vendor.unref(comment),
|
||||
m: common_vendor.o$1(($event) => common_vendor.isRef(comment) ? comment.value = $event.detail.value : null),
|
||||
n: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("Evaluate.提交评价")),
|
||||
o: common_vendor.n(common_vendor.unref(isEvaluateValid) ? "btn-valid" : "btn-invalid"),
|
||||
p: common_vendor.o$1(submitEvaluate),
|
||||
q: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5-content-button"),
|
||||
r: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5-content"),
|
||||
s: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("Evaluate.服务评价工具")),
|
||||
t: common_vendor.t("(" + common_vendor.unref(common_vendor.Wt).t("Evaluate.使用")),
|
||||
v: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`Evaluate.${common_vendor.unref(TUIKit_utils_documentLink.Link).customMessage.label}`)),
|
||||
w: common_vendor.o$1(($event) => openLink(common_vendor.unref(TUIKit_utils_documentLink.Link).customMessage)),
|
||||
x: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("Evaluate.搭建") + ")"),
|
||||
y: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5-adv"),
|
||||
z: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "evaluate-h5"),
|
||||
A: common_vendor.sr(container, "74e4698c-0", {
|
||||
"k": "container"
|
||||
}),
|
||||
B: common_vendor.o$1(onDialogShow),
|
||||
C: common_vendor.o$1(onDialogClose),
|
||||
D: common_vendor.p({
|
||||
iconFile: common_vendor.unref(evaluateIcon),
|
||||
title: "评价",
|
||||
needBottomPopup: true,
|
||||
iconWidth: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "26px" : "20px",
|
||||
iconHeight: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "26px" : "20px"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-74e4698c"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/evaluate/index.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"toolbar-item-container": "../toolbar-item-container/index",
|
||||
"icon": "../../../common/Icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<toolbar-item-container wx:if="{{D}}" class="r data-v-74e4698c" u-s="{{['d']}}" u-r="container" bindonDialogShow="{{B}}" bindonDialogClose="{{C}}" u-i="74e4698c-0" bind:__l="__l" u-p="{{D}}"><view class="{{['data-v-74e4698c', 'evaluate', z]}}"><view class="{{['data-v-74e4698c', 'evaluate-header', g]}}"><view class="{{['data-v-74e4698c', 'evaluate-header-content', b]}}">{{a}}</view><view wx:if="{{c}}" class="{{['data-v-74e4698c', 'evaluate-header-close', e]}}" catchtap="{{f}}">{{d}}</view></view><view class="{{['data-v-74e4698c', 'evaluate-content', r]}}"><view class="{{['data-v-74e4698c', 'evaluate-content-list', j]}}"><view wx:for="{{h}}" wx:for-item="item" wx:key="f" class="{{['data-v-74e4698c', 'evaluate-content-list-item', i]}}" catchtap="{{item.g}}"><icon wx:if="{{item.a}}" class="data-v-74e4698c" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"/><icon wx:else class="data-v-74e4698c" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e||''}}"/></view></view><block wx:if="{{r0}}"><textarea class="{{['data-v-74e4698c', 'evaluate-content-text', k]}}" value="{{l}}" bindinput="{{m}}"/></block><view class="{{['data-v-74e4698c', 'evaluate-content-button', q]}}"><button class="{{['data-v-74e4698c', 'btn', o]}}" bindtap="{{p}}">{{n}}</button></view></view><view class="{{['data-v-74e4698c', 'evaluate-adv', y]}}">{{s}} {{t}} <navigator class="data-v-74e4698c" bindtap="{{w}}">{{v}}</navigator> {{x}}</view></view></toolbar-item-container>
|
||||
245
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/evaluate/index.wxss
vendored
Normal file
245
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/evaluate/index.wxss
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.evaluate.data-v-74e4698c {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.evaluate-header-content.data-v-74e4698c {
|
||||
font-weight: 500;
|
||||
color: #1c1c1c;
|
||||
}
|
||||
.evaluate-adv.data-v-74e4698c {
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
.evaluate-adv a.data-v-74e4698c {
|
||||
color: #006eff;
|
||||
}
|
||||
.evaluate-content-text.data-v-74e4698c {
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #ececec;
|
||||
}
|
||||
.evaluate-content-list-item.data-v-74e4698c {
|
||||
font-weight: 400;
|
||||
color: #50545c;
|
||||
}
|
||||
.evaluate-H5-main.data-v-74e4698c {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.evaluate-H5-main .evaluate-main-content.data-v-74e4698c {
|
||||
background: #fff;
|
||||
}
|
||||
.evaluate-H5-main .evaluate-main-content p a.data-v-74e4698c {
|
||||
color: #3370ff;
|
||||
}
|
||||
.evaluate-H5-main .evaluate-main-content .close.data-v-74e4698c {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
color: #3370ff;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
.evaluate.data-v-74e4698c {
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
width: 315px;
|
||||
top: -255px;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: 8px;
|
||||
background: url("https://web.sdk.qcloud.com/im/assets/images/login-background.png") no-repeat;
|
||||
background-color: #fff;
|
||||
background-size: cover;
|
||||
background-position-x: 128px;
|
||||
background-position-y: 77px;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.evaluate-header-content.data-v-74e4698c {
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
}
|
||||
.evaluate-content.data-v-74e4698c {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 12px 0;
|
||||
}
|
||||
.evaluate-content-list.data-v-74e4698c {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
}
|
||||
.evaluate-content-list-item.data-v-74e4698c {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
padding: 4px 0;
|
||||
font-size: 12px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.evaluate-content-list-item.data-v-74e4698c:last-child {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
.evaluate-content-text.data-v-74e4698c {
|
||||
box-sizing: border-box;
|
||||
width: 288px;
|
||||
height: 90px;
|
||||
margin: 12px 0;
|
||||
padding: 12px;
|
||||
border-radius: 2px;
|
||||
resize: none;
|
||||
}
|
||||
.evaluate-content-button .btn.data-v-74e4698c {
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
line-height: 24px;
|
||||
padding: 2px 46px;
|
||||
font-weight: 400;
|
||||
color: #fff;
|
||||
}
|
||||
.evaluate-content-button .btn-valid.data-v-74e4698c {
|
||||
background-color: #3370ff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.evaluate-content-button .btn-invalid.data-v-74e4698c {
|
||||
background-color: #a0cfff;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.evaluate-adv.data-v-74e4698c {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
.evaluate-adv a.data-v-74e4698c {
|
||||
display: inline-block;
|
||||
}
|
||||
.evaluate-h5.data-v-74e4698c {
|
||||
position: static;
|
||||
width: 100%;
|
||||
height: -webkit-fit-content;
|
||||
height: fit-content;
|
||||
border-radius: 0;
|
||||
background: #fff;
|
||||
padding: 23px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.evaluate-h5-header.data-v-74e4698c {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.evaluate-h5-header-content.data-v-74e4698c {
|
||||
font-size: 18px;
|
||||
}
|
||||
.evaluate-h5-header-close.data-v-74e4698c {
|
||||
font-size: 18px;
|
||||
line-height: 27px;
|
||||
font-weight: 400;
|
||||
color: #3370ff;
|
||||
}
|
||||
.evaluate-h5-content.data-v-74e4698c {
|
||||
order: 1;
|
||||
}
|
||||
.evaluate-h5-content-list-item.data-v-74e4698c {
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
text-align: center;
|
||||
cursor: auto;
|
||||
font-size: 12px;
|
||||
}
|
||||
.evaluate-h5-content-text.data-v-74e4698c {
|
||||
font-size: 16px;
|
||||
width: 100%;
|
||||
}
|
||||
.evaluate-h5-content-button.data-v-74e4698c {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
.evaluate-h5-content-button .btn.data-v-74e4698c {
|
||||
flex: 1;
|
||||
padding: 14px 0;
|
||||
font-size: 18px;
|
||||
cursor: auto;
|
||||
}
|
||||
.evaluate-h5-adv.data-v-74e4698c {
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
}
|
||||
body.data-v-74e4698c, div.data-v-74e4698c, ul.data-v-74e4698c, ol.data-v-74e4698c, dt.data-v-74e4698c, dd.data-v-74e4698c, li.data-v-74e4698c, dl.data-v-74e4698c, h1.data-v-74e4698c, h2.data-v-74e4698c, h3.data-v-74e4698c, h4.data-v-74e4698c, p.data-v-74e4698c {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-74e4698c, ul.data-v-74e4698c, li.data-v-74e4698c {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-74e4698c {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-74e4698c {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-74e4698c {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-74e4698c {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-74e4698c:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-74e4698c, textarea.data-v-74e4698c {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-74e4698c:focus, input.data-v-74e4698c:active, textarea.data-v-74e4698c:focus, textarea.data-v-74e4698c:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-74e4698c {
|
||||
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);
|
||||
}
|
||||
137
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/image-upload/index.js
vendored
Normal file
137
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/image-upload/index.js
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
const common_assets = require("../../../../../common/assets.js");
|
||||
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
|
||||
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../../offlinePushInfoManager/index.js");
|
||||
const TUIKit_components_TUIChat_config = require("../../config.js");
|
||||
if (!Math) {
|
||||
ToolbarItemContainer();
|
||||
}
|
||||
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
// Image source: only valid for uni-app version, web version only supports selecting images from the album.
|
||||
// album: Select from album
|
||||
// camera: Take a photo using the camera
|
||||
imageSourceType: {
|
||||
type: String,
|
||||
default: "album"
|
||||
}
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const inputRef = common_vendor.ref();
|
||||
const currentConversation = common_vendor.ref();
|
||||
const theme = TUIKit_components_TUIChat_config.ChatConfig.getTheme();
|
||||
const IMAGE_TOOLBAR_SHOW_MAP = {
|
||||
web_album: {
|
||||
icon: theme === "dark" ? common_assets.imageIconDark : common_assets.imageIconLight,
|
||||
title: "图片"
|
||||
},
|
||||
uni_album: {
|
||||
icon: common_assets.imageUniIcon,
|
||||
title: "图片"
|
||||
},
|
||||
uni_camera: {
|
||||
icon: common_assets.cameraUniIcon,
|
||||
title: "拍照"
|
||||
}
|
||||
};
|
||||
common_vendor.Jt.watch(common_vendor.o.CONV, {
|
||||
currentConversation: (conversation) => {
|
||||
currentConversation.value = conversation;
|
||||
}
|
||||
});
|
||||
const imageToolbarForShow = common_vendor.computed(() => {
|
||||
if (TUIKit_utils_env.isUniFrameWork) {
|
||||
return props.imageSourceType === "camera" ? IMAGE_TOOLBAR_SHOW_MAP["uni_camera"] : IMAGE_TOOLBAR_SHOW_MAP["uni_album"];
|
||||
} else {
|
||||
return IMAGE_TOOLBAR_SHOW_MAP["web_album"];
|
||||
}
|
||||
});
|
||||
const onIconClick = () => {
|
||||
var _a, _b, _c, _d;
|
||||
if (TUIKit_utils_env.isUniFrameWork) {
|
||||
if (TUIKit_utils_env.isWeChat && ((_a = common_vendor.i) == null ? void 0 : _a.chooseMedia)) {
|
||||
(_b = common_vendor.i) == null ? void 0 : _b.chooseMedia({
|
||||
count: 1,
|
||||
mediaType: ["image"],
|
||||
sizeType: ["original", "compressed"],
|
||||
sourceType: [props.imageSourceType],
|
||||
// Use camera or select from album.
|
||||
success: function(res) {
|
||||
sendImageMessage(res);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
(_c = common_vendor.i) == null ? void 0 : _c.chooseImage({
|
||||
count: 1,
|
||||
sourceType: [props.imageSourceType],
|
||||
// Use camera or select from album.
|
||||
success: function(res) {
|
||||
sendImageMessage(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if ((_d = inputRef.value) == null ? void 0 : _d.click) {
|
||||
inputRef.value.click();
|
||||
}
|
||||
}
|
||||
};
|
||||
const sendImageInWeb = (e) => {
|
||||
var _a, _b;
|
||||
if (((_b = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.files) == null ? void 0 : _b.length) <= 0) {
|
||||
return;
|
||||
}
|
||||
sendImageMessage(e == null ? void 0 : e.target);
|
||||
e.target.value = "";
|
||||
};
|
||||
const sendImageMessage = (files) => {
|
||||
var _a, _b, _c, _d, _e;
|
||||
if (!files) {
|
||||
return;
|
||||
}
|
||||
const options = {
|
||||
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
|
||||
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
|
||||
payload: {
|
||||
file: files
|
||||
},
|
||||
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
|
||||
};
|
||||
const offlinePushInfoCreateParams = {
|
||||
conversation: currentConversation.value,
|
||||
payload: options.payload,
|
||||
messageType: common_vendor.qt.TYPES.MSG_IMAGE
|
||||
};
|
||||
const sendMessageOptions = {
|
||||
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
|
||||
};
|
||||
common_vendor.Qt.sendImageMessage(options, sendMessageOptions);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: !common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
|
||||
}, !common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {
|
||||
b: common_vendor.o$1(sendImageInWeb),
|
||||
c: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "image-upload-h5")
|
||||
} : {}, {
|
||||
d: common_vendor.o$1(onIconClick),
|
||||
e: common_vendor.p({
|
||||
iconFile: common_vendor.unref(imageToolbarForShow).icon,
|
||||
title: common_vendor.unref(imageToolbarForShow).title,
|
||||
iconWidth: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "32px" : "20px",
|
||||
iconHeight: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "25px" : "18px",
|
||||
needDialog: false
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2d15f470"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/image-upload/index.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"toolbar-item-container": "../toolbar-item-container/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<toolbar-item-container wx:if="{{e}}" class="data-v-2d15f470" u-s="{{['d']}}" bindonIconClick="{{d}}" u-i="2d15f470-0" bind:__l="__l" u-p="{{e}}"><view wx:if="{{a}}" class="{{['data-v-2d15f470', 'image-upload', c]}}"><input class="data-v-2d15f470" ref="inputRef" title="图片" type="file" data-type="image" accept="image/gif,image/jpeg,image/jpg,image/png,image/bmp,image/webp" bindchange="{{b}}"></input></view></toolbar-item-container>
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-2d15f470, div.data-v-2d15f470, ul.data-v-2d15f470, ol.data-v-2d15f470, dt.data-v-2d15f470, dd.data-v-2d15f470, li.data-v-2d15f470, dl.data-v-2d15f470, h1.data-v-2d15f470, h2.data-v-2d15f470, h3.data-v-2d15f470, h4.data-v-2d15f470, p.data-v-2d15f470 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-2d15f470, ul.data-v-2d15f470, li.data-v-2d15f470 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-2d15f470 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-2d15f470 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-2d15f470 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-2d15f470 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-2d15f470:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-2d15f470, textarea.data-v-2d15f470 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-2d15f470:focus, input.data-v-2d15f470:active, textarea.data-v-2d15f470:focus, textarea.data-v-2d15f470:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-2d15f470 {
|
||||
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);
|
||||
}
|
||||
285
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.js
vendored
Normal file
285
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.js
vendored
Normal file
@@ -0,0 +1,285 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
require("../../../adapter-vue.js");
|
||||
const TUIKit_components_TUIChat_config = require("../config.js");
|
||||
const TUIKit_utils_enableSampleTaskStatus = require("../../../utils/enableSampleTaskStatus.js");
|
||||
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../offlinePushInfoManager/index.js");
|
||||
const TUIKit_components_TUIChat_offlinePushInfoManager_const = require("../offlinePushInfoManager/const.js");
|
||||
if (!Math) {
|
||||
(EmojiPickerDialog + ImageUpload + VideoUpload + ToolbarItemContainer + Evaluate + Words + UserSelector)();
|
||||
}
|
||||
const ImageUpload = () => "./image-upload/index.js";
|
||||
const VideoUpload = () => "./video-upload/index.js";
|
||||
const Evaluate = () => "./evaluate/index.js";
|
||||
const Words = () => "./words/index.js";
|
||||
const ToolbarItemContainer = () => "./toolbar-item-container/index.js";
|
||||
const EmojiPickerDialog = () => "./emoji-picker/emoji-picker-dialog.js";
|
||||
const UserSelector = () => "./user-selector/index.js";
|
||||
const __default__ = {
|
||||
options: {
|
||||
styleIsolation: "shared"
|
||||
}
|
||||
};
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
...__default__,
|
||||
__name: "index",
|
||||
props: {
|
||||
displayType: {}
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const currentConversation = common_vendor.ref();
|
||||
const isGroup = common_vendor.ref(false);
|
||||
const selectorShowType = common_vendor.ref("");
|
||||
const userSelectorRef = common_vendor.ref();
|
||||
const currentUserSelectorExtension = common_vendor.ref();
|
||||
const currentExtensionList = common_vendor.ref([]);
|
||||
const isSwiperIndicatorDotsEnable = common_vendor.ref(false);
|
||||
const featureConfig = TUIKit_components_TUIChat_config.ChatConfig.getFeatureConfig();
|
||||
const neededCountFirstPage = common_vendor.ref(8);
|
||||
const slicePos = common_vendor.ref(0);
|
||||
const computeToolbarPaging = () => {
|
||||
if (featureConfig.InputImage && featureConfig.InputVideo) {
|
||||
neededCountFirstPage.value -= 4;
|
||||
} else if (featureConfig.InputImage || featureConfig.InputVideo) {
|
||||
neededCountFirstPage.value -= 2;
|
||||
}
|
||||
slicePos.value = neededCountFirstPage.value;
|
||||
neededCountFirstPage.value -= currentExtensionList.value.length;
|
||||
if (neededCountFirstPage.value === 1) {
|
||||
isSwiperIndicatorDotsEnable.value = featureConfig.InputEvaluation && featureConfig.InputQuickReplies;
|
||||
} else if (neededCountFirstPage.value < 1) {
|
||||
isSwiperIndicatorDotsEnable.value = featureConfig.InputEvaluation || featureConfig.InputQuickReplies;
|
||||
}
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.Jt.watch(common_vendor.o.CUSTOM, {
|
||||
activeConversation: onActiveConversationUpdate
|
||||
});
|
||||
});
|
||||
common_vendor.onUnmounted(() => {
|
||||
common_vendor.Jt.unwatch(common_vendor.o.CUSTOM, {
|
||||
activeConversation: onActiveConversationUpdate
|
||||
});
|
||||
});
|
||||
const onActiveConversationUpdate = (conversationID) => {
|
||||
var _a;
|
||||
if (!conversationID) {
|
||||
return;
|
||||
}
|
||||
if (conversationID !== ((_a = currentConversation.value) == null ? void 0 : _a.conversationID)) {
|
||||
getExtensionList();
|
||||
computeToolbarPaging();
|
||||
currentConversation.value = common_vendor.Jt.getData(common_vendor.o.CONV, "currentConversation");
|
||||
isGroup.value = conversationID.startsWith(common_vendor.qt.TYPES.CONV_GROUP);
|
||||
}
|
||||
};
|
||||
const getExtensionList = () => {
|
||||
const chatType = TUIKit_components_TUIChat_config.ChatConfig.getChatType();
|
||||
const params = { chatType };
|
||||
if (chatType === common_vendor.E.TUIChat.TYPE.CUSTOMER_SERVICE) {
|
||||
params.filterVoice = true;
|
||||
params.filterVideo = true;
|
||||
TUIKit_utils_enableSampleTaskStatus.enableSampleTaskStatus("customerService");
|
||||
}
|
||||
currentExtensionList.value = [
|
||||
...common_vendor.R.getExtensionList(common_vendor.E.TUIChat.EXTENSION.INPUT_MORE.EXT_ID, params)
|
||||
].filter((extension) => {
|
||||
var _a;
|
||||
if (((_a = extension == null ? void 0 : extension.data) == null ? void 0 : _a.name) === "search") {
|
||||
return featureConfig.MessageSearch;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
reportExtension(currentExtensionList.value);
|
||||
};
|
||||
function reportExtension(extensionList) {
|
||||
extensionList.forEach((extension) => {
|
||||
var _a;
|
||||
const _name = (_a = extension == null ? void 0 : extension.data) == null ? void 0 : _a.name;
|
||||
if (_name === "voiceCall") {
|
||||
common_vendor.ss.reportFeature(203, "voice-call");
|
||||
} else if (_name === "videoCall") {
|
||||
common_vendor.ss.reportFeature(203, "video-call");
|
||||
} else if (_name === "quickRoom") {
|
||||
common_vendor.ss.reportFeature(204);
|
||||
}
|
||||
});
|
||||
}
|
||||
const onExtensionClick = (extension) => {
|
||||
var _a, _b, _c;
|
||||
const extensionModel = currentExtensionList.value.find(
|
||||
(targetExtension) => {
|
||||
var _a2, _b2;
|
||||
return ((_a2 = targetExtension == null ? void 0 : targetExtension.data) == null ? void 0 : _a2.name) === ((_b2 = extension == null ? void 0 : extension.data) == null ? void 0 : _b2.name);
|
||||
}
|
||||
);
|
||||
switch ((_a = extensionModel == null ? void 0 : extensionModel.data) == null ? void 0 : _a.name) {
|
||||
case "voiceCall":
|
||||
onCallExtensionClicked(extensionModel, 1);
|
||||
break;
|
||||
case "videoCall":
|
||||
onCallExtensionClicked(extensionModel, 2);
|
||||
break;
|
||||
case "search":
|
||||
(_c = (_b = extensionModel == null ? void 0 : extensionModel.listener) == null ? void 0 : _b.onClicked) == null ? void 0 : _c.call(_b);
|
||||
break;
|
||||
}
|
||||
};
|
||||
const onCallExtensionClicked = (extension, callType) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
selectorShowType.value = (_a = extension == null ? void 0 : extension.data) == null ? void 0 : _a.name;
|
||||
if (((_b = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _b.type) === common_vendor.qt.TYPES.CONV_C2C) {
|
||||
(_f = (_c = extension == null ? void 0 : extension.listener) == null ? void 0 : _c.onClicked) == null ? void 0 : _f.call(_c, {
|
||||
userIDList: [(_e = (_d = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _d.conversationID) == null ? void 0 : _e.slice(3)],
|
||||
type: callType,
|
||||
callParams: {
|
||||
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.getOfflinePushInfo(TUIKit_components_TUIChat_offlinePushInfoManager_const.PUSH_SCENE.CALL)
|
||||
}
|
||||
});
|
||||
} else if (isGroup.value) {
|
||||
currentUserSelectorExtension.value = extension;
|
||||
((_g = userSelectorRef == null ? void 0 : userSelectorRef.value) == null ? void 0 : _g.toggleShow) && userSelectorRef.value.toggleShow(true);
|
||||
}
|
||||
};
|
||||
const genExtensionIcon = (extension) => {
|
||||
return extension == null ? void 0 : extension.icon;
|
||||
};
|
||||
const genExtensionText = (extension) => {
|
||||
return extension == null ? void 0 : extension.text;
|
||||
};
|
||||
const onUserSelectorSubmit = (selectedInfo) => {
|
||||
var _a, _b, _c;
|
||||
(_c = (_b = (_a = currentUserSelectorExtension.value) == null ? void 0 : _a.listener) == null ? void 0 : _b.onClicked) == null ? void 0 : _c.call(_b, {
|
||||
...selectedInfo,
|
||||
callParams: {
|
||||
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.getOfflinePushInfo(TUIKit_components_TUIChat_offlinePushInfoManager_const.PUSH_SCENE.CALL)
|
||||
}
|
||||
});
|
||||
currentUserSelectorExtension.value = null;
|
||||
};
|
||||
const onUserSelectorCancel = () => {
|
||||
currentUserSelectorExtension.value = null;
|
||||
};
|
||||
const handleSwiperDotShow = (showStatus) => {
|
||||
isSwiperIndicatorDotsEnable.value = neededCountFirstPage.value <= 1 && !showStatus;
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: props.displayType === "emojiPicker"
|
||||
}, props.displayType === "emojiPicker" ? {} : common_vendor.e({
|
||||
b: common_vendor.unref(featureConfig).InputImage
|
||||
}, common_vendor.unref(featureConfig).InputImage ? {
|
||||
c: common_vendor.p({
|
||||
imageSourceType: "camera"
|
||||
})
|
||||
} : {}, {
|
||||
d: common_vendor.unref(featureConfig).InputImage
|
||||
}, common_vendor.unref(featureConfig).InputImage ? {
|
||||
e: common_vendor.p({
|
||||
imageSourceType: "album"
|
||||
})
|
||||
} : {}, {
|
||||
f: common_vendor.unref(featureConfig).InputVideo
|
||||
}, common_vendor.unref(featureConfig).InputVideo ? {
|
||||
g: common_vendor.p({
|
||||
videoSourceType: "album"
|
||||
})
|
||||
} : {}, {
|
||||
h: common_vendor.unref(featureConfig).InputVideo
|
||||
}, common_vendor.unref(featureConfig).InputVideo ? {
|
||||
i: common_vendor.p({
|
||||
videoSourceType: "camera"
|
||||
})
|
||||
} : {}, {
|
||||
j: common_vendor.unref(currentExtensionList).length > 0
|
||||
}, common_vendor.unref(currentExtensionList).length > 0 ? {
|
||||
k: common_vendor.f(common_vendor.unref(currentExtensionList).slice(0, common_vendor.unref(slicePos)), (extension, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: extension
|
||||
}, extension ? {
|
||||
b: common_vendor.o$1(($event) => onExtensionClick(extension), index),
|
||||
c: "76f68da4-5-" + i0,
|
||||
d: common_vendor.p({
|
||||
iconFile: genExtensionIcon(extension),
|
||||
title: genExtensionText(extension),
|
||||
iconWidth: "25px",
|
||||
iconHeight: "25px",
|
||||
needDialog: false
|
||||
})
|
||||
} : {}, {
|
||||
e: index
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
l: common_vendor.unref(neededCountFirstPage) === 1
|
||||
}, common_vendor.unref(neededCountFirstPage) === 1 ? common_vendor.e({
|
||||
m: common_vendor.unref(featureConfig).InputEvaluation
|
||||
}, common_vendor.unref(featureConfig).InputEvaluation ? {
|
||||
n: common_vendor.o$1(handleSwiperDotShow)
|
||||
} : common_vendor.unref(featureConfig).InputQuickReplies ? {
|
||||
p: common_vendor.o$1(handleSwiperDotShow)
|
||||
} : {}, {
|
||||
o: common_vendor.unref(featureConfig).InputQuickReplies
|
||||
}) : {}, {
|
||||
q: common_vendor.unref(neededCountFirstPage) > 1
|
||||
}, common_vendor.unref(neededCountFirstPage) > 1 ? common_vendor.e({
|
||||
r: common_vendor.unref(featureConfig).InputEvaluation
|
||||
}, common_vendor.unref(featureConfig).InputEvaluation ? {
|
||||
s: common_vendor.o$1(handleSwiperDotShow)
|
||||
} : {}, {
|
||||
t: common_vendor.unref(featureConfig).InputQuickReplies
|
||||
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
|
||||
v: common_vendor.o$1(handleSwiperDotShow)
|
||||
} : {}) : {}, {
|
||||
w: common_vendor.unref(neededCountFirstPage) <= 1
|
||||
}, common_vendor.unref(neededCountFirstPage) <= 1 ? common_vendor.e({
|
||||
x: common_vendor.f(common_vendor.unref(currentExtensionList).slice(common_vendor.unref(slicePos)), (extension, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: extension
|
||||
}, extension ? {
|
||||
b: common_vendor.o$1(($event) => onExtensionClick(extension), index),
|
||||
c: "76f68da4-10-" + i0,
|
||||
d: common_vendor.p({
|
||||
iconFile: genExtensionIcon(extension),
|
||||
title: genExtensionText(extension),
|
||||
iconWidth: "25px",
|
||||
iconHeight: "25px",
|
||||
needDialog: false
|
||||
})
|
||||
} : {}, {
|
||||
e: index
|
||||
});
|
||||
}),
|
||||
y: common_vendor.unref(neededCountFirstPage) === 1
|
||||
}, common_vendor.unref(neededCountFirstPage) === 1 ? common_vendor.e({
|
||||
z: common_vendor.unref(featureConfig).InputQuickReplies
|
||||
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
|
||||
A: common_vendor.o$1(handleSwiperDotShow)
|
||||
} : {}) : common_vendor.e({
|
||||
B: common_vendor.unref(featureConfig).InputEvaluation
|
||||
}, common_vendor.unref(featureConfig).InputEvaluation ? {
|
||||
C: common_vendor.o$1(handleSwiperDotShow)
|
||||
} : {}, {
|
||||
D: common_vendor.unref(featureConfig).InputQuickReplies
|
||||
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
|
||||
E: common_vendor.o$1(handleSwiperDotShow)
|
||||
} : {})) : {}, {
|
||||
F: common_vendor.unref(isSwiperIndicatorDotsEnable)
|
||||
}), {
|
||||
G: common_vendor.sr(userSelectorRef, "76f68da4-14", {
|
||||
"k": "userSelectorRef"
|
||||
}),
|
||||
H: common_vendor.o$1(onUserSelectorSubmit),
|
||||
I: common_vendor.o$1(onUserSelectorCancel),
|
||||
J: common_vendor.p({
|
||||
type: common_vendor.unref(selectorShowType),
|
||||
currentConversation: common_vendor.unref(currentConversation),
|
||||
isGroup: common_vendor.unref(isGroup)
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
wx.createComponent(_sfc_main);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.js.map
|
||||
12
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.json
vendored
Normal file
12
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"image-upload": "./image-upload/index",
|
||||
"video-upload": "./video-upload/index",
|
||||
"evaluate": "./evaluate/index",
|
||||
"words": "./words/index",
|
||||
"toolbar-item-container": "./toolbar-item-container/index",
|
||||
"emoji-picker-dialog": "./emoji-picker/emoji-picker-dialog",
|
||||
"user-selector": "./user-selector/index"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['message-input-toolbar', 'message-input-toolbar-h5', 'message-input-toolbar-uni']}}"><view wx:if="{{a}}"><emoji-picker-dialog u-i="76f68da4-0" bind:__l="__l"/></view><view wx:else><swiper class="{{['message-input-toolbar-swiper']}}" indicator-dots="{{F}}" autoplay="{{false}}" circular="{{false}}"><swiper-item class="{{['message-input-toolbar-list', 'message-input-toolbar-h5-list', 'message-input-toolbar-uni-list']}}"><image-upload wx:if="{{b}}" u-i="76f68da4-1" bind:__l="__l" u-p="{{c}}"/><image-upload wx:if="{{d}}" u-i="76f68da4-2" bind:__l="__l" u-p="{{e}}"/><video-upload wx:if="{{f}}" u-i="76f68da4-3" bind:__l="__l" u-p="{{g}}"/><video-upload wx:if="{{h}}" u-i="76f68da4-4" bind:__l="__l" u-p="{{i}}"/><block wx:if="{{j}}"><view wx:for="{{k}}" wx:for-item="extension" wx:key="e"><toolbar-item-container wx:if="{{extension.a}}" bindonIconClick="{{extension.b}}" u-i="{{extension.c}}" bind:__l="__l" u-p="{{extension.d}}"/></view></block><block wx:if="{{l}}"><evaluate wx:if="{{m}}" bindonDialogPopupShowOrHide="{{n}}" u-i="76f68da4-6" bind:__l="__l"/><words wx:elif="{{o}}" bindonDialogPopupShowOrHide="{{p}}" u-i="76f68da4-7" bind:__l="__l"/></block><block wx:if="{{q}}"><evaluate wx:if="{{r}}" bindonDialogPopupShowOrHide="{{s}}" u-i="76f68da4-8" bind:__l="__l"/><words wx:if="{{t}}" bindonDialogPopupShowOrHide="{{v}}" u-i="76f68da4-9" bind:__l="__l"/></block></swiper-item><swiper-item wx:if="{{w}}" class="{{['message-input-toolbar-list', 'message-input-toolbar-h5-list', 'message-input-toolbar-uni-list']}}"><view wx:for="{{x}}" wx:for-item="extension" wx:key="e"><toolbar-item-container wx:if="{{extension.a}}" bindonIconClick="{{extension.b}}" u-i="{{extension.c}}" bind:__l="__l" u-p="{{extension.d}}"/></view><block wx:if="{{y}}"><words wx:if="{{z}}" bindonDialogPopupShowOrHide="{{A}}" u-i="76f68da4-11" bind:__l="__l"/></block><block wx:else><evaluate wx:if="{{B}}" bindonDialogPopupShowOrHide="{{C}}" u-i="76f68da4-12" bind:__l="__l"/><words wx:if="{{D}}" bindonDialogPopupShowOrHide="{{E}}" u-i="76f68da4-13" bind:__l="__l"/></block></swiper-item></swiper></view><user-selector wx:if="{{J}}" class="r" u-r="userSelectorRef" bindsubmit="{{H}}" bindcancel="{{I}}" u-i="76f68da4-14" bind:__l="__l" u-p="{{J}}"/></view>
|
||||
254
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.wxss
vendored
Normal file
254
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.wxss
vendored
Normal file
@@ -0,0 +1,254 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body, div, ul, ol, dt, dd, li, dl, h1, h2, h3, h4, p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol, ul, li {
|
||||
list-style: none;
|
||||
}
|
||||
img {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input, textarea {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input:focus, input:active, textarea:focus, textarea:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside {
|
||||
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);
|
||||
}
|
||||
/* stylelint-disable */
|
||||
.message-input-toolbar {
|
||||
border-top: 1px solid #f4f5f9;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
z-index: 100;
|
||||
user-select: none;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
.message-input-toolbar-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.message-input-toolbar-list .extension-list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
}
|
||||
.message-input-toolbar-list .extension-list-item {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 12px 10px 1px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.message-input-toolbar-h5 {
|
||||
padding: 5px 10px;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
}
|
||||
.message-input-toolbar-uni {
|
||||
background-color: #ebf0f6;
|
||||
flex-direction: column;
|
||||
z-index: 100;
|
||||
}
|
||||
.message-input-toolbar-uni-list {
|
||||
flex: 1;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 25%);
|
||||
grid-template-rows: repeat(2, 100px);
|
||||
}
|
||||
wx-swiper .wx-swiper-wrapper,
|
||||
wx-swiper .wx-swiper-slides,
|
||||
wx-swiper .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-list {
|
||||
overflow: visible !important;
|
||||
}
|
||||
.message-input-toolbar .bottom-popup,
|
||||
.message-input-toolbar .bottom-popup-h5,
|
||||
.message-input-toolbar .bottom-popup-uni {
|
||||
position: -webkit-sticky !important;
|
||||
position: sticky !important;
|
||||
}
|
||||
.message-input-toolbar-swiper {
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
}
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper {
|
||||
overflow: visible !important;
|
||||
}
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides {
|
||||
overflow: visible !important;
|
||||
}
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame {
|
||||
overflow: visible !important;
|
||||
}
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list {
|
||||
overflow: visible !important;
|
||||
}
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni {
|
||||
position: static !important;
|
||||
}
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog {
|
||||
position: absolute !important;
|
||||
background: transparent;
|
||||
left: -10px;
|
||||
bottom: -5px;
|
||||
}
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
|
||||
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni {
|
||||
position: -webkit-sticky !important;
|
||||
position: sticky !important;
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
const TUIKit_components_TUIChat_config = require("../../config.js");
|
||||
if (!Math) {
|
||||
(Icon + BottomPopup)();
|
||||
}
|
||||
const Icon = () => "../../../common/Icon.js";
|
||||
const BottomPopup = () => "../../../common/BottomPopup/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
iconFile: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
needDialog: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
iconWidth: {
|
||||
type: String,
|
||||
default: "20px"
|
||||
},
|
||||
iconHeight: {
|
||||
type: String,
|
||||
default: "20px"
|
||||
},
|
||||
// Whether to display the bottom popup dialog on mobile devices
|
||||
// Invalid on PC
|
||||
needBottomPopup: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
emits: ["onIconClick", "onDialogClose", "onDialogShow"],
|
||||
setup(__props, { expose: __expose, emit: __emit }) {
|
||||
const props = __props;
|
||||
const emits = __emit;
|
||||
const isDark = common_vendor.ref(TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark");
|
||||
const showDialog = common_vendor.ref(false);
|
||||
const toolbarItemRef = common_vendor.ref();
|
||||
const dialogRef = common_vendor.ref();
|
||||
const toggleToolbarItem = () => {
|
||||
emits("onIconClick", dialogRef);
|
||||
if (TUIKit_utils_env.isPC) {
|
||||
common_vendor.O.listen({
|
||||
domRefs: toolbarItemRef.value,
|
||||
handler: closeToolbarItem
|
||||
});
|
||||
}
|
||||
if (!props.needDialog) {
|
||||
return;
|
||||
}
|
||||
toggleDialogDisplay(!showDialog.value);
|
||||
};
|
||||
const closeToolbarItem = () => {
|
||||
showDialog.value = false;
|
||||
emits("onDialogClose", dialogRef);
|
||||
};
|
||||
const toggleDialogDisplay = (showStatus) => {
|
||||
if (showDialog.value === showStatus) {
|
||||
return;
|
||||
}
|
||||
showDialog.value = showStatus;
|
||||
switch (showStatus) {
|
||||
case true:
|
||||
emits("onDialogShow", dialogRef);
|
||||
break;
|
||||
case false:
|
||||
emits("onDialogClose", dialogRef);
|
||||
}
|
||||
};
|
||||
const onPopupClose = () => {
|
||||
showDialog.value = false;
|
||||
};
|
||||
__expose({
|
||||
toggleDialogDisplay
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
file: props.iconFile,
|
||||
width: props.iconWidth,
|
||||
height: props.iconHeight
|
||||
}),
|
||||
b: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "toolbar-item-container-uni-icon"),
|
||||
c: common_vendor.o$1(toggleToolbarItem),
|
||||
d: common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
|
||||
}, common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {
|
||||
e: common_vendor.t(props.title)
|
||||
} : {}, {
|
||||
f: props.needBottomPopup && !common_vendor.unref(TUIKit_utils_env.isPC)
|
||||
}, props.needBottomPopup && !common_vendor.unref(TUIKit_utils_env.isPC) ? {
|
||||
g: common_vendor.o$1(() => {
|
||||
}),
|
||||
h: common_vendor.o$1(onPopupClose),
|
||||
i: common_vendor.p({
|
||||
show: common_vendor.unref(showDialog)
|
||||
})
|
||||
} : {}, {
|
||||
j: common_vendor.unref(showDialog),
|
||||
k: common_vendor.n(common_vendor.unref(isDark) && "toolbar-item-container-dialog-dark"),
|
||||
l: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "toolbar-item-container-h5-dialog"),
|
||||
m: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "toolbar-item-container-uni-dialog"),
|
||||
n: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "toolbar-item-container-h5"),
|
||||
o: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "toolbar-item-container-uni")
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-bf58df78"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/toolbar-item-container/index.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../../common/Icon",
|
||||
"bottom-popup": "../../../common/BottomPopup/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view ref="toolbarItemRef" class="{{['data-v-bf58df78', 'toolbar-item-container', n, o]}}"><view class="{{['data-v-bf58df78', 'toolbar-item-container-icon', b]}}" bindtap="{{c}}"><icon wx:if="{{a}}" class="icon data-v-bf58df78" u-i="bf58df78-0" bind:__l="__l" u-p="{{a}}"/></view><view wx:if="{{d}}" class="{{['data-v-bf58df78', 'toolbar-item-container-uni-title']}}">{{e}}</view><view hidden="{{!j}}" ref="dialogRef" class="{{['data-v-bf58df78', 'toolbar-item-container-dialog', k, l, m]}}"><bottom-popup wx:if="{{f}}" u-s="{{['d']}}" class="toolbar-bottom-popup data-v-bf58df78" catchtouchmove="{{g}}" bindonClose="{{h}}" u-i="bf58df78-1" bind:__l="__l" u-p="{{i}}"><slot/></bottom-popup><slot wx:else/></view></view>
|
||||
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-bf58df78, div.data-v-bf58df78, ul.data-v-bf58df78, ol.data-v-bf58df78, dt.data-v-bf58df78, dd.data-v-bf58df78, li.data-v-bf58df78, dl.data-v-bf58df78, h1.data-v-bf58df78, h2.data-v-bf58df78, h3.data-v-bf58df78, h4.data-v-bf58df78, p.data-v-bf58df78 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-bf58df78, ul.data-v-bf58df78, li.data-v-bf58df78 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-bf58df78 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-bf58df78 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-bf58df78 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-bf58df78 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-bf58df78:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-bf58df78, textarea.data-v-bf58df78 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-bf58df78:focus, input.data-v-bf58df78:active, textarea.data-v-bf58df78:focus, textarea.data-v-bf58df78:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-bf58df78 {
|
||||
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);
|
||||
}
|
||||
.toolbar-item-container-dialog.data-v-bf58df78 {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.toolbar-item-container.data-v-bf58df78 {
|
||||
position: relative;
|
||||
}
|
||||
.toolbar-item-container-icon.data-v-bf58df78 {
|
||||
padding: 8px;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.toolbar-item-container-dialog.data-v-bf58df78 {
|
||||
z-index: 5;
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 4px -3px rgba(32, 77, 141, 0.03), 0 6px 10px 1px rgba(32, 77, 141, 0.06), 0 3px 14px 2px rgba(32, 77, 141, 0.05);
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
height: -webkit-fit-content;
|
||||
height: fit-content;
|
||||
bottom: 35px;
|
||||
}
|
||||
.toolbar-item-container-dialog-dark.data-v-bf58df78 {
|
||||
background: #22262E;
|
||||
box-shadow: 0 8px 40px 0 rgba(23, 25, 31, 0.6), 0 4px 12px 0 rgba(23, 25, 31, 0.8);
|
||||
}
|
||||
.toolbar-item-container-h5-dialog.data-v-bf58df78 {
|
||||
position: static !important;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
}
|
||||
.toolbar-item-container-uni.data-v-bf58df78 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: static;
|
||||
}
|
||||
.toolbar-item-container-uni-icon.data-v-bf58df78 {
|
||||
background: #fff;
|
||||
border-radius: 15px;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.toolbar-item-container-uni-title.data-v-bf58df78 {
|
||||
font-size: 14px;
|
||||
color: #8F959D;
|
||||
}
|
||||
.toolbar-item-container-uni-dialog.data-v-bf58df78 {
|
||||
position: absolute !important;
|
||||
background: transparent;
|
||||
left: -10px;
|
||||
bottom: -5px;
|
||||
}
|
||||
.toolbar-item-container-uni-dialog .toolbar-bottom-popup.data-v-bf58df78 {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
}
|
||||
134
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/user-selector/index.js
vendored
Normal file
134
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/user-selector/index.js
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
if (!Math) {
|
||||
(Transfer + Dialog)();
|
||||
}
|
||||
const Dialog = () => "../../../common/Dialog/index.js";
|
||||
const Transfer = () => "../../../common/Transfer/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
// type: voiceCall/groupCall/...
|
||||
type: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
currentConversation: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
isGroup: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
emits: ["submit", "cancel"],
|
||||
setup(__props, { expose: __expose, emit: __emit }) {
|
||||
const props = __props;
|
||||
const emits = __emit;
|
||||
const show = common_vendor.ref(false);
|
||||
const groupID = common_vendor.ref("");
|
||||
const memberList = common_vendor.ref([]);
|
||||
const searchMemberList = common_vendor.ref([]);
|
||||
const selfUserID = common_vendor.ref("");
|
||||
const titleMap = {
|
||||
voiceCall: "发起群语音",
|
||||
videoCall: "发起群视频"
|
||||
};
|
||||
const title = common_vendor.computed(() => {
|
||||
return titleMap[props.type] ? titleMap[props.type] : "";
|
||||
});
|
||||
common_vendor.Zt.getUserProfile().then((res) => {
|
||||
var _a;
|
||||
if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.userID) {
|
||||
selfUserID.value = res.data.userID;
|
||||
}
|
||||
});
|
||||
common_vendor.watch(
|
||||
() => {
|
||||
var _a;
|
||||
return [(_a = props == null ? void 0 : props.currentConversation) == null ? void 0 : _a.conversationID, show.value];
|
||||
},
|
||||
(newVal, oldVal) => {
|
||||
if (newVal && newVal !== oldVal) {
|
||||
if (props.isGroup && show.value) {
|
||||
groupID.value = props.currentConversation.groupProfile.groupID;
|
||||
common_vendor.es.getGroupMemberList({
|
||||
groupID: groupID.value
|
||||
}).then((res) => {
|
||||
var _a, _b;
|
||||
memberList.value = (_b = (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.memberList) == null ? void 0 : _b.filter(
|
||||
(user) => (user == null ? void 0 : user.userID) !== selfUserID.value
|
||||
);
|
||||
searchMemberList.value = memberList.value;
|
||||
});
|
||||
} else {
|
||||
groupID.value = "";
|
||||
memberList.value = [];
|
||||
searchMemberList.value = memberList.value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
const search = (searchInfo) => {
|
||||
var _a;
|
||||
const results = (_a = memberList.value) == null ? void 0 : _a.filter(
|
||||
(member) => (member == null ? void 0 : member.userID) === searchInfo
|
||||
);
|
||||
searchMemberList.value = (results == null ? void 0 : results.length) ? results : memberList.value;
|
||||
};
|
||||
const submit = (selectedMemberList) => {
|
||||
const userIDList = [];
|
||||
selectedMemberList == null ? void 0 : selectedMemberList.forEach((user) => {
|
||||
(user == null ? void 0 : user.userID) && userIDList.push(user.userID);
|
||||
});
|
||||
if (props.type === "voiceCall") {
|
||||
emits("submit", { userIDList, groupID: groupID.value, type: 1 });
|
||||
} else if (props.type === "videoCall") {
|
||||
emits("submit", { userIDList, groupID: groupID.value, type: 2 });
|
||||
}
|
||||
searchMemberList.value = memberList.value;
|
||||
toggleShow(false);
|
||||
};
|
||||
const cancel = () => {
|
||||
searchMemberList.value = memberList.value;
|
||||
emits("cancel");
|
||||
toggleShow(false);
|
||||
};
|
||||
const toggleShow = (showStatus) => {
|
||||
show.value = showStatus;
|
||||
};
|
||||
__expose({
|
||||
toggleShow
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o$1(search),
|
||||
b: common_vendor.o$1(submit),
|
||||
c: common_vendor.o$1(cancel),
|
||||
d: common_vendor.p({
|
||||
isSearch: true,
|
||||
title: common_vendor.unref(title),
|
||||
list: common_vendor.unref(searchMemberList),
|
||||
isH5: !common_vendor.unref(TUIKit_utils_env.isPC),
|
||||
isRadio: false
|
||||
}),
|
||||
e: common_vendor.o$1(toggleShow),
|
||||
f: common_vendor.p({
|
||||
show: common_vendor.unref(show),
|
||||
isH5: !common_vendor.unref(TUIKit_utils_env.isPC),
|
||||
isHeaderShow: false,
|
||||
isFooterShow: false,
|
||||
background: false
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
wx.createComponent(_sfc_main);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/user-selector/index.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"dialog": "../../../common/Dialog/index",
|
||||
"transfer": "../../../common/Transfer/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<dialog wx:if="{{f}}" u-s="{{['d']}}" bindupdateShow="{{e}}" u-i="e0d32194-0" bind:__l="__l" u-p="{{f}}"><transfer wx:if="{{d}}" bindsearch="{{a}}" bindsubmit="{{b}}" bindcancel="{{c}}" u-i="e0d32194-1,e0d32194-0" bind:__l="__l" u-p="{{d}}"/></dialog>
|
||||
131
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/video-upload/index.js
vendored
Normal file
131
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/video-upload/index.js
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
const common_assets = require("../../../../../common/assets.js");
|
||||
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
|
||||
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../../offlinePushInfoManager/index.js");
|
||||
const TUIKit_components_TUIChat_config = require("../../config.js");
|
||||
if (!Math) {
|
||||
ToolbarItemContainer();
|
||||
}
|
||||
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
// Video source, only valid for uni-app version, web version only supports selecting videos from files
|
||||
// album: Select from files
|
||||
// camera: Take a video using the camera
|
||||
videoSourceType: {
|
||||
type: String,
|
||||
default: "album"
|
||||
}
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const inputRef = common_vendor.ref();
|
||||
const currentConversation = common_vendor.ref();
|
||||
common_vendor.Jt.watch(common_vendor.o.CONV, {
|
||||
currentConversation: (conversation) => {
|
||||
currentConversation.value = conversation;
|
||||
}
|
||||
});
|
||||
const handleIcon = () => {
|
||||
if (TUIKit_utils_env.isUniFrameWork) {
|
||||
switch (props.videoSourceType) {
|
||||
case "album":
|
||||
return common_assets.videoUniIcon;
|
||||
case "camera":
|
||||
return common_assets.cameraUniIcon;
|
||||
default:
|
||||
return common_assets.videoUniIcon;
|
||||
}
|
||||
} else {
|
||||
const videoIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.videoIconDark : common_assets.videoIconLight;
|
||||
return videoIcon;
|
||||
}
|
||||
};
|
||||
const handleTitle = () => {
|
||||
if (TUIKit_utils_env.isUniFrameWork && props.videoSourceType === "camera") {
|
||||
return "录制";
|
||||
} else {
|
||||
return "视频";
|
||||
}
|
||||
};
|
||||
const onIconClick = () => {
|
||||
var _a, _b, _c, _d, _e;
|
||||
if (TUIKit_utils_env.isUniFrameWork) {
|
||||
if (TUIKit_utils_env.isWeChat && ((_a = common_vendor.i) == null ? void 0 : _a.chooseMedia)) {
|
||||
(_b = common_vendor.i) == null ? void 0 : _b.chooseMedia({
|
||||
mediaType: ["video"],
|
||||
count: 1,
|
||||
sourceType: [props.videoSourceType],
|
||||
maxDuration: 60,
|
||||
success: function(res) {
|
||||
sendVideoMessage(res);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
(_c = common_vendor.i) == null ? void 0 : _c.chooseVideo({
|
||||
count: 1,
|
||||
sourceType: [props.videoSourceType],
|
||||
compressed: false,
|
||||
success: function(res) {
|
||||
sendVideoMessage(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
((_d = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _d.click) && ((_e = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _e.click());
|
||||
}
|
||||
};
|
||||
const sendVideoInWeb = (e) => {
|
||||
var _a, _b;
|
||||
if (((_b = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.files) == null ? void 0 : _b.length) <= 0) {
|
||||
return;
|
||||
}
|
||||
sendVideoMessage(e == null ? void 0 : e.target);
|
||||
e.target.value = "";
|
||||
};
|
||||
const sendVideoMessage = (file) => {
|
||||
var _a, _b, _c, _d, _e;
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
const options = {
|
||||
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
|
||||
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
|
||||
payload: {
|
||||
file
|
||||
},
|
||||
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
|
||||
};
|
||||
const offlinePushInfoCreateParams = {
|
||||
conversation: currentConversation.value,
|
||||
payload: options.payload,
|
||||
messageType: common_vendor.qt.TYPES.MSG_VIDEO
|
||||
};
|
||||
const sendMessageOptions = {
|
||||
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
|
||||
};
|
||||
common_vendor.Qt.sendVideoMessage(options, sendMessageOptions);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o$1(sendVideoInWeb),
|
||||
b: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "video-upload-h5"),
|
||||
c: common_vendor.o$1(onIconClick),
|
||||
d: common_vendor.p({
|
||||
iconFile: handleIcon(),
|
||||
title: handleTitle(),
|
||||
needDialog: false,
|
||||
iconWidth: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "32px" : "20px",
|
||||
iconHeight: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? props.videoSourceType === "album" ? "20px" : "25px" : "18px"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-11a33e36"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/video-upload/index.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"toolbar-item-container": "../toolbar-item-container/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<toolbar-item-container wx:if="{{d}}" class="data-v-11a33e36" u-s="{{['d']}}" bindonIconClick="{{c}}" u-i="11a33e36-0" bind:__l="__l" u-p="{{d}}"><view class="{{['data-v-11a33e36', 'video-upload', b]}}"><input class="data-v-11a33e36" ref="inputRef" title="视频" type="file" data-type="video" accept="video/*" bindchange="{{a}}"></input></view></toolbar-item-container>
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-11a33e36, div.data-v-11a33e36, ul.data-v-11a33e36, ol.data-v-11a33e36, dt.data-v-11a33e36, dd.data-v-11a33e36, li.data-v-11a33e36, dl.data-v-11a33e36, h1.data-v-11a33e36, h2.data-v-11a33e36, h3.data-v-11a33e36, h4.data-v-11a33e36, p.data-v-11a33e36 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-11a33e36, ul.data-v-11a33e36, li.data-v-11a33e36 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-11a33e36 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-11a33e36 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-11a33e36 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-11a33e36 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-11a33e36:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-11a33e36, textarea.data-v-11a33e36 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-11a33e36:focus, input.data-v-11a33e36:active, textarea.data-v-11a33e36:focus, textarea.data-v-11a33e36:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-11a33e36 {
|
||||
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);
|
||||
}
|
||||
87
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/words/index.js
vendored
Normal file
87
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/words/index.js
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const common_assets = require("../../../../../common/assets.js");
|
||||
const TUIKit_components_TUIChat_utils_wordsList = require("../../utils/wordsList.js");
|
||||
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
const TUIKit_components_TUIChat_config = require("../../config.js");
|
||||
if (!Math) {
|
||||
ToolbarItemContainer();
|
||||
}
|
||||
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
emits: ["onDialogPopupShowOrHide"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const wordsIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.wordsIconDark : common_assets.wordsIconLight;
|
||||
const emits = __emit;
|
||||
const currentConversation = common_vendor.ref();
|
||||
const container = common_vendor.ref();
|
||||
common_vendor.Jt.watch(common_vendor.o.CONV, {
|
||||
currentConversation: (conversation) => {
|
||||
currentConversation.value = conversation;
|
||||
}
|
||||
});
|
||||
const selectWord = (item) => {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
const options = {
|
||||
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
|
||||
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
|
||||
payload: {
|
||||
text: common_vendor.Wt.t(`Words.${item.value}`)
|
||||
},
|
||||
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
|
||||
};
|
||||
common_vendor.Qt.sendTextMessage(options);
|
||||
(_f = container == null ? void 0 : container.value) == null ? void 0 : _f.toggleDialogDisplay(false);
|
||||
};
|
||||
const closeDialog = () => {
|
||||
var _a;
|
||||
(_a = container == null ? void 0 : container.value) == null ? void 0 : _a.toggleDialogDisplay(false);
|
||||
};
|
||||
const onDialogShow = () => {
|
||||
emits("onDialogPopupShowOrHide", true);
|
||||
};
|
||||
const onDialogClose = () => {
|
||||
emits("onDialogPopupShowOrHide", false);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("Words.常用语-快捷回复工具")),
|
||||
b: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-header-title"),
|
||||
c: !common_vendor.unref(TUIKit_utils_env.isPC)
|
||||
}, !common_vendor.unref(TUIKit_utils_env.isPC) ? {
|
||||
d: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-header-close"),
|
||||
e: common_vendor.o$1(closeDialog)
|
||||
} : {}, {
|
||||
f: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-header"),
|
||||
g: common_vendor.f(common_vendor.unref(TUIKit_components_TUIChat_utils_wordsList.wordsList), (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`Words.${item.value}`)),
|
||||
b: index,
|
||||
c: common_vendor.o$1(($event) => selectWord(item), index)
|
||||
};
|
||||
}),
|
||||
h: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-list-item"),
|
||||
i: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-list"),
|
||||
j: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5"),
|
||||
k: common_vendor.sr(container, "ac0e1580-0", {
|
||||
"k": "container"
|
||||
}),
|
||||
l: common_vendor.o$1(onDialogShow),
|
||||
m: common_vendor.o$1(onDialogClose),
|
||||
n: common_vendor.p({
|
||||
iconFile: common_vendor.unref(wordsIcon),
|
||||
title: "常用语",
|
||||
needBottomPopup: true,
|
||||
iconWidth: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "26px" : "20px",
|
||||
iconHeight: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "26px" : "20px"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ac0e1580"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/words/index.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"toolbar-item-container": "../toolbar-item-container/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<toolbar-item-container wx:if="{{n}}" class="r data-v-ac0e1580" u-s="{{['d']}}" u-r="container" bindonDialogShow="{{l}}" bindonDialogClose="{{m}}" u-i="ac0e1580-0" bind:__l="__l" u-p="{{n}}"><view class="{{['data-v-ac0e1580', 'words', j]}}"><view class="{{['data-v-ac0e1580', 'words-header', f]}}"><label class="{{['data-v-ac0e1580', 'words-header-title', b]}}">{{a}}</label><label wx:if="{{c}}" class="{{['data-v-ac0e1580', 'words-header-close', d]}}" bindtap="{{e}}"> 关闭 </label></view><view class="{{['data-v-ac0e1580', 'words-list', i]}}"><view wx:for="{{g}}" wx:for-item="item" wx:key="b" class="{{['data-v-ac0e1580', 'words-list-item', h]}}" bindtap="{{item.c}}">{{item.a}}</view></view></view></toolbar-item-container>
|
||||
142
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/words/index.wxss
vendored
Normal file
142
unpackage/dist/dev/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/words/index.wxss
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-ac0e1580, div.data-v-ac0e1580, ul.data-v-ac0e1580, ol.data-v-ac0e1580, dt.data-v-ac0e1580, dd.data-v-ac0e1580, li.data-v-ac0e1580, dl.data-v-ac0e1580, h1.data-v-ac0e1580, h2.data-v-ac0e1580, h3.data-v-ac0e1580, h4.data-v-ac0e1580, p.data-v-ac0e1580 {
|
||||
margin:0;
|
||||
padding:0;
|
||||
font-style:normal;
|
||||
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-ac0e1580, ul.data-v-ac0e1580, li.data-v-ac0e1580 {
|
||||
list-style:none;
|
||||
}
|
||||
img.data-v-ac0e1580 {
|
||||
border:0;
|
||||
vertical-align:middle;
|
||||
pointer-events:none;
|
||||
}
|
||||
body.data-v-ac0e1580 {
|
||||
color:#000;
|
||||
background:#FFF;
|
||||
}
|
||||
.clear.data-v-ac0e1580 {
|
||||
clear:both;
|
||||
height:1px;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
margin-top:-1px;
|
||||
}
|
||||
a.data-v-ac0e1580 {
|
||||
color:#000;
|
||||
text-decoration:none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-ac0e1580:hover {
|
||||
text-decoration:none;
|
||||
}
|
||||
input.data-v-ac0e1580, textarea.data-v-ac0e1580 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-ac0e1580:focus, input.data-v-ac0e1580:active, textarea.data-v-ac0e1580:focus, textarea.data-v-ac0e1580:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-ac0e1580 {
|
||||
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);
|
||||
}
|
||||
.words.data-v-ac0e1580 {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.words-header-close.data-v-ac0e1580 {
|
||||
color: #3370ff;
|
||||
}
|
||||
.words.data-v-ac0e1580 {
|
||||
z-index: 5;
|
||||
width: 315px;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 19.13rem;
|
||||
height: 12.44rem;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.words-header.data-v-ac0e1580 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.words-list.data-v-ac0e1580 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
cursor: pointer;
|
||||
}
|
||||
.words-list-item.data-v-ac0e1580 {
|
||||
cursor: pointer;
|
||||
padding: 4px 0;
|
||||
font-size: 14px;
|
||||
color: #50545c;
|
||||
line-height: 18px;
|
||||
}
|
||||
.words-list-item.data-v-ac0e1580:hover {
|
||||
color: #006eff;
|
||||
}
|
||||
.words-h5.data-v-ac0e1580 {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
max-height: 80vh;
|
||||
height: -webkit-fit-content;
|
||||
height: fit-content;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.words-h5-header-title.data-v-ac0e1580 {
|
||||
font-size: 18px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.words-h5-list.data-v-ac0e1580 {
|
||||
flex: 1;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.words-h5-list-item.data-v-ac0e1580 {
|
||||
cursor: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-moz-tap-highlight-color: transparent;
|
||||
padding: 12px 0;
|
||||
font-size: 16px;
|
||||
color: #50545c;
|
||||
line-height: 18px;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
}
|
||||
Reference in New Issue
Block a user