vue2+antd1.x中select和a-range-picker使用getPopupContainer和getCalendarContainer
- select
<div ref="container"> <a-select :getPopupContainer="() => $refs.container" v-model="queryParam.region" placeholder="请选择区域" showSearch :filterOption="filterOption" allowClear > <a-select-option v-for="item in regionList" :key="item.city" :value="item.city">{{ item.city }}</a-select-option> </a-select> </div>
- a-range-picker
<a-range-picker :getCalendarContainer="trigger => trigger.parentNode" v-model="queryParam.birthdayRange" format="YYYY-MM-DD" :placeholder="['开始时间', '结束时间']" @change="handlePieDate" />