{"id":22697992,"url":"https://github.com/gem-mine/docsify-react-live","last_synced_at":"2025-03-29T18:27:57.630Z","repository":{"id":53087828,"uuid":"222098903","full_name":"gem-mine/docsify-react-live","owner":"gem-mine","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-19T04:01:31.000Z","size":2983,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T19:27:57.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gem-mine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-16T12:52:48.000Z","updated_at":"2023-04-19T04:01:36.000Z","dependencies_parsed_at":"2022-09-12T12:21:30.116Z","dependency_job_id":null,"html_url":"https://github.com/gem-mine/docsify-react-live","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gem-mine%2Fdocsify-react-live","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gem-mine%2Fdocsify-react-live/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gem-mine%2Fdocsify-react-live/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gem-mine%2Fdocsify-react-live/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gem-mine","download_url":"https://codeload.github.com/gem-mine/docsify-react-live/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246225738,"owners_count":20743616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T05:16:20.233Z","updated_at":"2025-03-29T18:27:57.609Z","avatar_url":"https://github.com/gem-mine.png","language":"JavaScript","readme":"# docsify-react-live\n\n提供react组件的实时渲染和实时编辑\n\n## QuickStart\n\n```js\n\u003cscript src=\"../../dist/docsify-react-live.min.js\"\u003e\u003c/script\u003e\n\n\u003cscript\u003e\nwindow.$docsify = {\n  plugins: [\n    (function () {\n      return ReactLiveBox.create(scope, theme)\n    })()\n  ],\n}\n\u003c/script\u003e\n```\n- scope 传递入react组件的局部遍历，如果使用`UMD`包，此处无需传入\n- theme `prismjs`主题对象，更为方便的方法是用`prismjs`的css主题\n\n代码块中如下编写\n\n```\n/* react live */\n\u003cclassName\u003edemo-class\u003c/className\u003e\n\u003ctitle\u003e测试组件标题\u003c/title\u003e\n\u003cdesc\u003e\n测试组件标题\n- 测试\n\u003c/desc\u003e\n\u003cstyle\u003e\n  body {\n    height: 30px;\n  }\n\u003c/style\u003e\n\u003cscript\u003e\nconst { Button } = soui\n\nexport default class App extends React.Component {\n  render () {\n    return \u003cButton type=\"primary\" onClick={() =\u003e alert('好的')}\u003e确认\u003c/Button\u003e\n  }\n}\n\u003c/script\u003e\n\u003ccss\u003e\n.body {\n  height: 100px;\n}\n\u003c/css\u003e\n```\n\n- /* react live */ 表示是否要实时编辑\n- /* react pureRender */ 表示只渲染\n- className 生成的HTML中额外加入的className\n- style 额外注入全局的样式\n- script 代码内容\n- desc 描述，可用`MarkDown`语法\n- css 用于script下方额外显示的CSS内容\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgem-mine%2Fdocsify-react-live","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgem-mine%2Fdocsify-react-live","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgem-mine%2Fdocsify-react-live/lists"}