mirror of
https://github.com/esiur/iui.git
synced 2025-05-06 06:42:58 +00:00
window
This commit is contained in:
parent
85f8df39d5
commit
657e9b7938
@ -15,7 +15,12 @@ export default IUI.module(class IUIWindow extends IUIElement {
|
|||||||
|
|
||||||
static moduleName = "window";
|
static moduleName = "window";
|
||||||
|
|
||||||
create() {
|
async create() {
|
||||||
|
|
||||||
|
await super.create();
|
||||||
|
|
||||||
|
//debugger;
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.tabIndex = 0;
|
this.tabIndex = 0;
|
||||||
@ -46,16 +51,12 @@ export default IUI.module(class IUIWindow extends IUIElement {
|
|||||||
else
|
else
|
||||||
this._body = b[0];
|
this._body = b[0];
|
||||||
|
|
||||||
if (this.icon) {
|
//if (this.icon) {
|
||||||
this._icon = document.createElement("div");
|
this._icon = document.createElement("div");
|
||||||
this._icon.className = this.cssClass + "-icon";
|
this._icon.className = this.cssClass + "-icon";
|
||||||
//this._icon.src = this.icon;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this._icon.style.setProperty("--icon", `url('${this.icon}')`);
|
this._icon.style.setProperty("--icon", `url('${this.icon}')`);
|
||||||
this._header.appendChild(this._icon);
|
this._header.appendChild(this._icon);
|
||||||
}
|
//}
|
||||||
|
|
||||||
this._caption = document.createElement("div");
|
this._caption = document.createElement("div");
|
||||||
this._caption.className = this.cssClass + "-caption";
|
this._caption.className = this.cssClass + "-caption";
|
||||||
@ -100,6 +101,13 @@ export default IUI.module(class IUIWindow extends IUIElement {
|
|||||||
get icon() {
|
get icon() {
|
||||||
return this.getAttribute("icon");
|
return this.getAttribute("icon");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set icon(value) {
|
||||||
|
this._icon.style.setProperty("--icon", `url('${value}')`);
|
||||||
|
this.setAttribute("icon", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
setFocus(v) {
|
setFocus(v) {
|
||||||
this.focus = v;
|
this.focus = v;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user