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>