mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 11:00:39 +00:00
bulk-operations v0.1 add opcaity for draged items
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
v-for="item in data"
|
||||
:key="item.unique_id"
|
||||
class="file-item"
|
||||
:class="dragedItems.includes(item) ? 'draged' : '' "
|
||||
/>
|
||||
</transition-group>
|
||||
</div>
|
||||
@@ -58,6 +59,7 @@
|
||||
v-for="item in data"
|
||||
:key="item.unique_id"
|
||||
class="file-item"
|
||||
:class="dragedItems.includes(item) ? 'draged' : '' "
|
||||
/>
|
||||
</transition-group>
|
||||
</div>
|
||||
@@ -132,6 +134,15 @@
|
||||
isEmpty() {
|
||||
return this.data.length == 0
|
||||
},
|
||||
dragedItems() {
|
||||
if(!this.fileInfoDetail.includes(this.draggingId)){
|
||||
return [this.draggingId]
|
||||
}
|
||||
|
||||
if(this.fileInfoDetail.includes(this.draggingId)) {
|
||||
return this.fileInfoDetail
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -142,7 +153,9 @@
|
||||
},
|
||||
methods: {
|
||||
deleteItems() {
|
||||
console.log('delete items');
|
||||
if(this.fileInfoDetail.length > 0 && this.$checkPermission('master') || this.$checkPermission('editor')) {
|
||||
this.$store.dispatch('deleteItem')
|
||||
}
|
||||
},
|
||||
dropUpload(event) {
|
||||
// Upload external file
|
||||
@@ -221,6 +234,9 @@
|
||||
|
||||
events.$on('drop', () => {
|
||||
this.isDragging = false
|
||||
setTimeout(() => {
|
||||
this.draggingId = undefined
|
||||
}, 10);
|
||||
})
|
||||
|
||||
events.$on('fileItem:deselect', () =>
|
||||
@@ -248,6 +264,10 @@
|
||||
@import '@assets/vue-file-manager/_variables';
|
||||
@import '@assets/vue-file-manager/_mixins';
|
||||
|
||||
.draged {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#multi-selected {
|
||||
position: fixed;
|
||||
pointer-events: none;
|
||||
|
||||
Reference in New Issue
Block a user