以文本方式查看主题
- Foxtable(狐表) (http://foxtable.net/bbs/index.asp)
-- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2)
---- AddList 怎么控制加载数据, (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=176974)
|
-- 作者:yifan3429
-- 发布时间:2022/5/5 13:47:00
-- AddList 怎么控制加载数据,
- Select Case e.Path
- Case "testlist"
- Dim wb As New weui
- wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True)
- wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True)
- With ExWeUI.WebUI.AddListGroup("","lst01",1)
- For i As Integer = 1 To 4
- With .AddList("Foxtable数据库应用开发宝典 数据管理","images/007.jpg")
- With .LeftFooter
- .AddFoot("¥49.00").Attribute = "style=\'color:red;font-size:15px\'"
- .AddFoot("¥99.00").Attribute = "style=\'font-size:12px;text-decoration: line-through;\'"
- End With
- .RightFooter.AddFoot("加入购物车").Attribute = " style=\'color:blue;\'"
- End With
- Next
- wb.InsertHTML(.BuildHtml)
- End With
- wb.AppendHTML("<script>initExWeUI();</script>")
- e.WriteString(wb.Build)
- End Select
一下几千条数据会卡死 怎么根据客户的滑动自动加载
|
-- 作者:有点蓝
-- 发布时间:2022/5/5 13:58:00
--
此主题相关图片如下:1.png
|
-- 作者:yifan3429
-- 发布时间:2022/5/9 0:16:00
--
结果加载不出来 原来黄色部分是可以加载的 就是不能控制加载数量 请教老师
Dim e As RequestEventArgs = args(0) Dim wb As New weui wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True) Dim drs As List(of DataRow) = DataTables("图库_木作定制").SQLSelect("",8,"[_Identify]") With ExWeUI.WebUI.AddExInfiniteScroll("pr01","sjjiazai",0,8) \'默认显示8行,当行数少不需要滚动的时候是不会触发滚动事件的 Dim wb2 As New weui \'用于生成默认列表 With wb2.AddPanelGroup("","pg1","") With ExWeUI.WebUI.AddListGroup("","lst01",4) For i As Integer = 1 To 4 For Each r As DataRow In DataTables("图库_木作定制").sqlSelect("") With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Next Next End With
End With
.Content = wb2.BuildHtml("pg1") \'设置默认显示的列表 wb.InsertHTML(.BuildHtml) End With wb.InsertHTML(ExWeUI.WebUI.AddBackTop("bt01").BuildHtml) wb.AppendHTML("<script>initExWeUI();</script>")
e.WriteString(wb.Build)
页面二 sjjiazai. HEML
Dim e As RequestEventArgs = args(0) Dim json As String = e.PlainText Dim jo2 As JObject = JObject.parse(json)
Dim jo As new JObject jo("page") = cint(jo2("page")) + 1 jo("max") = val(jo2("max")) + 5
Dim cnt As Integer = val(jo2("max")) + 1
If cnt>=20 Then \'模拟数据加载完毕 jo("done") = True jo("tip") = "啊哦! 你居然看完了所有内容!"\'更改加载完毕后的提示 Else Dim wb As New weui With ExWeUI.WebUI.AddListGroup("","lst01",4) For i As Integer = 1 To 4 For Each r As DataRow In DataTables("图库_木作定制").sqlSelect("") With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Next Next End With jo("html") = wb.BuildHtml("pg1") End If System.Threading.Thread.Sleep(1000) e.WriteString(jo.ToString)
[此贴子已经被作者于2022/5/9 0:16:33编辑过]
|
-- 作者:有点蓝
-- 发布时间:2022/5/9 8:59:00
--
页面一
With ExWeUI.WebUI.AddListGroup("","lst01",4) For Each r As DataRow In drs With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Next End With
End With
页面二 Dim e As RequestEventArgs = args(0) Dim json As String = e.PlainText Dim jo2 As JObject = JObject.parse(json)
Dim jo As new JObject jo("page") = cint(jo2("page")) + 1 jo("max") = val(jo2("max")) + 8
Dim cnt As Integer = val(jo2("max")) + 1
If cnt>=20 Then \'模拟数据加载完毕 jo("done") = True jo("tip") = "啊哦! 你居然看完了所有内容!"\'更改加载完毕后的提示 Else Dim wb As New weui With ExWeUI.WebUI.AddListGroup("","lst01",4) For Each r As DataRow In DataTables("图库_木作定制").SQLSelect("[_Identify] > " & jo2("max").ToString , 8 ,"[_Identify]") With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Next End With jo("html") = wb.BuildHtml("pg1") End If System.Threading.Thread.Sleep(1000) e.WriteString(jo.ToString)
|
-- 作者:yifan3429
-- 发布时间:2022/5/9 10:31:00
--
Dim e As RequestEventArgs = args(0) Dim wb As New weui wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True) Dim drs As List(of DataRow) = DataTables("图库_木作定制").SQLSelect("",8,"[_Identify]") With ExWeUI.WebUI.AddExInfiniteScroll("pr01","sjjiazai",0,8) \'默认显示8行,当行数少不需要滚动的时候是不会触发滚动事件的 Dim wb2 As New weui \'用于生成默认列表 With wb2.AddPanelGroup("","pg1","") With ExWeUI.WebUI.AddListGroup("","lst01",4) For Each r As DataRow In drs With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Next End With End With .Content = wb2.BuildHtml("pg1") \'设置默认显示的列表 wb.InsertHTML(.BuildHtml) End With wb.InsertHTML(ExWeUI.WebUI.AddBackTop("bt01").BuildHtml) wb.AppendHTML("<script>initExWeUI();</script>")
e.WriteString(wb.Build)
还是没有反应
这个是没限流的 可以打开网页
Dim e As RequestEventArgs = args(0) Dim wb As New weui wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True)
With ExWeUI.WebUI.AddListGroup("","lst01",4) For i As Integer = 1 To 4 For Each r As DataRow In DataTables("图库_木作定制").sqlSelect("") With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Next Next wb.InsertHTML(.BuildHtml) End With wb.InsertHTML(ExWeUI.WebUI.AddBackTop("bt01").BuildHtml) wb.AppendHTML("<script>initExWeUI();</script>") e.WriteString(wb.Build)
[此贴子已经被作者于2022/5/9 10:33:21编辑过]
|
-- 作者:有点蓝
-- 发布时间:2022/5/9 10:51:00
--
With ExWeUI.WebUI.AddExInfiniteScroll("pr01","sjjiazai",0,8) \'默认显示8行,当行数少不需要滚动的时候是不会触发滚动事件的 With ExWeUI.WebUI.AddListGroup("","lst01",4) For Each r As DataRow In drs With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Next.Content = .BuildHtml End With wb.InsertHTML(.BuildHtml) End With
|
-- 作者:yifan3429
-- 发布时间:2022/5/9 11:15:00
--
--------------------------- 错误 --------------------------- 编译错误:“Content”不是“ExWeUI.ExListGroup”的成员。
错误代码:.Content = .BuildHtml --------------------------- 确定 ---------------------------
|
-- 作者:有点蓝
-- 发布时间:2022/5/9 11:22:00
--
With ExWeUI.WebUI.AddExInfiniteScroll("pr01","sjjiazai",0,8) \'默认显示8行,当行数少不需要滚动的时候是不会触发滚动事件的dim s as string With ExWeUI.WebUI.AddListGroup("","lst01",4) For Each r As DataRow In drs With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Nexts= .BuildHtml End With .Content = s wb.InsertHTML(.BuildHtml) End With
|
-- 作者:yifan3429
-- 发布时间:2022/5/9 11:46:00
--
第一个OK了 谢谢老师
Dim e As RequestEventArgs = args(0) Dim wb As New weui wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True) Dim drs As List(of DataRow) = DataTables("图库_木作定制").SQLSelect("",8,"[_Identify]") With ExWeUI.WebUI.AddExInfiniteScroll("pr01","sjjiazai",0,8) \'默认显示8行,当行数少不需要滚动的时候是不会触发滚动事件的 Dim s As String With ExWeUI.WebUI.AddListGroup("","lst01",4) For Each r As DataRow In drs With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Next s= .BuildHtml End With .Content = s wb.InsertHTML(.BuildHtml) End With wb.InsertHTML(ExWeUI.WebUI.AddBackTop("bt01").BuildHtml) wb.AppendHTML("<script>initExWeUI();</script>") e.WriteString(wb.Build)
第二个页面不会自动加载进来
Dim e As RequestEventArgs = args(0) Dim json As String = e.PlainText Dim jo2 As JObject = JObject.parse(json)
Dim jo As new JObject jo("page") = cint(jo2("page")) + 1 jo("max") = val(jo2("max")) + 8
Dim cnt As Integer = val(jo2("max")) + 1
If cnt>=20 Then \'模拟数据加载完毕 jo("done") = True jo("tip") = "啊哦! 你居然看完了所有内容!"\'更改加载完毕后的提示 Else Dim wb As New weui With ExWeUI.WebUI.AddListGroup("","lst01",4) For Each r As DataRow In DataTables("图库_木作定制").SQLSelect("[_Identify] > " & jo2("max").ToString , 8 ,"[_Identify]") With .AddList(r("网络_缩略图"),r("网络_文件地址")) End With Next End With jo("html") = wb.BuildHtml("pg1") End If System.Threading.Thread.Sleep(1000) e.WriteString(jo.ToString)
|
-- 作者:有点蓝
-- 发布时间:2022/5/9 12:02:00
--
With ExWeUI.WebUI.AddExInfiniteScroll("pr01","sjjiazai.html",0,8)
[此贴子已经被作者于2022/5/9 12:02:08编辑过]
|