zoukankan      html  css  js  c++  java
  • 修改element ui select选择器 样式

    修改选择器的下拉框,下拉框是在body标签的外面所以要设置

    :popper-append-to-body="false"
    把下拉框放进body里面
     
    再自定义类名
    popper-class="select-popper"
     .select-popper  .el-select-dropdown__item {
      height: 77px !important;
      line-height: 37px !important;
    }

    完整代码

            <el-select v-model="value" placeholder="请选择" @change="Addresschange" class="select_show"  :popper-append-to-body="false" popper-class="select-popper">
            <el-option
              v-for="item in AddressList"
              :key="item.address_id"
              :label="item.name"
              :value="item.address_id"
            >
              <div class="float_content">
                <div style="float: left">
                  {{ item.name }}
                </div>
                <div style="float: right; color: #8492a6; font-size: 13px">
                  {{ item.phone }}
                </div>
                <div style="clear: both;display: flex;justify-content: space-between;align-items:center">
                  <div>
                    {{
                      item.region.province + item.region.city + item.region.region
                    }}
                  </div>
                  <div style="margin-left:10px; color: #8492a6; font-size: 13px">
                    {{ item.detail }}
                  </div>
                </div>
              </div>
            </el-option>
          </el-select>

                                                                                                     

    参考:https://www.jianshu.com/p/6e4e7dd14621

  • 相关阅读:
    词根——rect
    6
    7
    5
    3
    4
    2
    1
    DBUtils
    Websocket
  • 原文地址:https://www.cnblogs.com/cndl/p/14962194.html
Copyright © 2011-2022 走看看