小程序客服图片报警处理,瀑布流重构

This commit is contained in:
kele
2023-07-14 11:14:26 +08:00
parent 5c3f0ab2f3
commit d4ef49b913
4 changed files with 41 additions and 20 deletions
+3 -3
View File
@@ -494,7 +494,7 @@ export function useChatWebSocket(socketConfig) {
const img = await readImg(file);
const blob = await compressImg(img, file.type);
const { data } = await upload(file.name, blob);
let image = `<img src='${data.fullurl}' style='object-fit: cover;width:100px;height:100px;border-radius:6px'>`;
let image = `<img class="full-url" src='${data.fullurl}'>`;
document.execCommand('insertHTML', false, image);
} else {
document.execCommand('insertHTML', false, paste.getData('text'));
@@ -516,7 +516,7 @@ export function useChatWebSocket(socketConfig) {
const img = await readImg(file);
const blob = await compressImg(img, file.type);
const { data } = await upload(file.name, blob);
let image = `<img src='${data.fullurl}' style='object-fit: cover;width:100px;height:100px;border-radius:6px'>`;
let image = `<img class="full-url" src='${data.fullurl}' >`;
document.execCommand('insertHTML', false, image);
} else {
ElMessage({
@@ -818,4 +818,4 @@ export function useChatWebSocket(socketConfig) {
showTime,
formatTime,
};
}
}