首页 > 其他分享 >el-select选择对象value-key属性

el-select选择对象value-key属性

时间:2022-10-19 13:26:12浏览次数:92  
标签:el 选择对象 value key select 属性

 <el-row v-for="(obj, idx) in deliveryList" :key="idx">
          <el-col :span="8">
            <el-form-item label="交付中心">
              <el-select
                v-model="deliveryList[idx]"
                value-key="schoolId"
                filterable remote clearable reserve-keyword placeholder="请输入助教姓名"
                :remote-method="searchSchool" :loading="loading"
                style="width: 100%;">
                <el-option
                  v-for="item in searchDeliveryList"
                  :key="item.schoolId"
                  :label="item.schoolName"
                  :value="item">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item v-if="idx==deliveryList.length-1">
              <el-button @click="addDelivery" type="success" size="mini" icon="el-icon-plus" circle></el-button>
              <el-button @click="removeDelivery" type="danger" size="mini" icon="el-icon-minus" circle></el-button>
            </el-form-item>
          </el-col>
        </el-row>

 

标签:el,选择对象,value,key,select,属性
From: https://www.cnblogs.com/dndt/p/16805887.html

相关文章