chore: Improve SUI Component element manipulation methods and add empty expression helper
This commit is contained in:
parent
252e1793ac
commit
ae5e60aefa
2 changed files with 75 additions and 60 deletions
120
data/bindata.go
120
data/bindata.go
File diff suppressed because one or more lines are too long
|
|
@ -106,6 +106,21 @@ function __sui_component(elm, component) {
|
|||
this.store = new __sui_store(elm);
|
||||
this.props = new __sui_props(elm);
|
||||
this.state = component ? new __sui_state(component) : {};
|
||||
|
||||
const __self = this;
|
||||
this.$root = new __Query(this.root);
|
||||
this.find = function (selector) {
|
||||
return new __Query(__self.root).find(selector);
|
||||
};
|
||||
|
||||
this.query = function (selector) {
|
||||
return __self.root.querySelector(selector);
|
||||
};
|
||||
|
||||
this.render = function (name, data, option) {
|
||||
const r = new __Render(__self, option);
|
||||
return r.Exec(name, data);
|
||||
};
|
||||
}
|
||||
|
||||
function __sui_event_handler(event, dataKeys, jsonKeys, target, root, handler) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue