v-model绑定的value2就是你下拉框要多选的参数,例:[‘HTML’,‘CSS’]

  <el-select
    v-model="value2"
    allow-create
             filterable multiple collapse-tags
    default-first-option
    placeholder="请选择文章标签">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
  </el-select>
      return {
        options: [{
          value: 'HTML',
          label: 'HTML'
        }, {
          value: 'CSS',
          label: 'CSS'
        }, {
          value: 'JavaScript',
          label: 'JavaScript'
        }],
        value2: ['HTML','CSS']
      }
    }
Logo

前往低代码交流专区

更多推荐