UNPKG

@suyouwanggang/p-ui

Version:

`p-ui`是一套使用原生`Web Components`规范开发的跨框架UI组件库,基于`lit-elment`库开发。 [github项目地址](https://github.com/suyouwanggang/p-ui)

18 lines 521 B
import { css, customElement, html, LitElement, property } from 'lit-element'; @customElement('p-router-slot') export default class RouterSlot extends LitElement { static get styles() { return css` :host { display:contents; } `; } @property({ type: String }) route: string; render(){ return html`<slot .name=${this.route} id='slot'></slot>`; } get slotElement(){ return this.shadowRoot.getElementById('slot'); } }