naive-ui/demo/documentation/components/transfer/zhCN/size.md
2020-03-03 12:40:05 +08:00

656 B

尺寸

太小太大好像都不怎么好看。

<n-transfer
  ref="transfer"
  v-model="value"
  :options="options"
  size="small"
/>
<n-transfer
  ref="transfer"
  v-model="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;
}