make model/group subclass to inherit common ops
This commit is contained in:
parent
3dbd1e85a8
commit
a5ddd78299
4 changed files with 76 additions and 59 deletions
|
|
@ -96,13 +96,16 @@ let h = self.h = moto.webui = {
|
|||
} else {
|
||||
el.innerHTML = html;
|
||||
}
|
||||
let map = {};
|
||||
for (let bind of ctx) {
|
||||
let { elid, func } = bind;
|
||||
let et = $(elid);
|
||||
map[elid] = et;
|
||||
for (let [name, fn] of Object.entries(func)) {
|
||||
et[name] = fn;
|
||||
}
|
||||
}
|
||||
return map;
|
||||
},
|
||||
|
||||
el: (type, attr, innr) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue