UNPKG

@uiw/doc

Version:

UIW documentation website.

2 lines 11.9 kB
(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7465],{4934:n=>{function e(n){var e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=4934,n.exports=e},5301:(n,e,t)=>{"use strict";t.d(e,{Z:()=>w});var i=t(8573),s=t(6320),o=t(8563),r=t(7622),a=t(7937);const u={docinfo:"index_docinfo__3Vx8S",markdown:"index_markdown__hcQCp",markdownWrap:"index_markdownWrap__t60jR"};var p=t(4760);function c(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{path:e}=n,t=/^http/.test(e||"")?e:"https://github.com/uiwjs/uiw/blob/master/".concat(e);return(0,p.jsxs)("div",{className:u.docinfo,children:["\u72af\u4e86\u9519\u8bef\u8fd8\u662f\u60f3\u5bf9\u6587\u4ef6\u505a\u51fa\u8d21\u732e\uff1f",t&&(0,p.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"\u5728Github\u4e0a\u7f16\u8f91\u672c\u9875\uff01"}),(0,p.jsx)("br",{}),(0,p.jsx)("a",{href:"https://github.com/uiwjs/uiw/issues",target:"_blank",rel:"noopener noreferrer",children:"\u53cd\u9988\u5efa\u8bae"}),(0,p.jsx)(a.Divider,{type:"vertical"}),(0,p.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/uiwjs/uiw/issues/new",children:"\u63d0\u4ea4bug"}),(0,p.jsx)(a.Divider,{type:"vertical"}),(0,p.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/uiwjs/uiw",children:"Github"}),(0,p.jsx)(a.Divider,{type:"vertical"}),(0,p.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/kktjs/kkt",children:"kkt"}),(0,p.jsx)(a.Divider,{type:"vertical"}),(0,p.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/kktjs/kkt-ssr",children:"@kkt/ssr"}),(0,p.jsx)(a.Divider,{type:"vertical"}),(0,p.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"http://uiw.gitee.io",children:"\u56fd\u5185\u955c\u50cf"})]})}const l=s.ZP.Preview,d=s.ZP.Code,h=s.ZP.Toolbar,m=n=>{var e,t;let{node:r,components:a,data:u,...c}=n;const m=(0,i.useRef)(null),{headings:w,headingsList:g,...b}=c;(0,i.useEffect)((()=>{if(m.current){const n=m.current.parentElement;n&&n.parentElement&&n.parentElement.replaceChild(m.current,n)}}),[m]);const k=null===r||void 0===r||null===(e=r.position)||void 0===e?void 0:e.start.line,j=null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.meta,v=(0,o.Mx)(j)||String(k),x=a["".concat(v)];if(v&&"function"===typeof x){const n=u[v].value||"",e=(0,o.aE)(j||"");return(0,p.jsxs)(s.ZP,{ref:m,children:[(0,p.jsx)(l,{style:{background:e.bg||"transparent"},children:(0,p.jsx)(x,{})}),(0,p.jsx)(h,{text:n,children:e.title||"Example"}),(0,p.jsx)(d,{children:(0,p.jsx)("pre",{...b})})]})}return(0,p.jsx)("code",{...b})};function w(n){return(0,p.jsxs)(i.Fragment,{children:[(0,p.jsx)(r.Z,{className:u.markdownWrap,source:n.source||"",disableCopy:!0,wrapperElement:{"data-color-mode":"light"},components:{code:e=>(0,p.jsx)(m,{...n,...e})}}),(0,p.jsx)(c,{path:n.path})]})}},8818:(n,e,t)=>{"use strict";t.r(e),t.d(e,{default:()=>r});const i={components:{},data:{},source:'# \u5feb\u901f\u4e0a\u624b\n\n[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)\n[![CI](https://github.com/uiwjs/uiw/actions/workflows/npm.yml/badge.svg)](https://github.com/uiwjs/uiw/actions/workflows/npm.yml)\n[![](https://img.shields.io/github/issues/uiwjs/uiw.svg)](https://github.com/uiwjs/uiw/issues)\n[![](https://img.shields.io/github/forks/uiwjs/uiw.svg)](https://github.com/uiwjs/uiw/network)\n[![](https://img.shields.io/github/stars/uiwjs/uiw.svg)](https://github.com/uiwjs/uiw/stargazers)\n[![](https://img.shields.io/github/release/uiwjs/uiw.svg)](https://github.com/uiwjs/uiw/releases)\n[![Packagist](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/uiwjs/uiw)\n[![Packagist](https://img.shields.io/npm/v/uiw.svg)](https://www.npmjs.com/package/uiw)\n[![jest](https://facebook.github.io/jest/img/jest-badge.svg)](https://github.com/facebook/jest)\n\n## \u5b89\u88c5\n\n\u4f7f\u7528 npm \u6216 yarn \u5b89\u88c5\n\n```bash\n$ npm i uiw\n# or Use yarn\n$ yarn add uiw\n```\n\n\u60a8\u53ef\u4ee5\u4f7f\u7528 [`kkt`](https://github.com/kktjs/kkt) \u672c\u5730\u5feb\u901f\u521b\u5efa\u4e00\u4e2a react + uiw \u9879\u76ee\u3002\n\n```bash\n$ npx create-kkt my-app -e uiw\n```\n\n### \u901a\u8fc7 CodeSandbox \u5feb\u901f\u4f53\u9a8c\n\n\u8fd9\u662f\u4e00\u4e2a\u6700\u7b80\u5355\u7684 uiw \u7ec4\u4ef6\u7684\u5728\u7ebf [CodeSandbox](https://codesandbox.io/s/uiw-reproduction-template-luqhe?file=/src/index.tsx) [\u6f14\u793a](https://codesandbox.io/embed/uiw-reproduction-template-luqhe)\u3002\n\n<iframe\n src="https://codesandbox.io/embed/uiw-reproduction-template-luqhe?autoresize=1&fontsize=14&hidenavigation=1&theme=dark"\n style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"\n title="antd reproduction template"\n allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"\n sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"\n/>\n\n\u8bbf\u95ee https://codesandbox.io/embed/uiw-reproduction-template-luqhe \u521b\u5efa\u4e00\u4e2a [CodeSandbox](https://codesandbox.io/s/uiw-reproduction-template-luqhe) \u7684\u5728\u7ebf\u793a\u4f8b\uff0c\u522b\u5fd8\u4e86\u4fdd\u5b58\u4ee5\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5b9e\u4f8b\u3002\n\n### \u6d4f\u89c8\u5668\u5f15\u5165\n\n\u5728\u6d4f\u89c8\u5668\u4e2d\u4f7f\u7528 `script` \u548c `link` \u6807\u7b7e\u76f4\u63a5\u5f15\u5165\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528\u5168\u5c40\u53d8\u91cf uiw\u3002\n\n\u6211\u4eec\u5728 [`npm`](https://www.npmjs.com/package/uiw) \u53d1\u5e03\u5305\u5185\u7684 `uiw/dist` \u76ee\u5f55\u4e0b\u63d0\u4f9b\u4e86 `uiw.js` `uiw.css` \u4ee5\u53ca `uiw.min.js` `uiw.min.css`\u3002\u4f60\u4e5f\u53ef\u4ee5\u901a\u8fc7 [UNPKG](https://unpkg.com/uiw/dist/) \u8fdb\u884c\u4e0b\u8f7d\u3002\n\n> \u26a0\ufe0f \u5f3a\u70c8\u4e0d\u63a8\u8350\u4f7f\u7528\u5df2\u6784\u5efa\u6587\u4ef6\uff0c\u8fd9\u6837\u65e0\u6cd5\u6309\u9700\u52a0\u8f7d\u3002 \n> \u26a0\ufe0f \u6d4f\u89c8\u5668\u5f15\u5165\u53ea\u5728 uiw v2.x \u4ee5\u4e0a\u7684\u7248\u672c\u652f\u6301\u3002\n\n### \u5b89\u88c5 [**v1.x**](https://unpkg.com/uiw@1.16.19/dist/index.html#/cn/quick-start) \u65e7\u7248\u672c\n\n> \u26a0\ufe0f `v1.x` \u4e0d\u53ef\u4ee5\u5347\u7ea7\u5230 `v2.x`\uff0c`v2`\u662f\u5bf9 v1 \u7684\u91cd\u6784\u548c\u7b80\u5316\n\n\u5b89\u88c5 [**`v1.x`**](https://unpkg.com/uiw/dist/index.html#/cn/quick-start) \u7248\u672c\n\n```bash\nnpm install uiw --save\n\n## \u901a\u8fc7 GitHub \u4ed3\u5e93\u5b89\u88c5\nnpm i -S uiwjs/uiw\n# \u6307\u5b9a\u7248\u672c\nnpm i -S uiwjs/uiw#v1.16.19\n# \u6216\u8005\nyarn add uiwjs/uiw\n```\n\n> **\u901a\u8fc7 GitHub \u4ed3\u5e93\u5b89\u88c5**\u7684 `win` \u7528\u6237\u8bf7\u5728 `Git Bash` \u4e0b\u6267\u884c\uff0c\u56e0\u4e3a\u9700\u8981\u7528\u5230 `git`\u3002\n\n### \u5347\u7ea7 v4\n\n1. \u4ece @4.x \u5f00\u59cb\u6bcf\u4e2a\u7ec4\u4ef6\u90fd\u53ef\u4ee5\u72ec\u7acb\u4f7f\u7528\u3002\n2. \u4ee3\u7801\u4f18\u5316\u90e8\u5206\u7ec4\u4ef6 Class \u7ec4\u4ef6\u8f6c\u6362\u6210 \u51fd\u6570\u7ec4\u4ef6\uff0c\u7f16\u8bd1\u4e4b\u540e\u4f53\u79ef\u5927\u5e45\u7f29\u5c0f\u3002\n3. \u8ddf\u8fdb React 16 \u5e9f\u5f03\u751f\u547d\u5468\u671f API\u3002\n4. \u91cd\u6784\u901a\u8fc7 useMemo \u8fdb\u884c\u6027\u80fd\u4f18\u5316\u3002\n\n### \u5347\u7ea7 v3\n\n1. \u57fa\u4e8e TypeScript \u91cd\u6784\u3002\n2. v2 \u57fa\u672c\u65e0\u538b\u529b\u5347\u7ea7\u5230 v3\u3002\n3. \u4e00\u4e9b\u7ec4\u4ef6\u4f18\u5316\u3002\n\n### \u5347\u7ea7 v2.x\n\n1. \u4f18\u5316\u5927\u90e8\u5206\u7ec4\u4ef6\uff0c\u8ba9\u7ec4\u4ef6\u53d8\u5f97\u66f4\u5c0f\u66f4\u7b80\u5355\u3002\n2. \u5220\u9664\u5927\u90e8\u5206\u7ec4\u4ef6\u5197\u4f59\u529f\u80fd\uff0c\u76f4\u63a5\u4f7f\u7528\u6837\u5f0f\u5c31\u53ef\u4ee5\u5c55\u73b0\u7ec4\u4ef6\u6548\u679c\u3002\n3. \u5220\u9664\u5197\u4f59\u7ec4\u4ef6\uff0c\u4f8b\u5982\u7ec4\u4ef6 `Capsule \u80f6\u56ca` \u4e0e `Tag \u6807\u7b7e` \u7ec4\u4ef6\u5408\u5e76\u3002\n4. \u62bd\u79bb\u7ec4\u4ef6\uff0c\u9700\u8981\u5355\u72ec\u5b89\u88c5\uff0c\u5982 `HeatMap \u65e5\u5386\u70ed\u56fe`\n5. \u652f\u6301\u670d\u52a1\u7aef\u6e32\u67d3\uff0c\u53ef\u4ee5\u901a\u8fc7 [kkt-ssr](https://github.com/kktjs/kkt-ssr) \u5de5\u5177\u5efa\u7acb\u5b9e\u4f8b\u3002\n\n### \u4f7f\u7528\n\n\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4e0d\u9700\u8981\u5f15\u5165 `CSS`\uff0c\u6253\u5305\u5de5\u5177\u9700\u8981\u652f\u6301\u52a0\u8f7d [ES Module](https://github.com/rollup/rollup/wiki/pkg.module)\uff0c\u5982\u679c\u4e0d\u652f\u6301\u9700\u8981\u624b\u5de5\u5f15\u5165 `css` \u6216\u8005 `less` \u6837\u5f0f\uff0c\u5982\u679c\u5bf9\u73af\u5883\u4f7f\u7528\u6709\u969c\u788d\uff0c\u53ef\u4ee5\u901a\u8fc7 [`kkt`](#/guide/kkt) \u5de5\u5177\u521d\u59cb\u5316\u4e00\u4e2a\u5de5\u7a0b\u3002\n\n```js\nimport React from "react";\nimport ReactDOM from "react-dom";\nimport { Button } from "uiw";\n\nReactDOM.render(\n <Button type="primary">Hello</Button>,\n document.getElementById("app")\n);\n```\n\n### \u7ec4\u4ef6\u51b2\u7a81\n\n\u91cd\u65b0\u53d6\u4e00\u4e2a\u540d\u5b57\n\n```js\nimport { Button as ButtonView } from "uiw";\n```\n\n### VSCode \u4e2d\u6587\u6863\u9884\u89c8\n\n\u7ec4\u4ef6\u6587\u6863\u53ef\u4ee5\u5728 [`VSCode`](https://marketplace.visualstudio.com/items?itemName=uiw.uiw) \u4e2d\u9884\u89c8\uff0c\u6253\u5f00\u4e0b\u9762\u94fe\u63a5\u8fdb\u884c\u5b89\u88c5 [`VSCode`](https://marketplace.visualstudio.com/items?itemName=uiw.uiw) \u63d2\u4ef6\u3002\n\n[![Open in VSCode](https://jaywcjlove.github.io/sb/open/open-in-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=uiw.uiw)\n\n### \u56fd\u5185\u955c\u50cf\u7ad9\u70b9\n\n\u56fd\u5185\u7528\u6237\uff0c\u901a\u8fc7[\u56fd\u5185\u955c\u50cf\u7ad9\u70b9](http://uiw.gitee.io/)\u8bbf\u95ee\u6587\u6863\u7f51\u7ad9\u6765\u63d0\u9ad8\u8bbf\u95ee\u901f\u5ea6\u3002\n\n### \u5f00\u53d1\n\n\u4f7f\u7528 [`Gitpod`](https://gitpod.io)\uff0c`GitHub` \u7684\u514d\u8d39\u5728\u7ebf\u5f00\u53d1\u73af\u5883\uff0c\u70b9\u51fb\u6253\u5f00\u4e0b\u9762\u94fe\u63a5\uff0c\u81ea\u52a8\u521d\u59cb\u5316\u9879\u76ee\uff0c\u5c06\u5f00\u53d1\u73af\u5883\u8dd1\u8d77\u6765\u3002\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/uiwjs/uiwjs.github.io)\n\n\u8981\u5f00\u53d1\uff0c\u8fd0\u884c\u81ea\u91cd\u65b0\u6784\u5efa\uff0c\u83b7\u53d6\u4ee3\u7801\uff1a\n\n```bash\n$ git clone https://github.com/uiwjs/uiwjs.github.io.git --recurse-submodules\n```\n\n\u8981\u5f00\u53d1\uff0c\u8fd0\u884c\u81ea\u91cd\u65b0\u6784\u5efa\uff0c\u8fd9\u91cc\u5c06\u8981\u8dd1\u4e24\u4e2a\u4efb\u52a1\uff1a\n\n```bash\n$ npm install # Install dependencies\n$ lerna bootstrap # Install all package dependencies\n$ lerna bootstrap --scope @uiw/* # Set scope installation dependencies\n$ npm run bootstrap\n$ npm run bootstrap:webiste\n$ npm run hoist\n$ npm run build\n```\n\n```bash\n# Run the app\n# Restart the app automatically every time code changes.\n# Useful during development.\n$ npm start\n```\n\n\u6253\u5f00\u6d4f\u89c8\u5668\u5e76\u8bbf\u95ee\uff1ahttp://localhost:19870\n\n## \u6587\u4ef6\u76ee\u5f55\u8bf4\u660e\n\n```bash\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 package.json\n\u251c\u2500\u2500 website\n\u2502\xa0\xa0 \u251c\u2500\u2500 uiw # Documentation website source code\n\u2514\u2500\u2500 packages\n\xa0\xa0\xa0 \u251c\u2500\u2500 uiw # Component library source code\n\xa0\xa0\xa0 \u251c\u2500\u2500 react-alert\n\xa0\xa0\xa0 \u251c\u2500\u2500 ...\n\xa0\xa0\xa0 \u2514\u2500\u2500 react-affix\n```\n\n## License\n\nLicensed under the MIT License.\n',headings:[],headingsList:[]};var s=t(5301),o=t(4760);function r(){return(0,o.jsx)(s.Z,{...i,path:"https://github.com/uiwjs/uiw/tree/master/website/src/routes/guide/quick-start/README.md"})}}}]); //# sourceMappingURL=7465.b19ae31f.chunk.js.map