add store option function 'defulat'
This commit is contained in:
parent
f0c27bc4c6
commit
92a639df71
2 changed files with 4 additions and 1 deletions
|
|
@ -34,13 +34,13 @@ local _,advancedTween = pcall(require,"src.libs.AdvancedTween"); ---@module src.
|
|||
function module.init()
|
||||
local this = {items = {}};
|
||||
|
||||
this.require = require;
|
||||
this.advancedTween = type(advancedTween) == "table" and advancedTween;
|
||||
this.event = event.init(this);
|
||||
this.store = store.init(this);
|
||||
--this.style = style.init(this);
|
||||
this.class = class.init(this);
|
||||
this.mount = mount.init(this);
|
||||
this.require = require;
|
||||
|
||||
--this.makeClass = makeClass;
|
||||
--this.tween = tween;
|
||||
|
|
|
|||
|
|
@ -136,6 +136,9 @@ function module.init(shared)
|
|||
end
|
||||
return register;
|
||||
end
|
||||
function store:default(key,value)
|
||||
self[key] = self[key] or value;
|
||||
end
|
||||
function new.new(self)
|
||||
return setmetatable(
|
||||
{__self = self or {},__evt = setmetatable({},week),__reg = setmetatable({},week)},store
|
||||
|
|
|
|||
Loading…
Reference in a new issue