view-design / ViewUIPlus

An enterprise-level UI component library and front-end solution based on Vue.js 3
https://www.iviewui.com
Other
368 stars 123 forks source link

[Feature Request]Input [type=textarea] 组件,textarea高度计算优化 #340

Open Enzo-web opened 7 months ago

Enzo-web commented 7 months ago

What problem does this feature solve?

因为一些特殊场景,textarea组件加了css word-spacing。input组件使用autosize 高度自适应,因calcTextareaHeight.ts中的【SIZING_STYLE】未使用word-spacing属性,导致计算的高度可能会存在于实际高度不一致的问题,导致实际内容被切割或无法完整展示。

What does the proposed API look like?

在calcTextareaHeight.ts中的【SIZING_STYLE】增加word-spacing属性:

const SIZING_STYLE = [ 'word-spacing', 'letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing', ];