赞
踩
- <template>
- <div>
- <el-select @change="handleSelect($event)" v-model="selectVal" placeholder="请选择" multiple collapse-tags>
- <el-option
- v-for="item in array"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <div>{
- {this.selectVal}}</div>
- </div>
- </template>
-
- <script>
- export default {
- name: 'selectMultiple',
- data () {
- return {
- array: [],
- selectVal: [],
- oldSelectVal: []
- }
- },
- mounted () {
- this.initSelect()
- },
- methods: {
- initSelect () {
- this.array = [{label: '全部', value: 'ALL'}]
- for (let i = 0; i < 10; i++) {
- this.array.push({
- label: '选择项' + i,
- value: i
- })
- }
- },
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。