@qq1948037137/adminsmart-ui 0.1.33 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -220,10 +220,21 @@ var Form = Object.assign(wrapAntComponent(AntForm, "Form"), {
220
220
 
221
221
  // src/components/Input.ts
222
222
  import { Input as AntInput } from "antd";
223
+ var DEFAULT_TEXT_AREA_ROWS = 5;
224
+ function normalizeTextArea(props) {
225
+ if (props.rows !== void 0 || Object.hasOwn(props, "autoSize")) return props;
226
+ return {
227
+ ...props,
228
+ rows: DEFAULT_TEXT_AREA_ROWS,
229
+ // 自动测量前也保持五行,避免初次显示时跳动。
230
+ autoSize: { minRows: DEFAULT_TEXT_AREA_ROWS }
231
+ // 由 Ant 随输入内容增减,不设行数上限。
232
+ };
233
+ }
223
234
  var Input = Object.assign(wrapAntComponent(AntInput, "Input"), {
224
235
  Group: wrapAntComponent(AntInput.Group, "Input.Group"),
225
236
  Search: wrapAntComponent(AntInput.Search, "Input.Search"),
226
- TextArea: wrapAntComponent(AntInput.TextArea, "Input.TextArea"),
237
+ TextArea: wrapAntComponent(AntInput.TextArea, "Input.TextArea", {}, normalizeTextArea),
227
238
  Password: wrapAntComponent(AntInput.Password, "Input.Password"),
228
239
  OTP: wrapAntComponent(AntInput.OTP, "Input.OTP")
229
240
  });