mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
539 B
539 B
Basic
Basic example of transfer. If you have tons of data, see next section.
<n-transfer
ref="transfer"
v-model="value"
:options="options"
/>
function createOptions () {
return Array.apply(null, { length: 100 }).map((v, i) => ({
label: 'Option' + i,
value: i,
disabled: i % 5 === 0
}))
}
function createValues () {
return Array.apply(null, { length: 50 }).map((v, i) => i)
}
export default {
data () {
return {
options: createOptions(),
value: createValues()
}
},
}