This commit is contained in:
2020-07-28 21:02:59 +08:00
parent 5a53995fff
commit 8c38fea011
120 changed files with 7097 additions and 1930 deletions

View File

@@ -88,6 +88,7 @@ function TRPNewFollowSimple:showBaseFields()
local param = {}
param.data = self.mdata or {}
param.onFinish = self:wrapFunc(self.setExtendFieldsMode)
param.onLoadOneField = self:wrapFunc(self.onLoadOneField)
param.fields = {}
---@type _ParamCellExtendFiled
local filedInfor
@@ -111,9 +112,12 @@ function TRPNewFollowSimple:onPopupFieldValChg(go)
---@type CLUIElement
local el = go:GetComponent("CLUIElement")
if el.jsonKey == "dealFlag" then
if uiobjs.followUpContent and isNilOrEmpty(uiobjs.followUpContent.value) then
if uiobjs.followUpContent then
local popList = go:GetComponent("UIPopupList")
uiobjs.followUpContent.value = popList.selectedItem
if isNilOrEmpty(uiobjs.followUpContent.value) or self.oldselectedItem == uiobjs.followUpContent.value then
uiobjs.followUpContent.value = popList.selectedItem
self.oldselectedItem = popList.selectedItem
end
end
end
end
@@ -123,14 +127,17 @@ function TRPNewFollowSimple:reposition()
uiobjs.Table.repositionNow = true
end
function TRPNewFollowSimple:onLoadOneField(cell)
local el = cell:GetComponent("CLUIElement")
if el and el.jsonKey == "followUpContent" then
uiobjs.followUpContent = el
end
end
function TRPNewFollowSimple:setExtendFieldsMode(root)
local elements = root:GetComponentsInChildren(typeof(CLUIElement), true)
for i = 0, elements.Length - 1 do
self:setElementMode(elements[i])
if elements[i].jsonKey == "followUpContent" then
---@type CLUIElement
uiobjs.followUpContent = elements[i]
end
end
self:reposition()
end
@@ -181,6 +188,7 @@ end
-- 关闭页面
function TRPNewFollowSimple:hide()
self.oldselectedItem = nil
if uiobjs.DetailRoot.luaTable then
uiobjs.DetailRoot.luaTable.release()
end