参照示例研究,现在是固定了,但是列表宽度成这样子了:
此主题相关图片如下:微信图片_20230629114036.png
代码如下,不知是哪个环节错了?
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.AppendHTML("<style> #tb1_pages{display: flex;overflow: auto;flex:1}</style>", True) '设置页面的布局方式
With wb.AddTabBar("", "tb1", 0)
.AddPage("page1", "订单", "./images/HOME.png")
.AddPage("page2", "下单", "./images/YSS.png")
.AddPage("page3", "商品", "./images/DDH.png")
.AddPage("page4", "我", "./images/WO.png")
End With
Dim p1Div = ExWeUI.WebUI.AddHtmlTag("", "", "div") '用于放置导航条和筛选条件
Dim p1Div1 = ExWeUI.WebUI.AddHtmlTag("", "", "div", , "style='display: flex;flex-direction: column;height:100%;'") '把page1内容都放到一个div中,使用flex布局,否则滚动组件底部会被TabBar遮挡
'信息页导航
With ExWeUI.WebUI.AddNavBar("", "navbar01")
.Attribute = "style='background-color: var(--blue);color: var(--white)'"
With .LeftGroup.AddItem("nvi01", "")
.image = "./images/00.png"
End With
.CenterGroup.Text = "订单列表"
With .RightGroup.AddItem("nvi04", "")
.image = "./images/01.png"
End With
With .RightGroup.AddItem("nvi03", "")
.image = "./images/00.png"
.Attribute = "" style = 'padding-right:10px' "
End With
p1Div.InnerHtml = p1Div.InnerHtml & .BuildHtml
End With
With ExWeUI.WebUI.AddSearchBar("sbar01") '添加一个搜索条
.class = "exui-displaynone"
.DataFunc = "BarSearchNewOrder" '绑定js的查询函数test
.CancelFunc = "closeSbar01" '绑定js的取消函数testcancel
p1Div.InnerHtml = p1Div.InnerHtml & .BuildHtml
End With
p1Div1.InnerHtml = p1Div.buildhtml
With ExWeUI.WebUI.AddListGroup("", "lst01", 1)
For i As Integer = 1 To 15
With .AddList("Foxtable数据库应用开发宝典 数据管理", "images/zyxcl.png")
.TextStyle = "style='color:block;font-size:12px'"
.AutoHeight = True
.ImageWidth = 60
With .LeftFooter
.AddFoot("发布时间").Attribute = "style='color:#00698C;font-size:12px'"
.AddFoot("作者").Attribute = "style='color:#00698C;font-size:12px'"
End With
.RightFooter.AddFoot("帮助说明").Attribute = " style='color:blue;font-size:12px'"
End With
Next
p1Div1.InnerHtml = p1Div.InnerHtml & ExWeUI.WebUI.AddHtmlTag("", "", "div", .BuildHtml & ExWeUI.WebUI.AddBackTop("bt01").BuildHtml , "class=""exui-scrollview""").buildhtml
End With
wb.InsertHTML("page1", p1Div1.buildhtml)
e.WriteString(wb.Build)