摘要:
stencil是一个web components开发框架。 pnpm create stencil my.counter.tsx: import { Component, h, Prop } from "@stencil/core"; @Component({ tag: "my-counter", 阅读全文
摘要:
lwc是一个web components开发工具。 pnpm create lwr 选择SPA。项目生成后,一些运行时包并不在package.json中,需手动安装。 package.json: { "name": "lwrdemo", "version": "0.0.1", "license": 阅读全文
摘要:
src/my.counter.ts: import { type Component, define, html } from "hybrids"; interface MyCounter { count: number; } function increaseCount(host: MyCount 阅读全文
摘要:
src/index.html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> 阅读全文