fix : 修复分摊编辑传参问题
This commit is contained in:
@@ -223,21 +223,20 @@ const isSingleFile = ref(false)
|
||||
const allFileList = ref([])
|
||||
const deleteFileVal = ref({})
|
||||
const singleFileList = ref([])
|
||||
if (props.formData.fileList !== null && props.formData.fileList?.length > 0) {
|
||||
allFileList.value = props.formData.fileList
|
||||
}
|
||||
|
||||
// if (props.formData.fileList !== null && props.formData.fileList?.length > 0) {
|
||||
// allFileList.value = props.formData.fileList
|
||||
// }
|
||||
watch(() => props.showSingleTable, (newVal) => {
|
||||
props.showSingleTable = newVal
|
||||
}, {deep: true})
|
||||
// watch(() => props.formData.fileList, (newVal) => {
|
||||
// console.log('newVal-fileList', newVal)
|
||||
// if (props.preview) {
|
||||
// // newVal?.forEach(item => {
|
||||
// // allFileList.value.push(item)
|
||||
// // })
|
||||
// }
|
||||
// }, {deep: true})
|
||||
watch(() => props.formData.fileList, (newVal) => {
|
||||
console.log('newVal-fileList', newVal)
|
||||
if (props.preview) {
|
||||
newVal?.forEach(item => {
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
}
|
||||
}, {immediate: true})
|
||||
// watch(() => props.otherFileList, (newVal) => {
|
||||
// props.otherFileList=newVal
|
||||
// if (props.preview) {
|
||||
@@ -280,8 +279,6 @@ const handleDelete = (row, type) => {
|
||||
singleFileList.value.splice(singleFileList.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||
isSingleFile.value = false
|
||||
} else {
|
||||
console.log('allFileList.value',allFileList.value,row)
|
||||
console.log('allFileList.value.findIndex((item) => item.id === row.fileId)',allFileList.value.findIndex((item) => item.id === row.fileId))
|
||||
allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user