bugfix: 切换对话时先清空当前列表
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user