feat: Files delete modal error text done.
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
<ul class="opacity-0 group-hover:opacity-100 flex justify-end items-center gap-x-2 text-neutral-700">
|
||||
<li><span class="material-symbols-outlined align-bottom cursor-pointer hover:text-primary" @click="rename(slotProps.data.type, slotProps.data.id, 'list-hover')">edit_square</span></li>
|
||||
<li><span class="material-symbols-outlined align-bottom cursor-pointer hover:text-primary" @click="download(slotProps.data.type, slotProps.data.id, 'list-hover', slotProps.data.name)">download</span></li>
|
||||
<li><span class="material-symbols-outlined align-bottom cursor-pointer hover:text-primary" @click="deleteFile(slotProps.data.type, slotProps.data.id, 'list-hover')">delete</span></li>
|
||||
<li><span class="material-symbols-outlined align-bottom cursor-pointer hover:text-primary" @click="deleteFile(slotProps.data.type, slotProps.data.id, slotProps.data.name, 'list-hover')">delete</span></li>
|
||||
</ul>
|
||||
</template>
|
||||
</Column>
|
||||
@@ -288,14 +288,15 @@
|
||||
* @param {number} id
|
||||
* @param {string} source hover icon
|
||||
*/
|
||||
async deleteFile(type, id, source) {
|
||||
async deleteFile(type, id, name, source) {
|
||||
let srt = '';
|
||||
let data = [];
|
||||
|
||||
// 判斷是否來自 hover icon 選單
|
||||
if(type && id && source === 'list-hover') {
|
||||
if(type && id && name && source === 'list-hover') {
|
||||
this.selectedType = type;
|
||||
this.selectedId = id;
|
||||
this.selecteName = name;
|
||||
}
|
||||
// 取得相依性檔案
|
||||
await this.store.getDependents(this.selectedType, this.selectedId);
|
||||
@@ -314,7 +315,7 @@
|
||||
srt += content;
|
||||
});
|
||||
}
|
||||
deleteFileModal(srt, this.selectedType, this.selectedId);
|
||||
deleteFileModal(srt, this.selectedType, this.selectedId, this.selecteName);
|
||||
srt = '';
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user