mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
36 lines
661 B
Markdown
36 lines
661 B
Markdown
# Multiple
|
|
|
|
Select multiple value in popselect.
|
|
|
|
```html
|
|
<n-popselect
|
|
v-model:value="value"
|
|
multiple
|
|
:options="options"
|
|
>
|
|
<n-tag>{{ (Array.isArray(value) && value.length) ? value : 'Nothing' }}</n-tag>
|
|
</n-popselect>
|
|
```
|
|
```js
|
|
export default {
|
|
data () {
|
|
return {
|
|
value: null,
|
|
options: [{
|
|
label: 'Go Let It Out',
|
|
value: 'Go Let It Out'
|
|
}, {
|
|
label: 'Who Feels Love?',
|
|
value: 'Who Feels Love?'
|
|
}, {
|
|
label: 'Sunday Morning Call',
|
|
value: 'Sunday Morning Call',
|
|
disabled: true
|
|
}, {
|
|
label: 'Roll It Over',
|
|
value: 'Roll It Over'
|
|
}]
|
|
}
|
|
}
|
|
}
|
|
``` |