随笔分类 -  astro

摘要:src/components/AceMarkdown.tsx: import { useRef, useEffect, useState } from "react"; import { $paper, type Paper } from "../store/paper"; import ace f 阅读全文
posted @ 2024-08-27 07:09 卓能文 阅读(11) 评论(0) 推荐(0) 编辑
摘要:src/components/Counter.tsx: import { useState } from "react"; interface CounterProps { count: number; } export const Counter = ({ count }: CounterProp 阅读全文
posted @ 2024-08-26 17:24 卓能文 阅读(9) 评论(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 卓能文 阅读(9) 评论(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 卓能文 阅读(22) 评论(0) 推荐(0) 编辑
摘要:MyCounter.astro: <script> const template = ` <style> * { font-size: 200%; } span { width: 4rem; display: inline-block; text-align: center; } button { 阅读全文
posted @ 2024-08-07 22:13 卓能文 阅读(6) 评论(0) 推荐(0) 编辑
摘要:先创建AstroHeart.astro: <astro-heart> <button aria-label="Heart">💜</button> × <span>0</span> </astro-heart> <script> // Define the behaviour for our new 阅读全文
posted @ 2024-08-07 20:33 卓能文 阅读(6) 评论(0) 推荐(0) 编辑
摘要:import Editor from "@monaco-editor/react"; import { useState } from "react"; import Markdown from "react-markdown"; import rehypeHighlight from "rehyp 阅读全文
posted @ 2024-08-06 16:03 卓能文 阅读(16) 评论(0) 推荐(0) 编辑
摘要:cherry-markdown是一个TS编写的markdown编辑器。 import "cherry-markdown/dist/cherry-markdown.css"; <cherry-mark> <textarea></textarea> </cherry-mark> <script> imp 阅读全文
posted @ 2024-08-04 18:36 卓能文 阅读(52) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示