getPopupContainer解决ant-design-vue select组件下拉框偏移错位

  <Select
      allowClear
      class="book-select"
      @change="value=>handleSelectChange('publish',value)"
      placeholder="出版社"
      :getPopupContainer="
          triggerNode => {
            return triggerNode.parentNode || document.body;
          }
        "
    >
      <SelectOption
        v-for="(publishItem,index) in publishes"
        :value="publishItem.code"
        :key="index"
      >{{publishItem.name}}</SelectOption>
    </Select>
posted @ 2021-09-17 17:01  泽泽生龙  阅读(1441)  评论(0编辑  收藏  举报