UNPKG

@dooboostore/dom-render

Version:
40 lines (39 loc) 1.06 kB
import { ComponentBase } from "../ComponentBase.js"; import { DomRender } from "../../DomRender.js"; import { RawSet } from "../../rawsets/RawSet.js"; var If; ((_If) => { _If.selector = "dr-if"; class If2 extends ComponentBase { constructor() { super(...arguments); this.sw = false; } async onInitRender(param, rawSet) { super.onInitRender(param, rawSet); } onChangeAttrRender(name, value, other) { super.onChangeAttrRender(name, value, other); if (this.equalsAttributeName(name, "value")) { this.sw = value; } } } _If.If = If2; })(If || (If = {})); var If_default = { if: (config) => { return RawSet.createComponentTargetElement({ name: If.selector, template: '<div dr-if="@this@.sw" dr-option-strip="true" >#innerHTML#</div>', objFactory: (e, o, r2, counstructorParam) => { return DomRender.run({ rootObject: new If.If(...counstructorParam), config }); } }); } }; export { If, If_default as default }; //# sourceMappingURL=If.js.map