mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
43 lines
656 B
Markdown
43 lines
656 B
Markdown
|
# 尺寸
|
||
|
太小太大好像都不怎么好看。
|
||
|
```html
|
||
|
<n-transfer
|
||
|
ref="transfer"
|
||
|
v-model="value"
|
||
|
:options="options"
|
||
|
size="small"
|
||
|
/>
|
||
|
<n-transfer
|
||
|
ref="transfer"
|
||
|
v-model="value"
|
||
|
:options="options"
|
||
|
size="large"
|
||
|
/>
|
||
|
```
|
||
|
```js
|
||
|
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()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
```css
|
||
|
.n-transfer {
|
||
|
margin-bottom: 8px;
|
||
|
}
|
||
|
```
|