Showing
5 changed files
with
53 additions
and
8 deletions
| @@ -366,6 +366,7 @@ export struct MultiPictureDetailPageComponent { | @@ -366,6 +366,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 366 | publishCommentModel: this.publishCommentModel, | 366 | publishCommentModel: this.publishCommentModel, |
| 367 | operationButtonList: this.operationButtonList, | 367 | operationButtonList: this.operationButtonList, |
| 368 | styleType: 2, | 368 | styleType: 2, |
| 369 | + componentType:5, | ||
| 369 | }) | 370 | }) |
| 370 | } | 371 | } |
| 371 | .transition(TransitionEffect.OPACITY.animation({ duration: this.duration, curve: Curve.Ease }).combine( | 372 | .transition(TransitionEffect.OPACITY.animation({ duration: this.duration, curve: Curve.Ease }).combine( |
| @@ -19,19 +19,25 @@ struct EditUserIntroductionPage { | @@ -19,19 +19,25 @@ struct EditUserIntroductionPage { | ||
| 19 | .width('100%') | 19 | .width('100%') |
| 20 | .height(80) | 20 | .height(80) |
| 21 | .backgroundColor(Color.White) | 21 | .backgroundColor(Color.White) |
| 22 | + .placeholderColor('#999999') | ||
| 22 | .onChange(value => { | 23 | .onChange(value => { |
| 23 | this.numCount = value.length | 24 | this.numCount = value.length |
| 24 | if (this.numCount === 60) { | 25 | if (this.numCount === 60) { |
| 25 | this.textColor = '#ED2800' | 26 | this.textColor = '#ED2800' |
| 27 | + }else if(this.numCount === 0){ | ||
| 28 | + this.textColor = '#999999' | ||
| 26 | }else { | 29 | }else { |
| 27 | this.textColor = '#222222' | 30 | this.textColor = '#222222' |
| 28 | } | 31 | } |
| 29 | this.introduction = value | 32 | this.introduction = value |
| 30 | }) | 33 | }) |
| 31 | 34 | ||
| 32 | - Text(this.numCount.toString() + '/60') | 35 | + Row(){ |
| 36 | + Text(this.numCount.toString()) | ||
| 33 | .fontColor(this.textColor) | 37 | .fontColor(this.textColor) |
| 34 | - .margin({left: -50}) | 38 | + Text('/60') |
| 39 | + .fontColor('#999999') | ||
| 40 | + }.margin({left: -50}) | ||
| 35 | } | 41 | } |
| 36 | .alignItems(VerticalAlign.Bottom) | 42 | .alignItems(VerticalAlign.Bottom) |
| 37 | 43 | ||
| @@ -42,7 +48,7 @@ struct EditUserIntroductionPage { | @@ -42,7 +48,7 @@ struct EditUserIntroductionPage { | ||
| 42 | Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多60个字,只能输入中文、数字、英文字母。') | 48 | Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多60个字,只能输入中文、数字、英文字母。') |
| 43 | .fontSize(13) | 49 | .fontSize(13) |
| 44 | .padding(12) | 50 | .padding(12) |
| 45 | - .fontColor(Color.Gray) | 51 | + .fontColor(Color.Gray).lineHeight(25) |
| 46 | 52 | ||
| 47 | Button('保存') | 53 | Button('保存') |
| 48 | .type(ButtonType.Normal) | 54 | .type(ButtonType.Normal) |
| @@ -22,19 +22,25 @@ struct EditUserNikeNamePage { | @@ -22,19 +22,25 @@ struct EditUserNikeNamePage { | ||
| 22 | .maxLength(16) | 22 | .maxLength(16) |
| 23 | .height(50) | 23 | .height(50) |
| 24 | .backgroundColor(Color.White) | 24 | .backgroundColor(Color.White) |
| 25 | + .placeholderColor('#999999') | ||
| 25 | .onChange(value => { | 26 | .onChange(value => { |
| 26 | this.numCount = value.length | 27 | this.numCount = value.length |
| 27 | if (this.numCount === 16) { | 28 | if (this.numCount === 16) { |
| 28 | this.textColor = '#ED2800' | 29 | this.textColor = '#ED2800' |
| 30 | + }else if(this.numCount === 0){ | ||
| 31 | + this.textColor = '#999999' | ||
| 29 | }else { | 32 | }else { |
| 30 | this.textColor = '#222222' | 33 | this.textColor = '#222222' |
| 31 | } | 34 | } |
| 32 | this.nikeName = value | 35 | this.nikeName = value |
| 33 | }) | 36 | }) |
| 34 | 37 | ||
| 35 | - Text(this.numCount.toString() + '/16') | 38 | + Row(){ |
| 39 | + Text(this.numCount.toString()) | ||
| 36 | .fontColor(this.textColor) | 40 | .fontColor(this.textColor) |
| 37 | - .margin({left: -50}) | 41 | + Text('/16') |
| 42 | + .fontColor('#999999') | ||
| 43 | + }.margin({left: -50}) | ||
| 38 | } | 44 | } |
| 39 | .alignItems(VerticalAlign.Center) | 45 | .alignItems(VerticalAlign.Center) |
| 40 | 46 | ||
| @@ -44,7 +50,7 @@ struct EditUserNikeNamePage { | @@ -44,7 +50,7 @@ struct EditUserNikeNamePage { | ||
| 44 | Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。') | 50 | Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。') |
| 45 | .fontSize(13) | 51 | .fontSize(13) |
| 46 | .padding(12) | 52 | .padding(12) |
| 47 | - .fontColor(Color.Gray) | 53 | + .fontColor(Color.Gray).lineHeight(25) |
| 48 | 54 | ||
| 49 | Button('保存') | 55 | Button('保存') |
| 50 | .type(ButtonType.Normal) | 56 | .type(ButtonType.Normal) |
| @@ -41,7 +41,6 @@ export struct LikeComponent { | @@ -41,7 +41,6 @@ export struct LikeComponent { | ||
| 41 | //获取点赞数 | 41 | //获取点赞数 |
| 42 | this.getLikeCount() | 42 | this.getLikeCount() |
| 43 | } | 43 | } |
| 44 | - | ||
| 45 | } | 44 | } |
| 46 | 45 | ||
| 47 | build() { | 46 | build() { |
| @@ -55,7 +54,10 @@ export struct LikeComponent { | @@ -55,7 +54,10 @@ export struct LikeComponent { | ||
| 55 | } else if (this.componentType == 4) { | 54 | } else if (this.componentType == 4) { |
| 56 | // 直播,点赞按钮底测有灰色圆角背景+右上点赞数量 | 55 | // 直播,点赞按钮底测有灰色圆角背景+右上点赞数量 |
| 57 | this.likeCompStyle4() | 56 | this.likeCompStyle4() |
| 58 | - } else { | 57 | + } else if (this.componentType == 5) { |
| 58 | + // 图集点赞,展示标识 | ||
| 59 | + this.likeCompStyle5() | ||
| 60 | + }else { | ||
| 59 | //1: 底部栏目样式 默认样式 | 61 | //1: 底部栏目样式 默认样式 |
| 60 | this.likeCompStyle1() | 62 | this.likeCompStyle1() |
| 61 | } | 63 | } |
| @@ -161,6 +163,36 @@ export struct LikeComponent { | @@ -161,6 +163,36 @@ export struct LikeComponent { | ||
| 161 | } | 163 | } |
| 162 | 164 | ||
| 163 | @Builder | 165 | @Builder |
| 166 | + likeCompStyle5() { | ||
| 167 | + //1: 底部栏目样式 默认样式 | ||
| 168 | + Stack({ alignContent: Alignment.Bottom }) { | ||
| 169 | + Column() { | ||
| 170 | + // Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default')) | ||
| 171 | + Image(this.transLikeStyle().url) | ||
| 172 | + .width(24) | ||
| 173 | + .height(24) | ||
| 174 | + .onClick(() => { | ||
| 175 | + this.clickButtonEvent() | ||
| 176 | + }) | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + Row() { | ||
| 180 | + Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) | ||
| 181 | + .fontSize(8) | ||
| 182 | + .fontColor(Color.White) | ||
| 183 | + .padding({ left: 4, right: 2 }) | ||
| 184 | + } | ||
| 185 | + .height(12) | ||
| 186 | + .alignItems(VerticalAlign.Center) | ||
| 187 | + .position({ x: '100%', }) | ||
| 188 | + .markAnchor({ x: '100%' }) | ||
| 189 | + .backgroundImage(this.likeStatus? $r('app.media.ic_like_back_Select'):$r('app.media.ic_like_back')) | ||
| 190 | + .backgroundImageSize(ImageSize.Auto) | ||
| 191 | + .visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden) | ||
| 192 | + }.width(24).height(24) | ||
| 193 | + } | ||
| 194 | + | ||
| 195 | + @Builder | ||
| 164 | likeCompStyle4() { | 196 | likeCompStyle4() { |
| 165 | Stack({ alignContent: Alignment.Bottom }) { | 197 | Stack({ alignContent: Alignment.Bottom }) { |
| 166 | Column() { | 198 | Column() { |
-
Please register or login to post a comment