2
0
mirror of https://github.com/tusen-ai/naive-ui.git synced 2025-01-12 12:25:16 +08:00
naive-ui/demo/documentation/components/transfer/enUS/basic.md

31 lines
539 B
Markdown
Raw Normal View History

2019-10-25 12:59:50 +08:00
# Basic
2020-02-02 02:07:00 +08:00
Basic example of transfer. If you have tons of data, see next section.
2019-10-25 12:59:50 +08:00
```html
<n-transfer
ref="transfer"
v-model="value"
:options="options"
/>
```
```js
2020-02-02 02:07:00 +08:00
function createOptions () {
return Array.apply(null, { length: 100 }).map((v, i) => ({
label: 'Option' + i,
value: i,
disabled: i % 5 === 0
2019-10-25 12:59:50 +08:00
}))
}
2020-02-02 02:07:00 +08:00
function createValues () {
return Array.apply(null, { length: 50 }).map((v, i) => i)
2019-10-25 12:59:50 +08:00
}
export default {
data () {
return {
2020-02-02 02:07:00 +08:00
options: createOptions(),
value: createValues()
2019-10-25 12:59:50 +08:00
}
},
}
```