|
|
@@ -210,34 +210,37 @@ struct HeroItem{
|
|
|
.padding({left: 13, right: 13, top: 5})
|
|
|
|
|
|
Column(){
|
|
|
- Column({space: 6}){
|
|
|
- this.fontComp('英雄事迹')
|
|
|
+ if(this.isOpen) {
|
|
|
+ Column({space: 6}){
|
|
|
+ this.fontComp('英雄事迹')
|
|
|
|
|
|
- Text(this.data.heroicDeeds)
|
|
|
+ Text(this.data.heroicDeeds)
|
|
|
+ .width("100%")
|
|
|
+ .fontSize(12)
|
|
|
+ .fontWeight(400)
|
|
|
+ .lineHeight(20)
|
|
|
+
|
|
|
+ this.fontComp('精神内涵')
|
|
|
+
|
|
|
+ Row({space: 12}){
|
|
|
+ ForEach(this.data.type?.split('、'), (item: string, index) => {
|
|
|
+ Text(item)
|
|
|
+ .fontSize(12)
|
|
|
+ .fontWeight(400)
|
|
|
+ .borderRadius(5)
|
|
|
+ .fontColor('#52886F')
|
|
|
+ .backgroundColor('#F2F2F2')
|
|
|
+ .padding({left: 13, top: 6, right: 13, bottom: 6})
|
|
|
+ })
|
|
|
+ }
|
|
|
.width("100%")
|
|
|
- .fontSize(12)
|
|
|
- .fontWeight(400)
|
|
|
- .lineHeight(20)
|
|
|
-
|
|
|
- this.fontComp('精神内涵')
|
|
|
-
|
|
|
- Row({space: 12}){
|
|
|
- ForEach(this.data.type?.split('、'), (item: string, index) => {
|
|
|
- Text(item)
|
|
|
- .fontSize(12)
|
|
|
- .fontWeight(400)
|
|
|
- .borderRadius(5)
|
|
|
- .fontColor('#52886F')
|
|
|
- .backgroundColor('#F2F2F2')
|
|
|
- .padding({left: 13, top: 6, right: 13, bottom: 6})
|
|
|
- })
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
+ .padding({bottom: 37})
|
|
|
}
|
|
|
- .width("100%")
|
|
|
- .justifyContent(FlexAlign.Start)
|
|
|
- .padding({bottom: 37})
|
|
|
+ .transition(TransitionEffect.OPACITY
|
|
|
+ .combine(TransitionEffect.translate({ y: -50 }))
|
|
|
+ .animation({ duration: 350, curve: Curve.Friction}))
|
|
|
}
|
|
|
- .height(this.isOpen ? '' : 0)
|
|
|
- // .backgroundColor(Color.Black)
|
|
|
|
|
|
Row({space: 7}){
|
|
|
Text(this.isOpen ? '收起详情' : '展开详情')
|
|
|
@@ -276,10 +279,10 @@ struct HeroItem{
|
|
|
.each((item) => {
|
|
|
Image($r('app.media.icon_hero_flower'))
|
|
|
.width(36)
|
|
|
- .aspectRatio(1)
|
|
|
.zIndex(999)
|
|
|
- .position({ x: `${item.item.x}%`, y: item.item.y })
|
|
|
+ .aspectRatio(1)
|
|
|
.opacity(this.flowerAnimation ? 1 : 0)
|
|
|
+ .position({ x: `${item.item.x}%`, y: item.item.y })
|
|
|
})
|
|
|
.key((item) => JSON.stringify(item))
|
|
|
}
|