openharmony 鸿蒙 ts-basic-components-textarea-sys

2026-08-25 浏览 (1)

TextArea (System API)

The TextArea component supports multi-line text input.

NOTE

  • This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.

  • This topic describes only system APIs provided by the module. For details about its public APIs, see TextArea.

voiceButton23+

voiceButton(options: Optional<VoiceButtonOptions>)

Sets the voice button options.

System API: This is a system API.

System capability: SystemCapability.ArkUI.ArkUI.Full

Atomic service API: This API can be used in atomic services since API version 23.

Parameters

NameTypeMandatoryDescription
optionsOptional<VoiceButtonOptions>YesVoice button options.

Examples

Example 1: Setting a Voice Button

This example demonstrates how to enable the voice input button for an input box by configuring the voiceButton API.

The voiceButton API is added since API version 23.

// xxx.ets
@Entry
@Component
struct TextAreaExample {

  build() {
    Column() {
      TextArea().voiceButton({enabled: true})
    }
  }
}

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 ts-drawing-components-shape

openharmony 鸿蒙 ts-universal-attributes-sharp-clipping

openharmony 鸿蒙 ts-universal-attributes-toolbar

openharmony 鸿蒙 ts-container-lazyvgridlayout

openharmony 鸿蒙 ohos-arkui-advanced-FoldSplitContainer

openharmony 鸿蒙 ts-methods-calendarpicker-dialog

openharmony 鸿蒙 ts-uicommonevent

openharmony 鸿蒙 ts-basic-gestures-tapgesture

openharmony 鸿蒙 ohos-arkui-advanced-DialogV2

openharmony 鸿蒙 ts-components-canvas-canvas

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/kCykYmbj