ant-design-vue/components/select/demo/multiple.md

35 lines
656 B
Markdown
Raw Normal View History

2018-02-25 08:48:19 +00:00
<cn>
#### 多选
多选从已有条目中选择scroll the menu
</cn>
<us>
#### multiple selection
Multiple selection, selecting from existing items (scroll the menu).
</us>
2019-10-09 10:32:23 +00:00
```tpl
2018-02-25 08:48:19 +00:00
<template>
2019-09-28 12:45:07 +00:00
<a-select
mode="multiple"
:defaultValue="['a1', 'b2']"
style="width: 100%"
@change="handleChange"
placeholder="Please select"
>
<a-select-option v-for="i in 25" :key="(i + 9).toString(36) + i"
>{{(i + 9).toString(36) + i}}</a-select-option
>
2018-02-25 08:48:19 +00:00
</a-select>
</template>
<script>
2019-09-28 12:45:07 +00:00
export default {
methods: {
handleChange(value) {
console.log(`selected ${value}`);
},
},
};
2018-02-25 08:48:19 +00:00
</script>
```