美文网首页
Ant Design】Modal 中Select组件下拉选项随页

Ant Design】Modal 中Select组件下拉选项随页

作者: diviner_杨 | 来源:发表于2019-05-14 17:43 被阅读0次
Ant Design vue Modal 中Select组件下拉选项随页面滚动与Select框分离异常
Select
 <a-form-item label="承运商:" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
   <a-select  class="W300" 
      :filterOption="filterOption" 
      allowClear 
      showSearch
      @change="handleChange"
      placeholder="请选择"
      :getPopupContainer="(triggerNode)=>{ return triggerNode.parentNode}"//新增加这个定位
      v-decorator="['carrierId',{rules: [{ required: true, message: '承运商' }]}]"
    >
     <a-select-option 
        v-for="(item,index) in carrierList" 
        :value="item.companyId"
        :key="index"
     >
        {{item.companyName}}
     </a-select-option>
  </a-select>
 </a-form-item>
Cascader
 <a-form-item label="始发地:" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
       <a-cascader 
        :options="options" 
        @change="changecityFrom" 
        placeholder="请输入"
        :getPopupContainer="(triggerNode)=>{ return triggerNode.parentNode}" //新增加这个定位
        v-decorator="['fromcity',{rules: [{ required: true, message: '请选择经营省市区'},      
        {validator:this.startChange}]}]"
  />
  </a-form-item>

相关文章

网友评论

      本文标题:Ant Design】Modal 中Select组件下拉选项随页

      本文链接:https://www.haomeiwen.com/subject/rcwaoqtx.html