naive-ui/demo/documentation/components/select/enUS/many-options.demo.md
2020-10-01 01:53:57 +08:00

482 B

Lots of Options

1000 times of the ultimate answer.

<n-select
  v-model:value="value"
  :options="options"
/>
<n-select
  multiple
  v-model:value="values"
  :options="options"
/>
export default {
  data () {
    return {
      value: null,
      values: null,
      options: Array.apply(null, { length: 42000 }).map((_, i) => ({
        label: String(i),
        value: i
      }))
    }
  }
}
.n-select {
  width: 180px;
  margin: 0 12px 8px 0;
}