以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]weui权限  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=151668)

--  作者:cool314156
--  发布时间:2020/6/30 15:48:00
--  [求助]weui权限
求教下,weui用Grid 这个元素做导航,怎么设置权限,

AddGrid

AddGrid方法用于增加网格,语法:

AddGrid(ParentID,ID)

ParentID 父容器的ID,如果是顶层对象,设置为""即可。
ID 分组ID。

Add

Add方法用于在网格中添加单元格,语法:

Add(ID, Text, Image)
Add(ID, Text, Image, Href)

ID 单元格ID。
Text 单元格文本
Image 单元格图片
Href

这上面没有隐藏的属性啊
可选参数,单元格图片。





--  作者:有点蓝
--  发布时间:2020/6/30 16:04:00
--  
比如:

有权限才显示
        With wb.AddGrid("","g1")
If  有权限
            .Add("c1","Button", "./images/button.png").Attribute = ""
End If
            .Add("c2","Cell", "./images/cell.png", "http://www.foxtable.com")
            .Add("c3","Toast", "./images/toast.png", "http://www.foxtable.com")
        End With

或者使用不同图片,去掉点击代码和跳转的地址
        With wb.AddGrid("","g1")
If  有权限
            .Add("c1","Button", "./images/button.png").Attribute = ""
Else
            .Add("c1","Button", "./images/button灰色.png")
End If
            .Add("c2","Cell", "./images/cell.png", "http://www.foxtable.com")
            .Add("c3","Toast", "./images/toast.png", "http://www.foxtable.com")
        End With

--  作者:cool314156
--  发布时间:2020/6/30 16:53:00
--  
版主 Attribute = "" 后面看不到,要不弄成个txt文件,我下载下来看看
--  作者:有点蓝
--  发布时间:2020/6/30 17:11:00
--  
就是帮助里的用法

.Add("c1","Button""./images/button.png").Attribute = "onclick=\'javascript:alert(""你单击了我!"")\'"