This commit is contained in:
세젤귀 고양이들 2021-12-24 22:50:25 +09:00
parent acc8f403e7
commit b82625f6a5

View file

@ -153,21 +153,21 @@ function module.init(shared)
end end
local this = defaultProperties or {}; local this = defaultProperties or {};
setmetatable(this,{ setmetatable(this,{
__call = function (self,prop) __call = function (self,prop,...)
local propType = type(prop); local propType = type(prop);
if propType == "string" then if propType == "string" then
local lastName = prop; local lastName = prop;
return function (nprop) return function (nprop,...)
nprop = nprop or {}; nprop = nprop or {};
nprop.Name = lastName; nprop.Name = lastName;
local item = make(ClassName,nprop,this); local item = make(ClassName,nprop,...,this);
addObject(lastName,item); addObject(lastName,item);
return item; return item;
end; end;
elseif propType == "nil" then elseif propType == "nil" then
return make(ClassName,this); return make(ClassName,this);
end end
return make(ClassName,prop,this); return make(ClassName,prop,...,this);
end; end;
}); });
return this; return this;