|
|
@@ -211,22 +211,7 @@ struct HeroItem{
|
|
|
|
|
|
Column(){
|
|
|
Column({space: 6}){
|
|
|
- Column(){
|
|
|
- Text('英雄事迹')
|
|
|
- .fontSize(14)
|
|
|
- .fontWeight(500)
|
|
|
- .fontColor('#333333')
|
|
|
- .zIndex(999)
|
|
|
- Image($r('app.media.icon_unLine'))
|
|
|
- .width(56)
|
|
|
- .height(13)
|
|
|
- .offset({ y: -5})
|
|
|
- .zIndex(0)
|
|
|
- .visibility(this.isOpen ? Visibility.Visible : Visibility.Hidden)
|
|
|
- }
|
|
|
- .width("100%")
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
- .alignItems(HorizontalAlign.Start)
|
|
|
+ this.fontComp('英雄事迹')
|
|
|
|
|
|
Text(this.data.heroicDeeds)
|
|
|
.width("100%")
|
|
|
@@ -234,22 +219,7 @@ struct HeroItem{
|
|
|
.fontWeight(400)
|
|
|
.lineHeight(20)
|
|
|
|
|
|
- Column(){
|
|
|
- Text('精神内涵')
|
|
|
- .fontSize(14)
|
|
|
- .fontWeight(500)
|
|
|
- .fontColor('#333333')
|
|
|
- .zIndex(999)
|
|
|
- Image($r('app.media.icon_unLine'))
|
|
|
- .width(56)
|
|
|
- .height(13)
|
|
|
- .offset({ y: -5})
|
|
|
- .zIndex(0)
|
|
|
- .visibility(this.isOpen ? Visibility.Visible : Visibility.Hidden)
|
|
|
- }
|
|
|
- .width("100%")
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
- .alignItems(HorizontalAlign.Start)
|
|
|
+ this.fontComp('精神内涵')
|
|
|
|
|
|
Row({space: 12}){
|
|
|
ForEach(this.data.type?.split('、'), (item: string, index) => {
|
|
|
@@ -280,6 +250,9 @@ struct HeroItem{
|
|
|
.aspectRatio(1)
|
|
|
.rotate({angle: this.isOpen ? 180 : 0})
|
|
|
}
|
|
|
+ .width("100%")
|
|
|
+ .padding({top: 6, bottom: 6})
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
.onClick(() => { this.changeDetail() })
|
|
|
}
|
|
|
.padding({left: 13, right: 13})
|
|
|
@@ -328,4 +301,24 @@ struct HeroItem{
|
|
|
.width("100%")
|
|
|
.height(207)
|
|
|
}
|
|
|
+
|
|
|
+ @Builder
|
|
|
+ fontComp(text: string){
|
|
|
+ Stack({alignContent: Alignment.BottomStart}){
|
|
|
+ Image($r('app.media.icon_unLine'))
|
|
|
+ .width(56)
|
|
|
+ .height(13)
|
|
|
+ .visibility(this.isOpen ? Visibility.Visible : Visibility.Hidden)
|
|
|
+
|
|
|
+ Row(){
|
|
|
+ Text(text)
|
|
|
+ .fontSize(14)
|
|
|
+ .fontWeight(500)
|
|
|
+ .fontColor('#333333')
|
|
|
+ }
|
|
|
+ .width("100%")
|
|
|
+ .padding({bottom: 5})
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|