以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 手机端中panel的徽章能否自定义颜色? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=125228) |
-- 作者:rjh4078 -- 发布时间:2018/9/23 0:02:00 -- 手机端中panel的徽章能否自定义颜色? 如题,比如我想根据状态生产红绿黄三种颜色 |
-- 作者:有点甜 -- 发布时间:2018/9/23 14:09:00 -- 你说的【徽章】指什么地方?
看看 http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=124698&skin=0
|
-- 作者:rjh4078 -- 发布时间:2018/9/24 1:15:00 -- 此主题相关图片如下:1.png |
-- 作者:有点甜 -- 发布时间:2018/9/25 9:47:00 -- Dim wb As New WeUI Dim txt As String = "由各种物质组成的巨型球状天体,叫做星球.星球有一定的形状,有自己的运行轨道." With wb.AddPanelGroup("","pg1","图文组合列表") .Add("pn1","标题一<span class=""weui-badge"" style=""background-color:green"">8</span>",txt,"./images/button.png","http://www.foxtable.com") With .Add("pn2","标题二",txt,"./images/search.png") .Badge= " " .AddFoot("文字来源") .AddFoot("时间") .AddFoot("|其他信息","http://www.foxtable.com") End With End With e.WriteString(wb.Build) \'生成网页 |
-- 作者:rjh4078 -- 发布时间:2018/9/25 10:42:00 -- 此主题相关图片如下:1.png 老师 现在能变色 但是这个徽章的位置 跟原来的有点不一样 If cc="制单" Then \'\' .Add("pn" & cc,cc,"操作员:" & pr(cc & "人") & ";" & "时间:" & pr(cc & "日期"),"./images/" & cc & ".png","").Badge = iif(pr.isnull(cc & "人"),"未完成","完成") .Add("pn" & cc,cc,"操作员:" & pr(cc & "人") & ";" & "时间:" & pr(cc & "日期") & "<span class=""weui-badge"" style=""background-color:" & iif(pr.isnull(cc & "人"),"red","green") & """>" & iif(pr.isnull(cc & "人"),"未完成","完成") & "</span>","./images/" & cc & ".png","") Else \'\' .Add("pn" & cc,cc,"操作员:" & pr(cc & "人") & ";" & "时间:" & pr(cc & "时间"),"./images/" & cc & ".png","").Badge = iif(pr.isnull(cc & "人"),"未完成","完成") .Add("pn" & cc,cc,"操作员:" & pr(cc & "人") & ";" & "时间:" & pr(cc & "时间") & "<span class=""weui-badge"" style=""background-color:" & iif(pr.isnull(cc & "人"),"red","green") & """>" & iif(pr.isnull(cc & "人"),"未完成","完成") & "</span>","./images/" & cc & ".png","") End If |
-- 作者:有点甜 -- 发布时间:2018/9/25 11:46:00 -- 细节请自行调试。在浏览器那里,按下F12,调出调试器,调试你的样式。
我测试4楼代码没问题。 |