Foxtable(狐表)用户栏目专家坐堂 → AddList 怎么控制加载数据,


  共有5463人关注过本帖树形打印复制链接

主题:AddList 怎么控制加载数据,

帅哥哟,离线,有人找我吗?
yifan3429
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2482 积分:22932 威望:0 精华:0 注册:2011/3/29 17:14:00
AddList 怎么控制加载数据,  发帖心情 Post By:2022/5/5 13:47:00 [只看该作者]

 
  1. Select Case e.Path  
  2.     Case "testlist"  
  3.         Dim wb As New weui  
  4.         wb.AppendHTML("<link rel='stylesheet' href='./weui/exweui.css'/>",True)  
  5.         wb.AppendHTML("<script src='./weui/exweui.js' ></script>",True)  
  6.         With ExWeUI.WebUI.AddListGroup("","lst01",1)  
  7.             For i As Integer = 1 To 4  
  8.                 With .AddList("Foxtable数据库应用开发宝典 数据管理","images/007.jpg")  
  9.                     With  .LeftFooter  
  10.                         .AddFoot("¥49.00").Attribute = "style='color:red;font-size:15px'"  
  11.                         .AddFoot("¥99.00").Attribute = "style='font-size:12px;text-decoration: line-through;'"  
  12.                     End With  
  13.                     .RightFooter.AddFoot("加入购物车").Attribute = " style='color:blue;'"  
  14.                 End With  
  15.             Next  
  16.             wb.InsertHTML(.BuildHtml)  
  17.         End With  
  18.         wb.AppendHTML("<script>initExWeUI();</script>")  
  19.         e.WriteString(wb.Build)  
  20. End Select 

一下几千条数据会卡死  怎么根据客户的滑动自动加载

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111414 积分:567140 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/5/5 13:58:00 [只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看

 回到顶部
帅哥哟,离线,有人找我吗?
yifan3429
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2482 积分:22932 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By: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编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111414 积分:567140 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By: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
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2482 积分:22932 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By: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编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111414 积分:567140 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By: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
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2482 积分:22932 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By:2022/5/9 11:15:00 [只看该作者]

 ---------------------------
错误
---------------------------
编译错误:“Content”不是“ExWeUI.ExListGroup”的成员。



错误代码:.Content = .BuildHtml
---------------------------
确定   
---------------------------


 回到顶部
帅哥,在线噢!
有点蓝
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111414 积分:567140 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By: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
            Next
s= .BuildHtml
        End With
.Content = s
    wb.InsertHTML(.BuildHtml)
End With

 回到顶部
帅哥哟,离线,有人找我吗?
yifan3429
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2482 积分:22932 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By: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)

 回到顶部
帅哥,在线噢!
有点蓝
  10楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111414 积分:567140 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/5/9 12:02:00 [只看该作者]

With ExWeUI.WebUI.AddExInfiniteScroll("pr01","sjjiazai.html",0,8)
[此贴子已经被作者于2022/5/9 12:02:08编辑过]

 回到顶部
总数 19 1 2 下一页