Files
tianrunCRM/Assets/trCRM/upgradeRes4Dev/priority/lua/ui/cell/CLLCellServer.lua

37 lines
802 B
Lua
Raw Normal View History

2020-07-04 14:41:25 +08:00
-- xx单元
2020-08-02 08:47:44 +08:00
local _cell = {}
local csSelf = nil
local transform = nil
local mData = nil
local uiobjs = {}
2020-07-04 14:41:25 +08:00
2020-08-02 08:47:44 +08:00
-- 初始化,只调用一次
function _cell.init(csObj)
csSelf = csObj
transform = csSelf.transform
--[[
2020-07-04 14:41:25 +08:00
getChild(transform, "offset", "Progress BarHong"):GetComponent("UISlider");
--]]
2020-08-02 08:47:44 +08:00
uiobjs.Label = getCC(transform, "Label", "UILabel")
end
2020-07-04 14:41:25 +08:00
2020-08-02 08:47:44 +08:00
-- 显示,
-- 注意c#侧不会在调用show时调用refresh
function _cell.show(go, data)
mData = data
uiobjs.Label.text = mData.name
if mData.isDev == 1 then
uiobjs.Label.color = Color.red
else
uiobjs.Label.color = Color.white
2020-07-04 14:41:25 +08:00
end
2020-08-02 08:47:44 +08:00
end
2020-07-04 14:41:25 +08:00
2020-08-02 08:47:44 +08:00
-- 取得数据
function _cell.getData()
return mData
2020-07-04 14:41:25 +08:00
end
2020-08-02 08:47:44 +08:00
--------------------------------------------
return _cell