Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhenghy
2024-05-25 17:27:51 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
39de1581f49b7b10fc94a4c3ae5a1419197d4227
39de1581
2 parents
5bf245f2
87595f1d
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentCustomDialog.ets
View file @
39de158
...
...
@@ -17,8 +17,6 @@ export struct CommentCustomDialog {
@State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 }
aboutToAppear(): void {
// this.textInputController.caretPosition(0)
}
publishCommentRequest() {
...
...
@@ -51,12 +49,20 @@ export struct CommentCustomDialog {
controller: this.textInputController,
text: this.publishCommentModel.commentContent
})
.id("textAreaId")
.defaultFocus(true) // 获取默认焦点
.enableKeyboardOnFocus(true)
.height('100%')
.width('100%')
.backgroundColor($r('app.color.color_transparent'))
.onChange(value => {
this.publishCommentModel.commentContent = value;
})
.onFocus(() => {
if (this.emojiSwitch) {
this.emojiSwitch = false
}
})
}
.backgroundColor('#F9F9F9')
// .width('100%')
...
...
@@ -81,6 +87,7 @@ export struct CommentCustomDialog {
if (this.emojiSwitch) {
this.textInputController.stopEditing()
} else {
focusControl.requestFocus("textAreaId") // 弹起键盘
// this.textInputController.caretPosition(this.textInputController.getTextContentRect().x)
}
...
...
Please
register
or
login
to post a comment