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