mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
36 lines
457 B
Markdown
36 lines
457 B
Markdown
|
# 自动调整尺寸
|
||
|
Textarea 自动调整尺寸。
|
||
|
```html
|
||
|
<n-input
|
||
|
v-model="value"
|
||
|
placeholder="自动调整尺寸"
|
||
|
type="textarea"
|
||
|
size="small"
|
||
|
:autosize="{
|
||
|
minRows: 3,
|
||
|
maxRows: 5
|
||
|
}"
|
||
|
/>
|
||
|
<n-input
|
||
|
v-model="value"
|
||
|
type="textarea"
|
||
|
placeholder="自动调整尺寸"
|
||
|
:autosize="{
|
||
|
minRows: 3
|
||
|
}"
|
||
|
/>
|
||
|
```
|
||
|
```js
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
value: null
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
```css
|
||
|
.n-input {
|
||
|
margin-bottom: 8px;
|
||
|
}
|
||
|
```
|