SuperAPI AI 工具集

sgds-components-textarea

通用与其它

查看项目

更新于 10-15 21:55

技能介绍

用途:<sgds-textarea> 用于展示带标签、提示文字、字符计数、缩放控制和校验反馈的多行文本输入框,适合表单中收集评论、描述、备注等较长文本。

主要能力:支持 label、hintText、name、value、defaultValue、placeholder、rows(默认 4)、minlength、maxlength、resize(none/vertical/auto,默认 vertical)、inputmode、autocorrect、spellcheck、hasFeedback、invalidFeedback、invalid、required、disabled、readonly、autofocus 等属性。设置 maxlength 会自动在字段附近显示字符计数器;resize="auto" 随输入纵向扩展,resize="none" 禁止手动缩放;hasFeedback 支持 style、text、both,配合 invalidFeedback 可同时显示错误边框与错误信息。事件包括 sgds-change(提交值变化)、sgds-input(每次按键改变值)、sgds-focus、sgds-blur。

使用方式:安装与框架集成参见 sgds-components-setup(React 19+ 与 React ≤18、Vue、Angular)。基本用法示例:<sgds-textarea label="Comments" name="comments" hintText="Tell us more" placeholder="Enter your comments here" rows="4"></sgds-textarea>。带字符限制与校验:设置 maxlength="300"、hasFeedback="both"、invalidFeedback="Description must not be empty"、required。自动扩展:rows="2"、resize="auto"。

限制:该组件不暴露自定义属性和 CSS parts,不能修改 CSS 样式;组件没有公开方法。其余未在资料中说明的收费、平台或效果暂未提供。