fix(cascader): menu misplaced

This commit is contained in:
07akioni 2019-08-24 01:45:32 +08:00
parent b63769f077
commit 2a01e47932
2 changed files with 4 additions and 1 deletions

View File

@ -72,7 +72,9 @@ export default {
// console.log('scroll') // console.log('scroll')
if (!this.active) return if (!this.active) return
const activator = this.$refs.activator.$el || this.$refs.activator const activator = this.$refs.activator.$el || this.$refs.activator
// console.log(activator)
const activatorBoundingClientRect = activator.getBoundingClientRect() const activatorBoundingClientRect = activator.getBoundingClientRect()
// console.log(activatorBoundingClientRect)
// console.log(this.$refs.popoverBody) // console.log(this.$refs.popoverBody)
// debugger // debugger
const contentBoundingClientRect = this.$refs.content.getBoundingClientRect() const contentBoundingClientRect = this.$refs.content.getBoundingClientRect()

View File

@ -92,8 +92,9 @@
overflow: visible; overflow: visible;
transform: translateZ(0); transform: translateZ(0);
.n-cascader-menu__content { .n-cascader-menu__content {
margin-top: 4px;
.n-cascader-menu { .n-cascader-menu {
margin-top: 4px;
margin-bottom: 4px;
display: flex; display: flex;
z-index: 0; z-index: 0;
position: relative; position: relative;