Skip to content

Commit 8655b97

Browse files
committed
v10.0
1 parent e56dd1d commit 8655b97

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ target 'WanAndroid_SwiftUI' do
1010
pod 'AlamofireObjectMapper', '~> 5.2'
1111
pod 'ProgressHUD', '~> 13.6.2'
1212
pod 'SDWebImageSwiftUI'
13+
pod 'WrappingHStack'
1314

1415
end

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ ViewModel(MVVM设计模式):
146146
* 数据实体类(bean)由quicktype.io生成改为AlamofireObjectMapper
147147
* 解决能够接收到数据,页面无法显示问题
148148

149+
### v10.0
150+
151+
* 导入[WrappingHStack](https://github.com/dkk/WrappingHStack)自动换行库
152+
* 重构导航布局页面
153+
149154
## 五 开发任务
150155

151156
### 5.1 已完成

WanAndroid_SwiftUI/Content/Navigation/view/NavigationSectionBuilder.swift

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import SwiftUI
9+
import WrappingHStack
910

1011
struct NavigationSectionBuilder: View {
1112

@@ -19,17 +20,13 @@ struct NavigationSectionBuilder: View {
1920
if(treeDatas != nil ){
2021

2122
ForEach(treeDatas!){ treeItem in
22-
Section(header: Text(treeItem.name!).font(Font.system(size: 18))) {
23+
Section(header: Text(treeItem.name!).fontWeight(Font.Weight.bold).font(Font.system(size: 18))) {
2324
//标签
24-
LazyVGrid(columns: columns, spacing: 10){
25-
ForEach(treeItem.children!){ treeItem in
26-
Button(treeItem.name!) {}
27-
.padding(EdgeInsets(top: 5, leading: 8, bottom: 5, trailing: 8))
28-
.border(.gray,width: 1)
29-
.cornerRadius(2)
30-
//.frame(minWidth: 0,maxWidth: .infinity)
31-
32-
}
25+
WrappingHStack(treeItem.children!, id:\.self,spacing: .constant(10),lineSpacing: 10) { treeItem in
26+
Text(treeItem.name!)
27+
.padding(EdgeInsets(top: 5, leading: 8, bottom: 5, trailing: 8))
28+
.border(.gray,width: 1)
29+
.cornerRadius(2)
3330
}
3431
}
3532
}

0 commit comments

Comments
 (0)