mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
33 lines
470 B
Markdown
33 lines
470 B
Markdown
# Lots of Options
|
|
1000 times of the ultimate answer.
|
|
```html
|
|
<n-select
|
|
v-model="value"
|
|
:options="options"
|
|
/>
|
|
<n-select
|
|
multiple
|
|
v-model="values"
|
|
:options="options"
|
|
/>
|
|
```
|
|
```js
|
|
export default {
|
|
data () {
|
|
return {
|
|
value: null,
|
|
values: null,
|
|
options: Array.apply(null, { length: 42000 }).map((_, i) => ({
|
|
label: String(i),
|
|
value: i
|
|
}))
|
|
}
|
|
}
|
|
}
|
|
```
|
|
```css
|
|
.n-select {
|
|
width: 180px;
|
|
margin: 0 12px 8px 0;
|
|
}
|
|
``` |