0.0.2 • Published 6 years ago

@demacia/ngx-textarea-auto-height v0.0.2

Weekly downloads
2
License
MIT
Repository
gitlab
Last release
6 years ago

angular 文本域根据内容自动适应高度插件

📦 安装

npm install @demacia/ngx-textarea-auto-height --save

🔨 使用

引入module

import { TextareaAutoHeightModule } from '@demacia/ngx-textarea-auto-height';

@NgModule({
    imports: [
        TextareaAutoHeightModule
    ]
})
export class AppModule {
}

在 textarea 标签上使用

<textarea autoHeight></textarea>

🎨 API

1. @Input() 属性

  • maxHeight 最大高度(px),超出限制后不再增加高度,而是显示滚动条

  • minHeight 最小高度(px),低于限制后不再减少高度

2. @Output() 属性

  • sizeChange 高度变化事件,参数为当前 textarea 高度
0.0.2

6 years ago

0.0.1

6 years ago