el-select数据绑定

<template>
  <el-select v-model="selectedMpsChoice" placeholder="请选择">
    <el-option
      v-for="item in mpsChoices"
      :key="item.value"
      :label="item.label"
      :value="item.value"
    />
  </el-select>
</template>

<script>
export default {
  data() {
    return {
      selectedMpsChoice: '', // This will hold the selected value
      mpsChoices: [
        { value: '1', label: '销售订单' },
        { value: '2', label: '销售计划' }
      ]
    };
  }
};
</script>

 

posted @ 2024-09-13 16:57  侬侬发  阅读(25)  评论(0编辑  收藏  举报