naive-ui/demo/documentation/components/input/zhCN/autosize.demo.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +08:00

457 B

自动调整尺寸

Textarea 自动调整尺寸。

<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
  }"
/>
export default {
  data() {
    return {
      value: null
    }
  }
}
.n-input {
  margin-bottom: 8px;
}