fix: 修改弹窗

This commit is contained in:
LiangWei-P
2025-06-20 15:10:27 +08:00
parent fa745b73c2
commit 2afc95d531
324 changed files with 643 additions and 622 deletions

View File

@@ -6,22 +6,16 @@ const TUIKit_utils_enableSampleTaskStatus = require("../../../utils/enableSample
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 + Words + CustomMessage + ToolbarItemContainer + UserSelector)();
(EmojiPickerDialog + ImageUpload + VideoUpload + Words + CustomMessage + UserSelector + popupinvite)();
}
const ImageUpload = () => "./image-upload/index.js";
const VideoUpload = () => "./video-upload/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 CustomMessage = () => "./evaluate/CustomMessage.js";
const __default__ = {
options: {
styleIsolation: "shared"
}
};
const popupinvite = () => "./evaluate/popupinvite.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
__name: "index",
props: {
displayType: {}
@@ -38,6 +32,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
const featureConfig = TUIKit_components_TUIChat_config.ChatConfig.getFeatureConfig();
const neededCountFirstPage = common_vendor.ref(8);
const slicePos = common_vendor.ref(0);
const popupinviteRef = common_vendor.ref(null);
const computeToolbarPaging = () => {
if (featureConfig.InputImage && featureConfig.InputVideo) {
neededCountFirstPage.value -= 4;
@@ -70,7 +65,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
if (conversationID !== ((_a = currentConversation.value) == null ? void 0 : _a.conversationID)) {
getExtensionList();
computeToolbarPaging();
currentConversation.value = common_vendor.Jt.getData(common_vendor.o.CONV, "currentConversation");
currentConversation.value = common_vendor.Jt.getData(
common_vendor.o.CONV,
"currentConversation"
);
isGroup.value = conversationID.startsWith(common_vendor.qt.TYPES.CONV_GROUP);
}
};
@@ -83,7 +81,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
TUIKit_utils_enableSampleTaskStatus.enableSampleTaskStatus("customerService");
}
currentExtensionList.value = [
...common_vendor.R.getExtensionList(common_vendor.E.TUIChat.EXTENSION.INPUT_MORE.EXT_ID, params)
...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") {
@@ -106,54 +107,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
}
});
}
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)
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.getOfflinePushInfo(
TUIKit_components_TUIChat_offlinePushInfoManager_const.PUSH_SCENE.CALL
)
}
});
currentUserSelectorExtension.value = null;
@@ -192,70 +153,26 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
videoSourceType: "camera"
})
} : {}, {
j: common_vendor.unref(neededCountFirstPage) === 1
}, common_vendor.unref(neededCountFirstPage) === 1 ? common_vendor.e({
k: common_vendor.unref(featureConfig).InputQuickReplies
j: common_vendor.unref(featureConfig).InputQuickReplies
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
l: common_vendor.o$1(handleSwiperDotShow)
k: common_vendor.o$1(handleSwiperDotShow)
} : {}, {
m: common_vendor.unref(featureConfig).InputCustomMessage
l: common_vendor.unref(featureConfig).InputCustomMessage
}, common_vendor.unref(featureConfig).InputCustomMessage ? {
n: common_vendor.o$1(handleSwiperDotShow)
} : {}) : {}, {
o: common_vendor.unref(neededCountFirstPage) > 1
}, common_vendor.unref(neededCountFirstPage) > 1 ? common_vendor.e({
p: common_vendor.unref(featureConfig).InputQuickReplies
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
q: common_vendor.o$1(handleSwiperDotShow)
} : {}, {
r: common_vendor.unref(featureConfig).InputCustomMessage
}, common_vendor.unref(featureConfig).InputCustomMessage ? {
s: common_vendor.o$1(handleSwiperDotShow)
} : {}) : {}, {
t: common_vendor.unref(neededCountFirstPage) <= 1
}, common_vendor.unref(neededCountFirstPage) <= 1 ? common_vendor.e({
v: 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-9-" + i0,
d: common_vendor.p({
iconFile: genExtensionIcon(extension),
title: genExtensionText(extension),
iconWidth: "25px",
iconHeight: "25px",
needDialog: false
})
} : {}, {
e: index
});
}),
w: common_vendor.unref(neededCountFirstPage) === 1
}, common_vendor.unref(neededCountFirstPage) === 1 ? common_vendor.e({
x: common_vendor.unref(featureConfig).InputQuickReplies
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
y: common_vendor.o$1(handleSwiperDotShow)
} : {}) : common_vendor.e({
z: common_vendor.unref(featureConfig).InputQuickReplies
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
A: common_vendor.o$1(handleSwiperDotShow)
} : {}, {
B: common_vendor.unref(featureConfig).InputCustomMessage
}, common_vendor.unref(featureConfig).InputCustomMessage ? {
C: common_vendor.o$1(handleSwiperDotShow)
} : {})) : {}, {
D: common_vendor.unref(isSwiperIndicatorDotsEnable)
}), {
E: common_vendor.sr(userSelectorRef, "76f68da4-13", {
m: common_vendor.o$1(handleSwiperDotShow)
} : {}), {
n: common_vendor.sr(userSelectorRef, "d01919ac-7", {
"k": "userSelectorRef"
}),
F: common_vendor.o$1(onUserSelectorSubmit),
G: common_vendor.o$1(onUserSelectorCancel),
H: common_vendor.p({
o: common_vendor.o$1(onUserSelectorSubmit),
p: common_vendor.o$1(onUserSelectorCancel),
q: common_vendor.p({
type: common_vendor.unref(selectorShowType),
currentConversation: common_vendor.unref(currentConversation),
isGroup: common_vendor.unref(isGroup)
}),
r: common_vendor.sr(popupinviteRef, "d01919ac-8", {
"k": "popupinviteRef"
})
});
};