feat: 图片引用

This commit is contained in:
2026-03-24 16:57:40 +08:00
parent b1bf290c06
commit 0428783f5c
9 changed files with 79 additions and 28 deletions

View File

@@ -129,7 +129,7 @@
}>()
// watch(
// () => props.content,
// () => props,
// (newVal) => {
// console.log('newVal-----', newVal)
// },
@@ -139,8 +139,12 @@
const emit = defineEmits(['regenerate'])
const imageList = computed(() => {
const { imageUrls } = props.content
const { imageUrls, role } = props.content
const list = []
if (role === 'user') {
const quotaList = props.content.image_url ?? []
list.push(...quotaList)
}
if (!imageUrls || imageUrls.length === 0) return list
imageUrls.forEach((item) => {
if (typeof item === 'string') {