add select

This commit is contained in:
kandrusyak
2022-11-02 18:39:20 +03:00
parent 4fd1ff880c
commit ac282a624f
9 changed files with 281 additions and 121 deletions

View File

@@ -0,0 +1,37 @@
<template lang="pug">
teleport(:to="appContainer")
.base-menu(:style="styles")
slot
</template>
<script>
export default {
name: "BaseMenu",
computed: {
appContainer() {
return this.$.appContext.app._container;
},
parent() {
return this.$parent.$el;
},
parentSize() {
return this.parent?.getBoundingClientRect();
},
styles() {
return {
left: this.parentSize.left + "px",
top: this.parentSize.top + this.parentSize.height + "px",
};
},
},
mounted() {
console.log(this.parentSize);
},
};
</script>
<style scoped lang="sass">
.base-menu
position: absolute
z-index: 10
</style>