naive-ui/demo/documentation/components/popselect/enUS/multiple.demo.md
2020-10-22 21:19:43 +08:00

661 B

Multiple

Select multiple value in popselect.

<n-popselect
  v-model:value="value"
  multiple
  :options="options"
>
  <n-tag>{{ (Array.isArray(value) && value.length) ? value : 'Nothing' }}</n-tag>
</n-popselect>
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'
      }]
    }
  }
}