import { QuarkElement, property, customElement } from "quarkc" import style from "./index.less?inline" declare global { interface HTMLElementTagNameMap { "my-component": MyComponent; } } @customElement({ tag: "my-component", style }) class MyComponent extends QuarkElement { @property({ type: Number }) // 外部属性 count = 0 @property({ type: String }) text = '' add = () => { // 内部事件 this.count += 1 }; componentDidMount() { // 生命周期 console.log("dom loaded!") // ... } render() { return ( <>