element中el-secect下拉框乱飞不在自己位置上
使用element写后台的时候,经常遇到要写下拉框,有时候需要连续好几个弹框,就会导致下拉框内容乱飞
为此亲测以下方法可以修改这个问题
<el-select v-model="subject" placeholder="请选择专业" :popper-append-to-body='false'>
<el-option v-for="item in subjectList" :key='item.id' :label="item.title" :value="item.id"></el-option>
</el-select>
加上这个属性,再加上以下样式即可完美解决
>>>.el-select-dropdown { position: absolute !important; left: 0px !important; top: 30px!important; }