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
xugenyuan
2024-05-27 13:40:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c811e277116302d6ed8b64d38ced0a830fe786b6
c811e277
1 parent
8f7bf087
ref |> 调整评论输入框发布按钮高亮逻辑
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 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 @
c811e27
...
...
@@ -15,6 +15,7 @@ export struct CommentCustomDialog {
@State private emojiSwitch: boolean = false
textInputController: TextAreaController = new TextAreaController()
@State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 }
@State publishButtonOpacity: number = 0.5
aboutToAppear(): void {
}
...
...
@@ -55,8 +56,15 @@ export struct CommentCustomDialog {
.height('100%')
.width('100%')
.backgroundColor($r('app.color.color_transparent'))
.caretColor("#ED2800")
.onChange(value => {
this.publishCommentModel.commentContent = value;
if (value.length > 0) {
this.publishButtonOpacity = 1.0
} else {
this.publishButtonOpacity = 0.5
}
})
.onFocus(() => {
if (this.emojiSwitch) {
...
...
@@ -98,13 +106,14 @@ export struct CommentCustomDialog {
Row() {
Text('发布')
.backgroundColor(
'#F89381'
)
.backgroundColor(
"#ED2800"
)
.width(80)
.height(30)
.fontSize(15)
.fontColor(Color.White)
.textAlign(TextAlign.Center)
.borderRadius(4)
.opacity(this.publishButtonOpacity)
.onClick(() => {
if (this.publishCommentModel.commentContent.length > 0) {
//请求评论接口
...
...
Please
register
or
login
to post a comment