@uiw/doc
Version:
UIW documentation website.
2 lines • 8.94 kB
JavaScript
(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[993],{4934:e=>{function n(e){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}n.keys=()=>[],n.resolve=n,n.id=4934,e.exports=n},5301:(e,n,t)=>{"use strict";t.d(n,{Z:()=>m});var o=t(8573),i=t(6320),s=t(8563),r=t(7622),c=t(7937);const a={docinfo:"index_docinfo__3Vx8S",markdown:"index_markdown__hcQCp",markdownWrap:"index_markdownWrap__t60jR"};var d=t(4760);function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{path:n}=e,t=/^http/.test(n||"")?n:"https://github.com/uiwjs/uiw/blob/master/".concat(n);return(0,d.jsxs)("div",{className:a.docinfo,children:["\u72af\u4e86\u9519\u8bef\u8fd8\u662f\u60f3\u5bf9\u6587\u4ef6\u505a\u51fa\u8d21\u732e\uff1f",t&&(0,d.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"\u5728Github\u4e0a\u7f16\u8f91\u672c\u9875\uff01"}),(0,d.jsx)("br",{}),(0,d.jsx)("a",{href:"https://github.com/uiwjs/uiw/issues",target:"_blank",rel:"noopener noreferrer",children:"\u53cd\u9988\u5efa\u8bae"}),(0,d.jsx)(c.Divider,{type:"vertical"}),(0,d.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/uiwjs/uiw/issues/new",children:"\u63d0\u4ea4bug"}),(0,d.jsx)(c.Divider,{type:"vertical"}),(0,d.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/uiwjs/uiw",children:"Github"}),(0,d.jsx)(c.Divider,{type:"vertical"}),(0,d.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/kktjs/kkt",children:"kkt"}),(0,d.jsx)(c.Divider,{type:"vertical"}),(0,d.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/kktjs/kkt-ssr",children:"@kkt/ssr"}),(0,d.jsx)(c.Divider,{type:"vertical"}),(0,d.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"http://uiw.gitee.io",children:"\u56fd\u5185\u955c\u50cf"})]})}const p=i.ZP.Preview,h=i.ZP.Code,l=i.ZP.Toolbar,w=e=>{var n,t;let{node:r,components:c,data:a,...u}=e;const w=(0,o.useRef)(null),{headings:m,headingsList:g,...b}=u;(0,o.useEffect)((()=>{if(w.current){const e=w.current.parentElement;e&&e.parentElement&&e.parentElement.replaceChild(w.current,e)}}),[w]);const k=null===r||void 0===r||null===(n=r.position)||void 0===n?void 0:n.start.line,x=null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.meta,j=(0,s.Mx)(x)||String(k),v=c["".concat(j)];if(j&&"function"===typeof v){const e=a[j].value||"",n=(0,s.aE)(x||"");return(0,d.jsxs)(i.ZP,{ref:w,children:[(0,d.jsx)(p,{style:{background:n.bg||"transparent"},children:(0,d.jsx)(v,{})}),(0,d.jsx)(l,{text:e,children:n.title||"Example"}),(0,d.jsx)(h,{children:(0,d.jsx)("pre",{...b})})]})}return(0,d.jsx)("code",{...b})};function m(e){return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)(r.Z,{className:a.markdownWrap,source:e.source||"",disableCopy:!0,wrapperElement:{"data-color-mode":"light"},components:{code:n=>(0,d.jsx)(w,{...e,...n})}}),(0,d.jsx)(u,{path:e.path})]})}},762:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>r});const o={components:{},data:{},source:'\u6587\u6863\u7f16\u8f91\u9884\u89c8\n===\n\n[](https://jaywcjlove.github.io/#/sponsor)\n[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/doc/file/README.md)\n[](https://www.npmjs.com/package/@uiw/doc)\n[](https://www.jsdelivr.com/package/npm/@uiw/doc)\n[](https://npmjs.com/@uiw/doc)\n\n\u6211\u4eec\u4f7f\u7528 [`npm`](https://www.npmjs.com/package/@uiw/doc) \u6765\u7ba1\u7406 `uiw` \u6587\u6863\u7ad9\u70b9\u7684\u7248\u672c\uff0c\u4f7f\u7528 [unpkg.com](https://unpkg.com/@uiw/doc/web/index.html) \u9884\u89c8\u3002\u6587\u6863\u7248\u672c\u7ba1\u7406\uff0c\u662f\u6839\u636e `unpkg` \u5de5\u5177\u652f\u6301\u9759\u6001\u670d\u52a1\u548c\u540c\u6b65 `npm` \u5305\u7684\u7279\u70b9\uff0c\u6765\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u7684\u3002\u6240\u4ee5\u6211\u4eec\u5728\u53d1\u5e03 [`uiw`](https://www.npmjs.com/package/uiw) \u5305\u7684\u540c\u65f6\u4f1a\u53d1\u5e03 [`@uiw/doc`](https://www.npmjs.com/package/@uiw/doc) \u5305\uff0c\u7248\u672c\u662f\u540c\u6b65\u7684\u3002\n\n- \u901a\u8fc7 unpkg \u9884\u89c8\u6587\u6863\u7f51\u7ad9\uff1ahttps://unpkg.com/@uiw/doc/web/index.html \n- \u901a\u8fc7 GitHack \u9884\u89c8\u6587\u6863\u7f51\u7ad9\uff1ahttps://raw.githack.com/uiwjs/uiw/gh-pages/index.html\n- \u5b98\u7f51\u5730\u5740\u9884\u89c8\uff1ahttps://uiwjs.github.io/ \n\n\u8fd9\u662f [`v2.0.0+`](https://unpkg.com/@uiw/doc@2.0.1/web/index.html) \u7248\u672c\u9884\u89c8\u65b9\u6cd5\n\n```bash\nhttps://unpkg.com/@uiw/doc@<\u5305\u7248\u672c>/web/index.html\n# \u4f8b\u5982\uff1a\nhttps://unpkg.com/@uiw/doc@2.0.0-beta.12/web/index.html\n```\n\n\u8fd9\u662f [v1.16.14](https://unpkg.com/uiw@1.16.14/dist/index.html) \u7248\u672c\u9884\u89c8\uff0c\u76ee\u524d `v1` \u53ea\u6709\u8fd9\u4e00\u4e2a\u7248\u672c\u53ef\u9884\u89c8\n\n```\nhttps://unpkg.com/uiw@1.16.14/dist/index.html\n```\n\n\u26a0\ufe0f \u6587\u6863\u7f51\u7ad9\u9759\u6001\u8d44\u6e90\u539f\u672c\u653e\u5728 uiw \u5305\u4e2d\uff0c\u7531\u4e8e\u6bcf\u6b21\u5b89\u88c5 uiw \u4f53\u79ef\u8f83\u5927\uff0c\u4e0b\u8f7d\u975e\u5e38\u6162\uff0c\u4ece [`uiw@2.0.0-beta.7+`](https://unpkg.com/@uiw/doc/web/index.html) \u7248\u672c\u5f00\u59cb\u62bd\u79bb\u5230\u5355\u72ec\u7684 [`@uiw/doc`](https://www.npmjs.com/package/@uiw/doc) \u5305\uff0c\u8fdb\u884c\u540c\u6b65\u53d1\u5e03\uff0c\u540e\u9762\u6240\u6709\u7684\u7248\u672c\u5747\u6709\u6587\u6863\u53ef\u9884\u89c8\u3002\n\n### \u6587\u6863\u79bb\u7ebf\u9884\u89c8\n\n\u6839\u636e\u4e0a\u8ff0\u7279\u70b9\uff0c\u53ef\u5c06\u6587\u6863\u7f51\u7ad9\u8d44\u6e90\u4e0b\u8f7d\u5230\u672c\u5730\uff0c\u901a\u8fc7\u7c7b\u4f3c [sgo](https://www.npmjs.com/package/sgo) \u7684\u5de5\u5177\uff0c\u542f\u9759\u6001\u670d\u52a1\u8fdb\u884c\u9884\u89c8\u3002\n\n```bash\n# \u5b89\u88c5\u9759\u6001\u670d\u52a1\u5de5\u5177\n$ mpm install -g sgo\n# \u5b89\u88c5\u4e0b\u8f7d\u6587\u6863\n$ npm install --save-dev @uiw/doc\n$ npm install --save-dev @uiw/doc@2.0.0-beta.12\n\n# \u8fdb\u5165\u76ee\u5f55\ncd node_modules/@uiw/doc/web\nsgo --fallback index.html # \u542f\u52a8\u670d\u52a1\n```\n\n### \u6587\u6863\u7f16\u5199\n\n\u5728 Markdown \u6587\u6863\u4e2d\u7f16\u5199\u4ee3 React \u7801\u5b9e\u4f8b\uff0c\u6587\u6863\u722c\u53d6\u4ee3\u7801\u5b9e\u4f8b\u8fdb\u884c\u9884\u89c8\u3002\n\n\n```markdown\n\x3c!--rehype:bgWhite=true&codeSandbox=true&codePen=true--\x3e\n```js\nconst Demo = () => (\n <div>\n <Button basic type="primary">\u4e3b\u8981\u6309\u94ae</Button>\n </div>\n);\n\\```\n```\n\n\u4f7f\u7528 `\x3c!--rehype:` \u548c `--\x3e` \u6807\u8bc6\u5b57\u7b26\u4e32\uff0c\u653e\u5728\u4ee3\u7801\u9ad8\u4eae\u533a\u57df\u7684\u524d\u9762\uff0c\u6587\u6863\u5c06\u81ea\u52a8\u5339\u914d\uff0c\u8fdb\u884c\u9884\u89c8\u8be5\u533a\u57df\u4ee3\u7801\uff0c\u63d0\u4f9b\u6e90\u7801\u7f16\u8f91\u5668\uff0c\u7f16\u8f91\u5e76\u5b9e\u65f6\u9884\u89c8\u3002\n\n\u88ab\u5305\u88f9\u7684\u6807\u8bc6\u5b57\u7b26\u4e32\u662f `HTML` \u6ce8\u91ca\uff0c\u5728 markdown \u9884\u89c8\u7684\u65f6\u5019\u5c06\u8d77\u5230\u4e0d\u663e\u793a\u7684\u4f5c\u7528\uff0c\u5728 GitHub \u4e2d\u9884\u89c8 `\u6807\u8bc6\u5b57\u7b26\u4e32` \u4f1a\u88ab\u3002\n\n\u6807\u8bc6\u7b26\u5728 `2.0.0+` \u7248\u672c\u6587\u6863\uff0c\u53ef\u4ee5\u4f20\u9012\u53c2\u6570\uff0c\u4f20\u9012\u65b9\u6cd5: \n\n```markdown\n\x3c!--rehype:bgWhite=true&noScroll=true&noCode=true&codeSandbox=true&codePen=true--\x3e\n```\n\n\u53c2\u6570\u7528\u82f1\u6587\u9017\u53f7\u9694\u5f00\n\n- `bgWhite` \u8bbe\u7f6e\u4ee3\u7801\u9884\u89c8\u80cc\u666f\u767d\u8272\uff0c\u5426\u5219\u4e3a\u683c\u5b50\u80cc\u666f\u3002\n- `noCode` \u4e0d\u663e\u793a\u4ee3\u7801\u7f16\u8f91\u5668\u3002 \n- `noPreview` \u4e0d\u663e\u793a\u4ee3\u7801\u9884\u89c8\u6548\u679c\u3002\n- `noScroll` \u9884\u89c8\u533a\u57df\u4e0d\u663e\u793a\u6eda\u52a8\u6761\u3002\n- `codePen` \u663e\u793a Codepen \u6309\u94ae\uff0c\u8981\u7279\u522b\u6ce8\u610f `\u5305\u5bfc\u5165\u7684\u95ee\u9898`\uff0c\u5b9e\u4f8b\u4e2d\u7684 `import` \u4e3b\u8981\u7528\u4e8e Codepen \u4f7f\u7528\u3002\n- `codeSandbox` \u663e\u793a codeSandbox \u6309\u94ae\uff0c\u8981\u7279\u522b\u6ce8\u610f `\u5305\u5bfc\u5165\u7684\u95ee\u9898`\uff0c\u5b9e\u4f8b\u4e2d\u7684 `import` \u4e3b\u8981\u7528\u4e8e Codepen \u4f7f\u7528\u3002\n\n\n## Contributors\n\n<a href="https://github.com/uiwjs/uiw/graphs/contributors">\n <img src="https://uiwjs.github.io/uiw/CONTRIBUTORS.svg" />\n</a>\n',headings:[],headingsList:[]};var i=t(5301),s=t(4760);function r(){return(0,s.jsx)(i.Z,{...o,path:"https://github.com/uiwjs/uiw/tree/master/website/src/routes/guide/docs/README.md"})}}}]);
//# sourceMappingURL=993.02c2ac08.chunk.js.map