美女张开腿让男人桶爽,豆国产97在线 | 亚洲,亚洲人妖女同在线播放,日韩精品中文字幕人妻系列,一本大道在线一久道一区二区 ,中文字幕久久熟女人妻av免费,色婷婷综合久久久久中文一区二区,西西少妇一区二区三区精品

產(chǎn)品中心 業(yè)內(nèi)新聞 案例中心 視頻中心

lua 對回車(%3Cbr%3E)處理方法 lua 對回車(%3Cbr%3E)處理方法

lua 對回車(%3Cbr%3E)處理方法

我們在Gird列出數(shù)據(jù)的時(shí)候,若數(shù)據(jù)內(nèi)帶%3Cbr%3E,其實(shí)是回車的意思,若grid讀出數(shù)據(jù)不做任何處理,那么就會(huì)影響系統(tǒng)表達(dá)

為了解決這個(gè)問題,我們可以編輯一個(gè)lua腳本,將這個(gè)數(shù)據(jù)做處理后再顯示(在顯示前事件里面定義這個(gè)lua腳本)

腳本列子

–[[
? ? 功能說明:
? ? ? ? 1) 顯示前做一些字段的處理
? ? ? ? 2)前端導(dǎo)入,新增有換行符號 %%3Cbr%%3E  ,替換成 <br> 前端html支持的換行內(nèi)容
? ? ? ? 3)內(nèi)容中有&,替換成 & 前端解析 &不支持,最好在輸入時(shí)進(jìn)行替換
–]]
json = require(“json”)
mobox = require(“OILua_JavelinExt”)
require(“oi_basestrfunc”)
function BeforeGridShow(strLuaDEID)
? ? local nRet, strRetInfo
? ? local arobjs, attrs, success
? ? — 獲取輸入的DataJson數(shù)據(jù)包
? ? nRet, strRetInfo = mobox.getCurEditDataPacket(strLuaDEID)
? ? if (nRet ~= 0) then
? ? ? ? mobox.error(strLuaDEID, “無法獲取數(shù)據(jù)包!”)
? ? ? ? return
? ? end
? ? if (strRetInfo == ” or strRetInfo == nil) then
? ? ? ? return
? ? end
? ? — 解析數(shù)據(jù)包,數(shù)據(jù)包格式
? ? — [{“id”:””,”attrs”:[{“attr”:””,”value”:””},..]},..]
? ? local n, nCount
? ? success, arobjs = pcall(json.decode, strRetInfo)
? ? if (success == false) then
? ? ? ? mobox.error(strLuaDEID, “非法的JSON格式!”)
? ? ? ? return
? ? end
? ? nCount = #arobjs
? ? if (nCount == 0) then
? ? ? ? return
? ? end
? ? local obj, attrs
? ? local nattr_count
? ? local strRow, strAttr, strItem
? ? local strDataJson
? ? local id, strValue
? ? local strAttrs
? ? strDataJson = ‘[‘
? ? local seg = {}
? ? local nSegCount = 0
? ? for n = 1, nCount do
? ? ? ? obj = arobjs[n]
? ? ? ? attrs = obj.attrs
? ? ? ? nattr_count = #attrs
? ? ? ? id = obj.id
? ? ? ? strAttrs=”
? ? ? ? — 開始過濾顯示數(shù)據(jù)對象屬性
? ? ? ? for nIndex = 1, nattr_count do
? ? ? ? ? ? strAttr = attrs[nIndex].attr
? ? ? ? ? ? strValue = attrs[nIndex].value
? ? ? ? ? ? strValue = strValue:gsub(“%%3Cbr%%3E”, “<br>”)
? ? ? ? ? ? strValue = strValue:gsub(“&”, “&”)
? ? ? ? ? ? strItem = ‘{“attr”:”‘ .. strAttr .. ‘”,”value”:”‘ .. strValue .. ‘”},’
? ? ? ? ? ? strAttrs = strAttrs .. strItem
? ? ? ? end
? ? ? ? — 取消最后一個(gè),號
? ? ? ? strAttrs = trim_laster_char(strAttrs)
? ? ? ? strRow = ‘{“id”:”‘ .. id .. ‘”,”attrs”:[‘ .. strAttrs .. ‘]},’
? ? ? ? strDataJson = strDataJson .. strRow
? ? end
? ? — 取消最后一個(gè),號
? ? strDataJson = trim_laster_char(strDataJson)
? ? strDataJson = strDataJson .. ‘]’
? ? local strAction = ‘[{“action_type”:”reset_data_attr”,”value”:’ .. strDataJson .. ‘}]’
? ? mobox.setAction(strLuaDEID, strAction)
end
這個(gè)列子也可以用于別的一些非法字符串的處理
標(biāo)簽:低代碼腳本 上一篇: 下一篇:
展開更多
預(yù)約軟件體驗(yàn)

loading...

主站蜘蛛池模板: 日本免费一区二区三区日本| 亚洲精品综合欧美一区二区三区| 免费无码黄真人影片在线| a欧美爰片久久毛片a片| 久久无码人妻热线精品| 国产精品成人无码久久久久久| 国内精品久久久久国产盗摄| 米奇欧美777四色影视在线 | 亚洲欧美日韩综合一区在线观看| 色8久久人人97超碰香蕉987| 十八禁av无码免费网站| 成午夜精品一区二区三区| 免费久久精品国产片| 亚洲男人成人性天堂网站| 99久久无色码中文字幕人妻| 久久久国产精品va麻豆| 国产热の有码热の无码视频| 高清粉嫩无套内谢国语播放| 欧美阿v高清资源不卡在线播放| 无码国产成人午夜电影观看| 亚洲аv电影天堂网| 五十路熟妇无码专区| 激情五月开心综合亚洲| 国产成人无码av大片大片在线观看| 日本一二免费不卡区| 97人人超碰国产精品最新o| 一本久久a精品一区二区| 毛片a久久99亚洲欧美毛片| 国产偷国产偷亚洲清高app| 国产高清无套内谢| aaa少妇高潮大片免费看| 无码精品人妻一区二区三区老牛| 亚欧欧美人成视频在线| 亚洲国产成人欧美在线观看| 精品国产乱码久久久久久浪潮小说 | 久久国产中文娱乐网| 丝袜人妻一区二区三区网站| 中文字幕制服丝袜人妻动态图| 2020年最新国产精品正在播放| 亚洲成a人无码av波多野| 国产99re热这里只有精品|