@learning-ui/terminal
v1.1.3-bate
Published
React component that renders a terminal
Downloads
29
Readme
没有找到符合要求的 terminal 插件所以只能自己写一个
支持类型
- log 日志类型 自动匹配 日期(YYYY-MM-DD) 时间(HH:FF:MM) 字符串("xxx")('xxx')
- 未增加
使用方法
- 下面是示例
import Editor from "@learning-ui/terminal"
import { Log } from "@learning-ui/terminal"
// content?: string[] // | JSX.Element[] | React.ReactNode[];
// className?:CSSProperties;
// type?: "log" | "editor" | "terminal"
<Editor.Log
contents={{
content: [], // 所有的数据组合
className: "", // 每一组的 className
type: "log", // 指定 editor 为 log
}}
/>
// 或者
<Log
content={[]} // 所有的数据组合
className={""} // 每一组的 className
/>command 的使用示例 以及定义的 ts 类型
