naive-ui/demo/documentation/components/select/zhCN/manyOptions.md
2020-02-04 20:32:03 +08:00

480 B

许多选项

1000 倍宇宙的终极答案个数的选项。

<n-select
  v-model="value"
  :options="options"
/>
<n-select
  multiple
  v-model="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;
}