当前位置:   article > 正文

vue el-select label显示多个值,选择后只显示其中一个_el-select 下拉内容两个字段相加显示 选择后框内只显示第一个

el-select 下拉内容两个字段相加显示 选择后框内只显示第一个
  1. <el-select filterable @change="getHtInfo" v-model="form.hth" placeholder="请选择合同号" >
  2. <el-option
  3. v-for="(item,index) in hthOptions"
  4. :key="index"
  5. :label="item.hth + '__' + item.qdr + '__' + item.htmc"
  6. :value="item.htid"
  7. ></el-option>
  8. </el-select>
  1. getHtInfo(value) {
  2. var newForm = this.hthOptions.filter((item) => {
  3. return item.htid === value;
  4. });
  5. //选择后 需要显示的字段
  6. this.form.hth = newForm[0].hth;
  7. },

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/107238
推荐阅读