| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
本组件可用于代码差异的查看, 由于是 react 编写的,仅支持 react 版本
先支持两种使用方式:
npm i react-code-differ
import { CodeDiff } from "react-code-differ";
import diffText from './diffText'
export const MyComponent = (args) => {
return (
<CodeDiff type={"local"} path={diffText} />
);
};import { CodeDiff } from "react-code-differ";
export const MyComponent = (args) => {
const path = "https://api.github.com/repos/rtfpessoa/diff2html/pulls/106"
return (
<CodeDiff type={"github"} path={path} />
);
};| Back | FazBrowse Home | New Git URL |