ref |> 修复评论输入框相关UI缺陷
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Showing
5 changed files
with
15 additions
and
3 deletions
| @@ -35,7 +35,7 @@ export class publishCommentModel { | @@ -35,7 +35,7 @@ export class publishCommentModel { | ||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | //可选 | 37 | //可选 |
| 38 | - placeHolderText: string = "优质评论会获得最佳评论人的称号" | 38 | + placeHolderText: string = "说两句..." |
| 39 | 39 | ||
| 40 | //最新发布的评论 | 40 | //最新发布的评论 |
| 41 | lastCommentModel: commentItemModel = new commentItemModel() | 41 | lastCommentModel: commentItemModel = new commentItemModel() |
| @@ -12,6 +12,7 @@ import { ifaa } from '@kit.OnlineAuthenticationKit'; | @@ -12,6 +12,7 @@ import { ifaa } from '@kit.OnlineAuthenticationKit'; | ||
| 12 | import { HttpUrlUtils, HttpUtils } from 'wdNetwork/Index'; | 12 | import { HttpUrlUtils, HttpUtils } from 'wdNetwork/Index'; |
| 13 | import NoMoreLayout from '../../page/NoMoreLayout'; | 13 | import NoMoreLayout from '../../page/NoMoreLayout'; |
| 14 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 14 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 15 | +import { ColorUtils } from '../../../utils/ColorUtils'; | ||
| 15 | 16 | ||
| 16 | const TAG = 'CommentComponent'; | 17 | const TAG = 'CommentComponent'; |
| 17 | 18 | ||
| @@ -66,6 +67,7 @@ export struct CommentComponent { | @@ -66,6 +67,7 @@ export struct CommentComponent { | ||
| 66 | dx: 0, | 67 | dx: 0, |
| 67 | dy: -20 | 68 | dy: -20 |
| 68 | }, | 69 | }, |
| 70 | + backgroundColor: "#50000000", | ||
| 69 | }) | 71 | }) |
| 70 | 72 | ||
| 71 | this.getData(); | 73 | this.getData(); |
| @@ -2,11 +2,13 @@ import { DisplayUtils, EmitterEventId, EmitterUtils } from 'wdKit/Index' | @@ -2,11 +2,13 @@ import { DisplayUtils, EmitterEventId, EmitterUtils } from 'wdKit/Index' | ||
| 2 | import { publishCommentModel } from '../model/PublishCommentModel' | 2 | import { publishCommentModel } from '../model/PublishCommentModel' |
| 3 | import { CommentCustomDialog } from './CommentCustomDialog' | 3 | import { CommentCustomDialog } from './CommentCustomDialog' |
| 4 | import measure from '@ohos.measure' | 4 | import measure from '@ohos.measure' |
| 5 | +import { ContentDetailDTO } from 'wdBean/Index' | ||
| 5 | 6 | ||
| 6 | @Preview | 7 | @Preview |
| 7 | @Component | 8 | @Component |
| 8 | export struct CommentTabComponent { | 9 | export struct CommentTabComponent { |
| 9 | @ObjectLink publishCommentModel: publishCommentModel | 10 | @ObjectLink publishCommentModel: publishCommentModel |
| 11 | + @Prop contentDetail: ContentDetailDTO | ||
| 10 | /*展示类型*/ | 12 | /*展示类型*/ |
| 11 | @State type: number = 1 | 13 | @State type: number = 1 |
| 12 | @State placeHolder: string = '说两句...' | 14 | @State placeHolder: string = '说两句...' |
| @@ -32,6 +34,7 @@ export struct CommentTabComponent { | @@ -32,6 +34,7 @@ export struct CommentTabComponent { | ||
| 32 | dx: 0, | 34 | dx: 0, |
| 33 | dy: -20 | 35 | dy: -20 |
| 34 | }, | 36 | }, |
| 37 | + backgroundColor: "#50000000", | ||
| 35 | }) | 38 | }) |
| 36 | 39 | ||
| 37 | } | 40 | } |
| @@ -47,7 +50,11 @@ export struct CommentTabComponent { | @@ -47,7 +50,11 @@ export struct CommentTabComponent { | ||
| 47 | 50 | ||
| 48 | this.publishCommentModel.rootCommentId = '-1'; | 51 | this.publishCommentModel.rootCommentId = '-1'; |
| 49 | this.publishCommentModel.parentId = '-1'; | 52 | this.publishCommentModel.parentId = '-1'; |
| 50 | - this.publishCommentModel.placeHolderText = "优质评论会获得最佳评论人的称号" | 53 | + this.publishCommentModel.placeHolderText = "说两句..." |
| 54 | + if (this.contentDetail.bestNoticer === 1) { | ||
| 55 | + this.publishCommentModel.placeHolderText = "优质评论会获得最佳评论人的称号" | ||
| 56 | + } | ||
| 57 | + | ||
| 51 | this.dialogController?.open(); | 58 | this.dialogController?.open(); |
| 52 | }) | 59 | }) |
| 53 | } | 60 | } |
| @@ -147,7 +147,9 @@ export struct OperRowListView { | @@ -147,7 +147,9 @@ export struct OperRowListView { | ||
| 147 | builderComment() { | 147 | builderComment() { |
| 148 | Column() { | 148 | Column() { |
| 149 | if (this.publishCommentModel?.targetId) { | 149 | if (this.publishCommentModel?.targetId) { |
| 150 | - CommentTabComponent({ publishCommentModel: this.publishCommentModel }) | 150 | + CommentTabComponent({ publishCommentModel: this.publishCommentModel, |
| 151 | + contentDetail: this.contentDetailData | ||
| 152 | + }) | ||
| 151 | } | 153 | } |
| 152 | } | 154 | } |
| 153 | .flexGrow(1) | 155 | .flexGrow(1) |
-
Please register or login to post a comment