1. 組合 labelcss
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <!-- import CSS --> <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> </head> <body> <div id="app"> <el-select v-model="options[0].value" placeholder="請選擇"> <!-- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> <template slot-scope></template> </el-option> --> <el-option v-for="(item,index) in options" :key="index" :label="`${item.label}-${item.value}`" :value="item.value"> <!-- <template slot-scope></template> --> </el-option> </el-select> </div> </body> <!-- import Vue before Element --> <script src="https://unpkg.com/vue/dist/vue.js"></script> <!-- import JavaScript --> <script src="https://unpkg.com/element-ui/lib/index.js"></script> <script> new Vue({ el: '#app', data: function () { return { options: [{ value: '1556445455525', label: 'afsdsdsiosiodidsu', num:'選項1' }, { value: '2556445455525', label: 'bfsdsdsiosiodidsu', num:'選項2' }, { value: '3556445455525', label: 'cfsdsdsiosiodidsu', num:'選項3' }], value: '' } } }) </script> </html>