bugfix: 切换对话时先清空当前列表

This commit is contained in:
2026-03-02 16:40:40 +08:00
parent 4063dfb106
commit 1669ac78a9
3 changed files with 35 additions and 20 deletions

View File

@@ -232,15 +232,15 @@
formData.append('file', file)
uploadImage(formData).then((res) => {
const reader = new FileReader()
reader.onload = (e) => {
uploadedImages.value.push({
url: e.target?.result as string,
name: file.name,
path: res
})
}
reader.readAsDataURL(file)
const reader = new FileReader()
reader.onload = (e) => {
uploadedImages.value.push({
url: e.target?.result as string,
name: file.name,
path: res
})
}
reader.readAsDataURL(file)
})
}
})
@@ -565,6 +565,9 @@
const handleCreateProject = async () => {
// 这里可以添加创建项目的逻辑
if (!inputValue.value.trim()) {
return
}
const params = {
type: typeValue.value,
area: areaValue.value,