xugenyuan

ref |> 解决详情页底部评论输入框宽度问题

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
@@ -45,10 +45,31 @@ export struct CommentTabComponent { @@ -45,10 +45,31 @@ export struct CommentTabComponent {
45 build() { 45 build() {
46 Row() { 46 Row() {
47 Stack({ alignContent: Alignment.Start }) { 47 Stack({ alignContent: Alignment.Start }) {
48 - Image($r('app.media.comment_img_input_hui')).width(151).height(30)  
49 - Text(this.placeHolder).fontSize(12).fontColor('#999999').margin({ left: 10 }) 48 + RelativeContainer() {
  49 + Image($r('app.media.comment_img_input_hui'))
  50 + .objectFit(ImageFit.Fill)
  51 + .resizable({ slice: { top: 1, left: 1, right: 20, bottom: 1 } })
  52 + .alignRules({
  53 + top: { anchor: "__container__", align: VerticalAlign.Top },
  54 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  55 + right: { anchor: "__container__", align: HorizontalAlign.End },
  56 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
  57 + })
  58 + .id("Image")
  59 + Text(this.placeHolder)
  60 + .fontSize(12)
  61 + .fontColor('#999999')
  62 + .margin({ left: 10 })
  63 + .alignRules({
  64 + top: { anchor: "__container__", align: VerticalAlign.Top },
  65 + left: { anchor: "__container__", align: HorizontalAlign.Start },
  66 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
  67 + })
  68 + .id("Text")
  69 + }
50 } 70 }
51 - }.width(151).height(30) 71 + }
  72 + .height(30)
52 .onClick(() => { 73 .onClick(() => {
53 this.onCommentFocus && this.onCommentFocus() 74 this.onCommentFocus && this.onCommentFocus()
54 75
@@ -164,7 +164,7 @@ export struct OperRowListView { @@ -164,7 +164,7 @@ export struct OperRowListView {
164 }) 164 })
165 } 165 }
166 } 166 }
167 - .flexGrow(1) 167 + .flexShrink(1)
168 168
169 Column() { 169 Column() {
170 if (this.publishCommentModel?.targetId) { 170 if (this.publishCommentModel?.targetId) {