From d4ef49b9134d79492b19cb9bccbf59590efbe987 Mon Sep 17 00:00:00 2001 From: kele <1184860403@qq.com> Date: Fri, 14 Jul 2023 11:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=AE=A2=E6=9C=8D?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=8A=A5=E8=AD=A6=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E7=80=91=E5=B8=83=E6=B5=81=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/chat/index.vue | 22 +++++++++++-- pages/chat/socket.js | 6 ++-- .../s-goods-column/s-goods-column.vue | 32 +++++++++++-------- .../s-share-modal/canvas-poster/index.vue | 1 + 4 files changed, 41 insertions(+), 20 deletions(-) diff --git a/pages/chat/index.vue b/pages/chat/index.vue index 04d438d5..1c9422d4 100644 --- a/pages/chat/index.vue +++ b/pages/chat/index.vue @@ -495,9 +495,9 @@ }); chat.showTools = false; // scrollBottom(); - setTimeout(()=>{ + setTimeout(() => { chat.msg = ''; - },100) + }, 100); } // 点击猜你想问 @@ -546,7 +546,7 @@ let emojiFile = selEmojiFile(item); newData = newData.replace( item, - ``, ); @@ -587,6 +587,7 @@ background-size: 750rpx 100%; z-index: 1; } + .chat-wrap { // :deep() { // .ui-navbar-box { @@ -701,10 +702,12 @@ background: #fff; color: #333; } + :deep() { .imgred { width: 100%; } + .imgred, img { width: 100%; @@ -852,3 +855,16 @@ } } + diff --git a/pages/chat/socket.js b/pages/chat/socket.js index b68dfbf1..840931cf 100644 --- a/pages/chat/socket.js +++ b/pages/chat/socket.js @@ -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 = ``; + let image = ``; 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 = ``; + let image = ``; document.execCommand('insertHTML', false, image); } else { ElMessage({ @@ -818,4 +818,4 @@ export function useChatWebSocket(socketConfig) { showTime, formatTime, }; -} +} \ No newline at end of file diff --git a/sheep/components/s-goods-column/s-goods-column.vue b/sheep/components/s-goods-column/s-goods-column.vue index 1225884b..80f10c55 100644 --- a/sheep/components/s-goods-column/s-goods-column.vue +++ b/sheep/components/s-goods-column/s-goods-column.vue @@ -65,12 +65,7 @@ - + { + let totalHeight = 0; const goodsPriceCard = data[0]; - const card = { - width: goodsPriceCard.width, - height: (goodsPriceCard.width / e.detail.width) * e.detail.height + goodsPriceCard.height, - }; - emits('getHeight', card.height); + if (props.data.image_wh) { + totalHeight = + (goodsPriceCard.width / props.data.image_wh.w) * props.data.image_wh.h + + goodsPriceCard.height; + } else { + totalHeight = goodsPriceCard.width; + } + emits('getHeight', totalHeight); }); } } + onMounted(() => { + nextTick(() => { + getGoodsPriceCardWH(); + }); + });