feat: 图片引用
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user