@@ -36,7 +36,6 @@ struct ArticleCellView: View{
36
36
if ( article. fresh!) {
37
37
Text ( " 新 " )
38
38
. padding ( EdgeInsets ( top: 2 , leading: 5 , bottom: 2 , trailing: 5 ) )
39
- //.frame(width: 50,height: 25)
40
39
. background ( . red)
41
40
. cornerRadius ( 2 )
42
41
. shadow ( color: Color . black. opacity ( 0.08 ) , radius: 60 , x: 0.0 , y: 16 )
@@ -48,7 +47,6 @@ struct ArticleCellView: View{
48
47
if ( article. tags != nil && !article. tags!. isEmpty) {
49
48
Text ( article. tags? . first? . name ?? " " )
50
49
. padding ( EdgeInsets ( top: 2 , leading: 5 , bottom: 2 , trailing: 5 ) )
51
- //.frame(width: 80,height: 25)
52
50
. background ( . orange)
53
51
. cornerRadius ( 2 )
54
52
. shadow ( color: Color . black. opacity ( 0.08 ) , radius: 60 , x: 0.0 , y: 16 )
@@ -80,8 +78,8 @@ struct ArticleCellView: View{
80
78
//2-中间部分
81
79
HStack {
82
80
VStack ( alignment: . leading) {
83
- Text ( article. title ?? " " )
84
- Text ( article. desc ?? " " )
81
+ Text ( article. title ?? " " ) . lineLimit ( 2 ) . font ( . system ( size : 18 ) )
82
+ Text ( article. desc ?? " " ) . lineLimit ( 2 ) . foregroundColor ( . gray )
85
83
}
86
84
Spacer ( )
87
85
AnimatedImage ( url: URL ( string: article. envelopePic ?? " " ) )
@@ -94,17 +92,26 @@ struct ArticleCellView: View{
94
92
//3-分类、收藏
95
93
HStack {
96
94
95
+ if ( article. isTop!) {
96
+ Text ( " 置顶 " )
97
+ . padding ( EdgeInsets ( top: 2 , leading: 5 , bottom: 2 , trailing: 5 ) )
98
+ . background ( . red)
99
+ . cornerRadius ( 2 )
100
+ . shadow ( color: Color . black. opacity ( 0.08 ) , radius: 60 , x: 0.0 , y: 16 )
101
+ . textFieldStyle ( . roundedBorder)
102
+ . font ( Font . system ( size: 15 ) )
103
+ }
104
+
97
105
Text ( article. superChapterName ?? " " )
98
106
. padding ( EdgeInsets ( top: 2 , leading: 5 , bottom: 2 , trailing: 5 ) )
99
- //.frame(width: 100,height: 25)
100
107
. background ( . green)
101
108
. cornerRadius ( 2 )
102
109
. shadow ( color: Color . black. opacity ( 0.08 ) , radius: 60 , x: 0.0 , y: 16 )
103
110
. textFieldStyle ( . roundedBorder)
104
111
. font ( Font . system ( size: 15 ) )
112
+
105
113
Text ( article. chapterName ?? " " )
106
114
. padding ( EdgeInsets ( top: 2 , leading: 5 , bottom: 2 , trailing: 5 ) )
107
- //.frame(width: 80,height: 25)
108
115
. background ( . orange)
109
116
. cornerRadius ( 2 )
110
117
. shadow ( color: Color . black. opacity ( 0.08 ) , radius: 60 , x: 0.0 , y: 16 )
0 commit comments