提交 84604e1a 编写于 作者: E ester.zhou

Update doc (13830)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 75210981
......@@ -201,7 +201,7 @@ Sample code for **focusControl.requestFocus**:
Use the **focusContrl.requestFocus** API to enable a specified component to obtain focus.
```ts
// requestFocus.ets
import prompt from '@ohos.prompt'
import promptAction from '@ohos.promptAction';
@Entry
@Component
......@@ -253,9 +253,9 @@ struct RequestFocusExample {
.onClick(() => {
var res = focusControl.requestFocus(this.selectId) // Enable the component selected by this.selectId to obtain focus.
if (res) {
prompt.showToast({message: 'Request success'})
promptAction.showToast({message: 'Request success'})
} else {
prompt.showToast({message: 'Request failed'})
promptAction.showToast({message: 'Request failed'})
}
})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册