feat: File list hover rename done.
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
<Column bodyClass="text-neutral-500">
|
||||
<template #body="slotProps">
|
||||
<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">edit_square</span></li>
|
||||
<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">download</span></li>
|
||||
<li><span class="material-symbols-outlined align-bottom cursor-pointer hover:text-primary">delete</span></li>
|
||||
</ul>
|
||||
@@ -234,22 +234,46 @@
|
||||
break;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Right Click DOM Event
|
||||
* @param {event} event
|
||||
* @param {string} file
|
||||
*/
|
||||
onRightClick(event, file) {
|
||||
this.selectedType = file.type;
|
||||
this.selectedId = file.id;
|
||||
this.$refs.fileRightMenu.show(event)
|
||||
},
|
||||
/**
|
||||
* Right Click Table DOM Event
|
||||
* @param {event} event
|
||||
*/
|
||||
onRightClickTable(event) {
|
||||
this.selectedType = event.data.type;
|
||||
this.selectedId = event.data.id;
|
||||
this.$refs.fileRightMenu.show(event.originalEvent)
|
||||
},
|
||||
/**
|
||||
* Right Click Gride Card DOM Event
|
||||
* @param {event} event
|
||||
* @param {number} index
|
||||
*/
|
||||
onGridCardClick(file, index) {
|
||||
this.selectedType = file.type;
|
||||
this.selectedId = file.id;
|
||||
this.isActive = index;
|
||||
},
|
||||
rename() {
|
||||
/**
|
||||
* File's Rename
|
||||
* @param {string} type
|
||||
* @param {number} id
|
||||
* @param {string} source hover icon
|
||||
*/
|
||||
rename(type, id, source) {
|
||||
if(type && id && source === 'list-hover') {
|
||||
this.selectedType = type;
|
||||
this.selectedId = id;
|
||||
}
|
||||
renameModal(this.store.rename, this.selectedType, this.selectedId);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user