remove unused popover target from portal experiment
This commit is contained in:
parent
b19d51c3dc
commit
f007a795ac
3 changed files with 1 additions and 49 deletions
|
@ -82,7 +82,7 @@ const Popover = {
|
|||
: yOffset + yOffset
|
||||
|
||||
const xOffset = (this.offset && this.offset.x) || 0
|
||||
const translateX = (+anchorEl.offsetWidth * 0.5) - content.offsetWidth * 0.5 + horizOffset + xOffset
|
||||
const translateX = (anchorEl.offsetWidth * 0.5) - content.offsetWidth * 0.5 + horizOffset + xOffset
|
||||
|
||||
this.styles = {
|
||||
opacity: 1,
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
const PopoverTarget = {
|
||||
name: 'PopoverTarget',
|
||||
computed: {
|
||||
ids () {
|
||||
const popovers = this.$store.state.popover.popovers
|
||||
return Object.keys(popovers)
|
||||
},
|
||||
styles () {
|
||||
return this.ids.reduce((acc, id) => {
|
||||
const el = this.$store.state.popover.popovers[id]
|
||||
const box = el.getBoundingClientRect()
|
||||
acc[id] = {
|
||||
top: `${box.y}px`,
|
||||
left: `${box.x}px`
|
||||
}
|
||||
console.log(acc)
|
||||
return acc
|
||||
}, {})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default PopoverTarget
|
|
@ -1,25 +0,0 @@
|
|||
<template>
|
||||
<div class="popover-targets">
|
||||
<portal-target
|
||||
v-for="id in ids"
|
||||
:key="id"
|
||||
:name="id"
|
||||
:style="styles[id]"
|
||||
class="popover-target"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script src="./popover_target.js" />
|
||||
<style lang="scss">
|
||||
|
||||
.popover-targets {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.popover-target {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
</style>
|
Loading…
Reference in a new issue