add
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
-- xx单元
|
||||
local _cell = {}
|
||||
---@type Coolape.CLCellLua
|
||||
local csSelf = nil
|
||||
local transform = nil
|
||||
---@type _DBTaskCust
|
||||
local mData = nil
|
||||
local uiobjs = {}
|
||||
|
||||
-- 初始化,只调用一次
|
||||
function _cell.init(csObj)
|
||||
csSelf = csObj
|
||||
transform = csSelf.transform
|
||||
uiobjs.LabelName = getCC(transform, "LabelName", "UILabel")
|
||||
uiobjs.LabelTime = getCC(transform, "LabelTime", "UILabel")
|
||||
uiobjs.SpriteReddot = getChild(transform, "SpriteReddot").gameObject
|
||||
end
|
||||
|
||||
-- 显示,
|
||||
-- 注意,c#侧不会在调用show时,调用refresh
|
||||
function _cell.show(go, data)
|
||||
mData = data
|
||||
uiobjs.LabelName.text = mData.custName
|
||||
uiobjs.LabelTime.text = DateEx.formatByMs(mData.bookingtime)
|
||||
SetActive(uiobjs.SpriteReddot, mData.bookingDone == DBMessage.BookingDone.effect)
|
||||
end
|
||||
|
||||
-- 取得数据
|
||||
function _cell.getData()
|
||||
return mData
|
||||
end
|
||||
|
||||
--------------------------------------------
|
||||
return _cell
|
||||
Reference in New Issue
Block a user