fixup! webmodel add element type
This commit is contained in:
		
							parent
							
								
									a12478e471
								
							
						
					
					
						commit
						826585bf46
					
				| @ -410,6 +410,21 @@ function TextValue:__init__(...) | |||||||
| end | end | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | local Element = class(Node) | ||||||
|  | M.Element = Element | ||||||
|  | 
 | ||||||
|  | function Element:__init__(template, ...) | ||||||
|  | 	Node.__init__(self, ...) | ||||||
|  | 
 | ||||||
|  | 	self.default   = nil | ||||||
|  | 	self.size      = nil | ||||||
|  | 	self.optional  = false | ||||||
|  | 
 | ||||||
|  | 	self.template  = template | ||||||
|  | 
 | ||||||
|  | 	self.error = false | ||||||
|  | end | ||||||
|  | 
 | ||||||
| local Section = class(Node) | local Section = class(Node) | ||||||
| M.Section = Section | M.Section = Section | ||||||
| 
 | 
 | ||||||
| @ -426,8 +441,8 @@ function Section:option(t, ...) | |||||||
| 	return obj | 	return obj | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| function Section:template(...) | function Section:element(...) | ||||||
| 	local obj  = Template(...) | 	local obj  = Element(...) | ||||||
| 	self:append(obj) | 	self:append(obj) | ||||||
| 	return obj | 	return obj | ||||||
| end | end | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user