forked from epicmaxco/vuestic-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vuestic-popover): implement vuestic popover element
- Loading branch information
1 parent
062c72e
commit 23c34aa
Showing
4 changed files
with
75 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/components/vuestic-components/vuestic-popover/VuesticPopover.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
<v-popover | ||
:popover-class="popoverClass" | ||
:open="open" | ||
:disabled="disabled" | ||
:placement="placement" | ||
:auto-hide="autoHide" | ||
> | ||
<slot name="trigger"></slot> | ||
<template slot="popover"> | ||
<div class="popover-icon" v-if="icon"> | ||
<slot name="icon"></slot> | ||
</div> | ||
<div class="popover-content"> | ||
<div class="popover-header"> | ||
<slot name="header"></slot> | ||
</div> | ||
<div class="popover-body"> | ||
<slot name="body"></slot> | ||
</div> | ||
</div> | ||
</template> | ||
</v-popover> | ||
</template> | ||
|
||
<script> | ||
import { VPopover } from 'v-tooltip' | ||
export default { | ||
name: 'vuestic-popover', | ||
components: { VPopover }, | ||
props: { | ||
open: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
placement: { | ||
type: String, | ||
default: 'auto' | ||
}, | ||
popoverClass: { | ||
type: [String, Array], | ||
default: 'vuestic-tooltip' | ||
}, | ||
autoHide: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}, | ||
computed: { | ||
icon () { | ||
return this.$slots.icon | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang='scss' scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters