Foxtable(狐表)用户栏目专家坐堂 → [求助]weui权限


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

主题:[求助]weui权限

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107523 积分:546900 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By: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

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


加好友 发短信
等级:超级版主 帖子:107523 积分:546900 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/6/30 17:11:00 [显示全部帖子]

就是帮助里的用法

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

 回到顶部