mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 04:59:02 +08:00
18 lines
324 B
JavaScript
18 lines
324 B
JavaScript
import { LitElement, html } from "lit";
|
|
import { customElement, state } from "lit/decorators.js";
|
|
|
|
@customElement("x-name")
|
|
export class XName extends LitElement {
|
|
@state()
|
|
name = "张三";
|
|
|
|
constructor() {
|
|
super();
|
|
this.name = "李四";
|
|
}
|
|
|
|
render() {
|
|
return html`<h1>你好 ${this.name}!</h1>`;
|
|
}
|
|
}
|