fix(core): update

This commit is contained in:
2020-06-01 13:18:51 +00:00
parent f73df83768
commit 5f182ba435
4 changed files with 20 additions and 21 deletions

View File

@@ -12,10 +12,7 @@ import './wcc-properties';
@customElement('wcc-dashboard')
export class WccDashboard extends LitElement {
@property()
public selectedItem: TemplateResult | LitElement = WccDefaultElement as any;
@property()
public selectedInstance;
public selectedItem: TemplateResult | LitElement;
@property()
public selectedViewport: deesDomtools.breakpoints.TViewport = 'desktop';
@@ -57,7 +54,7 @@ export class WccDashboard extends LitElement {
<wcc-sidebar .pages=${this.pages} .elements=${this.elements} @selectedItem=${eventArg => {
this.selectedItem = eventArg.detail;
}}></wcc-sidebar>
<wcc-properties .warning="${this.warning}" .selectedItem=${this.selectedItem} .selectedInstance=${this.selectedInstance} @selectedViewport=${eventArg => {this.selectedViewport = eventArg.detail; this.updateSlot();}}></wcc-properties>
<wcc-properties .warning="${this.warning}" .selectedItem=${this.selectedItem} @selectedViewport=${eventArg => {this.selectedViewport = eventArg.detail; this.updateSlot();}}></wcc-properties>
<wcc-frame id="wccFrame" viewport=${this.selectedViewport}>
${(() => {
if (this.selectedItem instanceof TemplateResult) {
@@ -77,6 +74,7 @@ export class WccDashboard extends LitElement {
return html`${anonItem.demo()}`;
} else {
this.selectedItem = WccDefaultElement as any;
this.updateSlot();
}
})()}
</wcc-frame>