naive-ui/demo/documentation/components/transfer/enUS/size.demo.md
2020-10-06 03:04:22 +08:00

656 B

Size

They doesn't look harmonious.

<n-transfer
  ref="transfer"
  v-model:value="value"
  :options="options"
  size="small"
/>
<n-transfer
  ref="transfer"
  v-model:value="value"
  :options="options"
  size="large"
/>
function createOptions () {
  return Array.apply(null, { length: 20 }).map((v, i) => ({
    label: 'Option' + i,
    value: i,
    disabled: i % 5 === 0
  }))
}

function createValues () {
  return Array.apply(null, { length: 5 }).map((v, i) => i)
}

export default {
  data () {
    return {
      options: createOptions(),
      value: createValues()
    }
  }
}
.n-transfer {
  margin-bottom: 8px;
}