bugfix: 引用图片删除
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user