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

產品中心 業內新聞 案例中心 視頻中心

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

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

分類:二次開發 產品中心 低代碼 557

我們在Gird列出數據的時候,若數據內帶%3Cbr%3E,其實是回車的意思,若grid讀出數據不做任何處理,那么就會影響系統表達

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

腳本列子

–[[
? ? 功能說明:
? ? ? ? 1) 顯示前做一些字段的處理
? ? ? ? 2)前端導入,新增有換行符號 %%3Cbr%%3E  ,替換成 <br> 前端html支持的換行內容
? ? ? ? 3)內容中有&,替換成 & 前端解析 &不支持,最好在輸入時進行替換
–]]
json = require(“json”)
mobox = require(“OILua_JavelinExt”)
require(“oi_basestrfunc”)
function BeforeGridShow(strLuaDEID)
? ? local nRet, strRetInfo
? ? local arobjs, attrs, success
? ? — 獲取輸入的DataJson數據包
? ? nRet, strRetInfo = mobox.getCurEditDataPacket(strLuaDEID)
? ? if (nRet ~= 0) then
? ? ? ? mobox.error(strLuaDEID, “無法獲取數據包!”)
? ? ? ? return
? ? end
? ? if (strRetInfo == ” or strRetInfo == nil) then
? ? ? ? return
? ? end
? ? — 解析數據包,數據包格式
? ? — [{“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=”
? ? ? ? — 開始過濾顯示數據對象屬性
? ? ? ? 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
? ? ? ? — 取消最后一個,號
? ? ? ? strAttrs = trim_laster_char(strAttrs)
? ? ? ? strRow = ‘{“id”:”‘ .. id .. ‘”,”attrs”:[‘ .. strAttrs .. ‘]},’
? ? ? ? strDataJson = strDataJson .. strRow
? ? end
? ? — 取消最后一個,號
? ? strDataJson = trim_laster_char(strDataJson)
? ? strDataJson = strDataJson .. ‘]’
? ? local strAction = ‘[{“action_type”:”reset_data_attr”,”value”:’ .. strDataJson .. ‘}]’
? ? mobox.setAction(strLuaDEID, strAction)
end
這個列子也可以用于別的一些非法字符串的處理
標簽:低代碼腳本 上一篇: 下一篇:
展開更多
預約軟件體驗

loading...

主站蜘蛛池模板: 巨熟乳波霸若妻在线播放| 性一交一乱一伦一| 97人人超碰国产精品最新| 久久精品熟女人妻一区二区三区| 18禁勿入午夜网站入口| 最新国产麻豆aⅴ精品无码| 欧美日韩精品一区二区性色a+v| 久久久久国色αv免费观看| 99爱国产精品免费高清在线| 亚洲精品gv天堂无码男同| 97碰成人国产免费公开视频| 免费精品人在线二线三线区别| 久久精品人人做人人爽电影| 国产真实交换配乱婬95视频| 18禁无遮挡啪啪无码网站| 亚洲三级高清免费| 妇女性内射冈站hdwwwooo| 伦理片午夜视频在线观看| 久久99久国产精品66| 国产aⅴ爽av久久久久久| 精品女同一区二区三区免费站| 99久久无码一区人妻a黑| 色噜噜亚洲男人的天堂| 国产夫妇肉麻对白| 综合图区亚洲另类偷窥| 亚洲天天做日日做天天欢| 日本欧美大码aⅴ在线播放 | 成人综合网亚洲伊人| 不卡一卡二卡三乱码免费网站 | 色婷婷亚洲婷婷八月中文字幕| 在线最全导航精品福利av| 亚洲人成网站在线播放2020| 国产亚洲精品久久综合阿香| 亚洲精品少妇高清30p| 国99精品无码一区二区三区| 亚洲日韩中文第一精品| 免费播放婬乱男女婬视频国产| 久久综合色另类小说| 欧美黑人与白人精品a片| 国产白丝精品爽爽久久蜜臀| 最新国自产拍av|