上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: src/components/Counter.tsx: import { useState } from "react"; interface CounterProps { count: number; } export const Counter = ({ count }: CounterProp 阅读全文
posted @ 2024-08-26 17:24 卓能文 阅读(5) 评论(0) 推荐(0) 编辑
摘要: import { StrictMode } from "react"; import { useForm } from "@tanstack/react-form"; import { zodValidator } from "@tanstack/zod-form-adapter"; import 阅读全文
posted @ 2024-08-22 20:09 卓能文 阅读(12) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <meta name="color-scheme" content="light dark"> </head> <body> <h1>hello world</h1> <span>hello world</span> <input type="text" placehol 阅读全文
posted @ 2024-08-22 00:26 卓能文 阅读(7) 评论(0) 推荐(0) 编辑
摘要: src/components/ace-markdown/ace-markdown.tsx: import { Component, Prop, State, h } from "@stencil/core"; import ace from "ace-builds/src-min-noconflic 阅读全文
posted @ 2024-08-22 00:03 卓能文 阅读(4) 评论(0) 推荐(0) 编辑
摘要: stencil是一个web components开发框架。 pnpm create stencil my.counter.tsx: import { Component, h, Prop } from "@stencil/core"; @Component({ tag: "my-counter", 阅读全文
posted @ 2024-08-21 18:06 卓能文 阅读(13) 评论(0) 推荐(0) 编辑
摘要: lwc是一个web components开发工具。 pnpm create lwr 选择SPA。项目生成后,一些运行时包并不在package.json中,需手动安装。 package.json: { "name": "lwrdemo", "version": "0.0.1", "license": 阅读全文
posted @ 2024-08-21 17:18 卓能文 阅读(20) 评论(0) 推荐(0) 编辑
摘要: src/my.counter.ts: import { type Component, define, html } from "hybrids"; interface MyCounter { count: number; } function increaseCount(host: MyCount 阅读全文
posted @ 2024-08-21 11:05 卓能文 阅读(6) 评论(0) 推荐(0) 编辑
摘要: src/index.html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> 阅读全文
posted @ 2024-08-21 09:58 卓能文 阅读(7) 评论(0) 推荐(0) 编辑
摘要: src/components/ace-markdown.ts: import { LitElement, css, html } from "lit"; import { customElement, property, query } from "lit/decorators.js"; // im 阅读全文
posted @ 2024-08-20 10:53 卓能文 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 在vite + lit中调试好的代码my.counter.ts: import { LitElement, css, html } from "lit"; import { customElement, property } from "lit/decorators.js"; import { st 阅读全文
posted @ 2024-08-20 07:40 卓能文 阅读(16) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 13 下一页