mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
added prettier
This commit is contained in:
@@ -1,47 +1,41 @@
|
||||
<template>
|
||||
<div v-if="isVisible">
|
||||
<!--Overlay component-->
|
||||
<div
|
||||
@click.capture="hidePopover"
|
||||
class="absolute top-12 z-20 w-60 dark:bg-dark-foreground bg-white shadow-xl rounded-lg overflow-hidden"
|
||||
:class="{'right-0': side === 'left', 'left-0': side === 'right'}"
|
||||
>
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div v-if="isVisible">
|
||||
<!--Overlay component-->
|
||||
<div
|
||||
@click.capture="hidePopover"
|
||||
class="absolute top-12 z-20 w-60 overflow-hidden rounded-lg bg-white shadow-xl dark:bg-dark-foreground"
|
||||
:class="{ 'right-0': side === 'left', 'left-0': side === 'right' }"
|
||||
>
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<!--Clickable layer to close overlays-->
|
||||
<div
|
||||
@click="hidePopover"
|
||||
class="fixed top-0 left-0 right-0 bottom-0 z-10 cursor-pointer"
|
||||
></div>
|
||||
</div>
|
||||
<!--Clickable layer to close overlays-->
|
||||
<div @click="hidePopover" class="fixed top-0 left-0 right-0 bottom-0 z-10 cursor-pointer"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {events} from "../../bus";
|
||||
import { events } from '../../bus'
|
||||
|
||||
export default {
|
||||
name: 'PopoverItem',
|
||||
props: [
|
||||
'side',
|
||||
'name',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
isVisible: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hidePopover() {
|
||||
setTimeout(() => this.isVisible = false, 10)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
events.$on('popover:open', name => {
|
||||
if (this.name === name) {
|
||||
this.isVisible = !this.isVisible
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'PopoverItem',
|
||||
props: ['side', 'name'],
|
||||
data() {
|
||||
return {
|
||||
isVisible: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hidePopover() {
|
||||
setTimeout(() => (this.isVisible = false), 10)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
events.$on('popover:open', (name) => {
|
||||
if (this.name === name) {
|
||||
this.isVisible = !this.isVisible
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
<template>
|
||||
<div class="popover-wrapper">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="popover-wrapper">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PopoverWrapper',
|
||||
}
|
||||
export default {
|
||||
name: 'PopoverWrapper',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.popover-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
.popover-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,28 +1,25 @@
|
||||
<template>
|
||||
<div class="toolbar-button-wrapper">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="toolbar-button-wrapper">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ToolbarWrapper',
|
||||
}
|
||||
export default {
|
||||
name: 'ToolbarWrapper',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.toolbar-button-wrapper {
|
||||
margin-left: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.toolbar-button-wrapper {
|
||||
margin-left: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1024px) {
|
||||
|
||||
.toolbar-button-wrapper {
|
||||
margin-left: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1024px) {
|
||||
.toolbar-button-wrapper {
|
||||
margin-left: 25px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<div class="toolbar-tools">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="toolbar-tools">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ToolbarWrapper',
|
||||
}
|
||||
export default {
|
||||
name: 'ToolbarWrapper',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "resources/sass/vuefilemanager/_variables";
|
||||
@import "resources/sass/vuefilemanager/_mixins";
|
||||
@import 'resources/sass/vuefilemanager/_variables';
|
||||
@import 'resources/sass/vuefilemanager/_mixins';
|
||||
|
||||
.toolbar-tools {
|
||||
text-align: right;
|
||||
display: flex;;
|
||||
}
|
||||
.toolbar-tools {
|
||||
text-align: right;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user