Skip to content

Commit

Permalink
v10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PGzxc committed Nov 30, 2023
1 parent e56dd1d commit 8655b97
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ target 'WanAndroid_SwiftUI' do
pod 'AlamofireObjectMapper', '~> 5.2'
pod 'ProgressHUD', '~> 13.6.2'
pod 'SDWebImageSwiftUI'
pod 'WrappingHStack'

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

### v10.0

* 导入[WrappingHStack](https://github.com/dkk/WrappingHStack)自动换行库
* 重构导航布局页面

## 五 开发任务

### 5.1 已完成
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import SwiftUI
import WrappingHStack

struct NavigationSectionBuilder: View {

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

ForEach(treeDatas!){ treeItem in
Section(header: Text(treeItem.name!).font(Font.system(size: 18))) {
Section(header: Text(treeItem.name!).fontWeight(Font.Weight.bold).font(Font.system(size: 18))) {
//标签
LazyVGrid(columns: columns, spacing: 10){
ForEach(treeItem.children!){ treeItem in
Button(treeItem.name!) {}
.padding(EdgeInsets(top: 5, leading: 8, bottom: 5, trailing: 8))
.border(.gray,width: 1)
.cornerRadius(2)
//.frame(minWidth: 0,maxWidth: .infinity)

}
WrappingHStack(treeItem.children!, id:\.self,spacing: .constant(10),lineSpacing: 10) { treeItem in
Text(treeItem.name!)
.padding(EdgeInsets(top: 5, leading: 8, bottom: 5, trailing: 8))
.border(.gray,width: 1)
.cornerRadius(2)
}
}
}
Expand Down

0 comments on commit 8655b97

Please sign in to comment.