bugfix: 引用图片删除

This commit is contained in:
2026-03-26 16:45:35 +08:00
parent f4dfcfbfe4
commit 0118040e27
5 changed files with 104 additions and 91 deletions

View File

@@ -635,7 +635,6 @@
messageList.value = [...ancestorsList]
params.versionID = current?.id
sketchList.value = imgList
console.log('------------', messageList.value)
})
}

View File

@@ -35,16 +35,18 @@
.report-card {
cursor: pointer;
width: 100%;
margin: 2.4rem 0;
margin: 1.2rem 0 0;
min-height: 11.2rem;
background: url('@/assets/images/report-card.png') no-repeat;
background-size: 100% 100%;
padding: 2.9rem;
overflow: hidden;
position: relative;
margin-bottom: 0;
&.is-url {
background: url('@/assets/images/link-card.png') no-repeat;
background-size: 100% 100%;
margin: 2.4rem 0;
}
&.is-sketch {
background: url('@/assets/images/sketch-card.png') no-repeat;
@@ -61,7 +63,7 @@
&-header {
font-family: 'Medium';
font-size: 1.6rem;
font-size: 1.2rem;
margin-bottom: 1.3rem;
overflow: hidden;
text-overflow: ellipsis;
@@ -80,7 +82,7 @@
&-content {
font-family: 'Regular';
font-weight: 300;
font-size: 1.6rem;
font-size: 1.2rem;
color: #7c7c7c;
}
}

View File

@@ -16,7 +16,7 @@
class="preview-image"
@click="previewImage(image.url)"
/>
<div class="image-remove-btn" @click="removeImage(index)">
<div class="image-remove-btn" @click="removeImage(index, image)">
<SvgIcon name="delete" size="16" />
</div>
</div>
@@ -305,8 +305,16 @@
}
// 移除图片
const removeImage = (index: number) => {
uploadedImages.value.splice(index, 1)
const removeImage = (index: number, item: any) => {
if (quoteList.value.includes(item)) {
const quoteIndex = quoteList.value.indexOf(item)
if (quoteIndex > -1) {
quoteList.value.splice(quoteIndex, 1)
}
return
} else {
uploadedImages.value.splice(index, 1)
}
}
const styleKeys: string[] = [
@@ -472,8 +480,7 @@
customPlaceholder.value = placeholderSpan
// 打字机效果显示placeholder文本
const placeholderText =
'Generate a furniture trending report for 2026, including popular styles and design directions.'
const placeholderText = t('Input.reportPlaceholder')
typeWriterEffect(placeholderSpan, placeholderText)
const removePlaceholderOnInput = () => {
@@ -815,6 +822,8 @@
}
const handleQuote = (url: string) => {
const hasQuoted = quoteList.value.includes(url)
if (hasQuoted) return
quoteList.value.push(url)
}
onUnmounted(() => {