diff --git a/docs/en/components/text-field.md b/docs/en/components/text-field.md index 8c6fe56c..c87ad43a 100644 --- a/docs/en/components/text-field.md +++ b/docs/en/components/text-field.md @@ -28,6 +28,9 @@ The `variant` attribute modifies the shape of the text field. ```html,example,expandable + +

+ ``` @@ -130,6 +133,8 @@ To automatically adjust the height of the text field based on the length of the ```html,example,expandable +

+ ``` diff --git a/docs/zh-cn/components/text-field.md b/docs/zh-cn/components/text-field.md index bd93cdea..c497decd 100644 --- a/docs/zh-cn/components/text-field.md +++ b/docs/zh-cn/components/text-field.md @@ -28,6 +28,9 @@ import type { TextField } from 'mdui/components/text-field.js'; ```html,example,expandable + +

+ ``` @@ -130,6 +133,8 @@ import type { TextField } from 'mdui/components/text-field.js'; ```html,example,expandable +

+ ``` diff --git a/packages/mdui/src/components/text-field/index.ts b/packages/mdui/src/components/text-field/index.ts index a8d1a69e..d66fd808 100644 --- a/packages/mdui/src/components/text-field/index.ts +++ b/packages/mdui/src/components/text-field/index.ts @@ -573,6 +573,8 @@ export class TextField if (this.hasUpdated) { await this.updateComplete; + this.setTextareaHeight(); + // reset 引起的值变更,不执行验证;直接修改值引起的变更,需要进行验证 const form = this.formController.getForm(); if (form && formResets.get(form)?.has(this)) {