@uiw/doc
Version:
UIW documentation website.
2 lines • 7.21 kB
JavaScript
(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3152],{4934:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=4934,t.exports=e},5301:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var r=n(8573),s=n(6320),a=n(8563),i=n(7622),o=n(7937);const c={docinfo:"index_docinfo__3Vx8S",markdown:"index_markdown__hcQCp",markdownWrap:"index_markdownWrap__t60jR"};var p=n(4760);function k(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{path:e}=t,n=/^http/.test(e||"")?e:"https://github.com/uiwjs/uiw/blob/master/".concat(e);return(0,p.jsxs)("div",{className:c.docinfo,children:["\u72af\u4e86\u9519\u8bef\u8fd8\u662f\u60f3\u5bf9\u6587\u4ef6\u505a\u51fa\u8d21\u732e\uff1f",n&&(0,p.jsx)("a",{href:n,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)(o.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)(o.Divider,{type:"vertical"}),(0,p.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/uiwjs/uiw",children:"Github"}),(0,p.jsx)(o.Divider,{type:"vertical"}),(0,p.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/kktjs/kkt",children:"kkt"}),(0,p.jsx)(o.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)(o.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,u=s.ZP.Code,d=s.ZP.Toolbar,h=t=>{var e,n;let{node:i,components:o,data:c,...k}=t;const h=(0,r.useRef)(null),{headings:m,headingsList:b,...j}=k;(0,r.useEffect)((()=>{if(h.current){const t=h.current.parentElement;t&&t.parentElement&&t.parentElement.replaceChild(h.current,t)}}),[h]);const g=null===i||void 0===i||null===(e=i.position)||void 0===e?void 0:e.start.line,f=null===i||void 0===i||null===(n=i.data)||void 0===n?void 0:n.meta,x=(0,a.Mx)(f)||String(g),w=o["".concat(x)];if(x&&"function"===typeof w){const t=c[x].value||"",e=(0,a.aE)(f||"");return(0,p.jsxs)(s.ZP,{ref:h,children:[(0,p.jsx)(l,{style:{background:e.bg||"transparent"},children:(0,p.jsx)(w,{})}),(0,p.jsx)(d,{text:t,children:e.title||"Example"}),(0,p.jsx)(u,{children:(0,p.jsx)("pre",{...j})})]})}return(0,p.jsx)("code",{...j})};function m(t){return(0,p.jsxs)(r.Fragment,{children:[(0,p.jsx)(i.Z,{className:c.markdownWrap,source:t.source||"",disableCopy:!0,wrapperElement:{"data-color-mode":"light"},components:{code:e=>(0,p.jsx)(h,{...t,...e})}}),(0,p.jsx)(k,{path:t.path})]})}},707:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});const r={components:{},data:{},source:'\u5728 KKT \u4e2d\u4f7f\u7528\n===\n\n[`kkt@5x`](https://github.com/kktjs/kkt) \u65b0\u7684\u7248\u672c\uff0c\u662f\u57fa\u4e8e [create-react-app@3x](https://github.com/facebook/create-react-app) \u8f7b\u5ea6\u7ef4\u62a4\u57fa\u4e8e `TypeScript` \u91cd\u5199\u7684\u7248\u672c\uff0c\u6b64\u5de5\u5177\u53ef\u4ee5\u5728\u4e0d `eject` \u4e5f\u4e0d\u521b\u5efa\u989d\u5916 react-scripts \u7684\u60c5\u51b5\u4e0b\u4fee\u6539 [create-react-app@3x](https://github.com/facebook/create-react-app) \u5185\u7f6e\u7684 webpack \u914d\u7f6e\uff0c\u7136\u540e\u4f60\u5c06\u62e5\u6709 [create-react-app](https://github.com/facebook/create-react-app) \u7684\u4e00\u5207\u7279\u6027\uff0c\u4e14\u53ef\u4ee5\u6839\u636e\u4f60\u7684\u9700\u8981\u53bb\u914d\u7f6e `webpack` \u7684 `plugins`, `loaders` \u7b49\uff0c\u672a\u6765\u5c06\u5728 `kkt` \u4e2d\u96c6\u6210 [@kktjs/kkt-ssr](https://github.com/kktjs/kkt-ssr) \u670d\u52a1\u7aef\u6e32\u67d3\u3002\n\n\u8981\u5f00\u59cb\u4f7f\u7528 [uiw](https://github.com/uiwjs/uiw) \u548c [kkt](https://github.com/kktjs/kkt)\uff0c\u8bf7\u6309\u7167\u4e0b\u5217\u6b65\u9aa4\u64cd\u4f5c\uff1a\n\n1. \u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684 Node LTS\u3002 [\u8bf7\u53c2\u9605\u6b64\u5904\u83b7\u53d6\u8bf4\u660e](https://docs.npmjs.com/getting-started/installing-node)\n2. \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u65b0\u7684 `kkt` \u9879\u76ee\uff1a\n\n\u4f60\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u4e0b\u9762\u547d\u4ee4\u521d\u59cb\u5316\u4e00\u4e2a\u5de5\u7a0b\uff0c\u76f4\u63a5\u5f00\u59cb\u5f00\u53d1\n\n```bash\nnpx create-kkt my-app -e uiw\n# or npm\nnpm create kkt my-app -e uiw\n# or yarn\nyarn create kkt my-app -e uiw\n```\n\n\u6ce8\u610f [**npx**](https://github.com/npm/npm/releases/tag/v5.2.0) \u547d\u4ee4\u53ea\u5728 npm 5.2+ \u6216\u66f4\u9ad8\u7248\u672c\u4e2d\u652f\u6301\u3002\n\n\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528 [kkt](https://github.com/kktjs/kkt) \u5de5\u5177\u901a\u8fc7\u4e0b\u9762\u6b65\u9aa4\uff0c\u4e00\u6b65\u4e00\u6b65\u7684\u521b\u5efa\u4e00\u4e2a [kkt](https://github.com/kktjs/kkt) \u5de5\u7a0b\n\n```bash\nnpx create-kkt my-app\n```\n\n\u6b64\u65f6\uff0c\u60a8\u5c06\u80fd\u591f\u5728\u672c\u5730\u542f\u52a8\u9ed8\u8ba4 `kkt` \u5e94\u7528\u7a0b\u5e8f\uff1a\n\n```bash\ncd my-app\nnpm start\n```\n\n\u6709\u5173 `KKT` \u7684\u66f4\u591a\u4fe1\u606f\uff0c[\u8bf7\u53c2\u9605\u81ea\u8ff0\u6587\u4ef6](https://github.com/kktjs/kkt)\u3002\n\n1. \u5b89\u88c5 [uiw](https://github.com/uiwjs/uiw) \u5305\uff1a\n\n```bash\nnpm i uiw\n```\n\n4. \u6253\u5f00 `src/App.js` \u5e76\u5c06\u5185\u5bb9\u66ff\u6362\u4e3a\uff1a\n\n```jsx\nimport React, { Component } from \'react\';\nimport { Button } from \'uiw\';\n\nexport default class App extends Component {\n render() {\n return <Button size="small" type="primary">Click Me</Button>;\n }\n}\n```\n\n### \u4ece create-react-app \u8fc1\u79fb\u5230 kkt \u4e2d\n\n```diff\n{\n "name": "my-app",\n "version": "0.1.0",\n "private": true,\n+ "devDependencies": {\n+ "kkt": "~7.3.0"\n+ },\n "dependencies": {\n "@testing-library/jest-dom": "^5.11.4",\n "@testing-library/react": "^11.1.0",\n "@testing-library/user-event": "^12.1.10",\n "react": "^17.0.1",\n "react-dom": "^17.0.1",\n- "react-scripts": "4.0.1",\n "web-vitals": "^0.2.4",\n+ "uiw": "^4.7.12"\n },\n "scripts": {\n- "start": "react-scripts start",\n+ "start": "kkt start",\n- "build": "react-scripts build",\n+ "build": "kkt build",\n- "test": "react-scripts test",\n+ "test": "kkt test --env=jsdom",\n+ "test:coverage": "kkt test --env=jsdom --coverage"\n- "eject": "react-scripts eject"\n },\n "eslintConfig": {\n "extends": [\n "react-app",\n "react-app/jest"\n ]\n },\n "browserslist": {\n "production": [\n ">0.2%",\n "not dead",\n "not op_mini all"\n ],\n "development": [\n "last 1 chrome version",\n "last 1 firefox version",\n "last 1 safari version"\n ]\n }\n}\n```',headings:[],headingsList:[]};var s=n(5301),a=n(4760);function i(){return(0,a.jsx)(s.Z,{...r,path:"https://github.com/uiwjs/uiw/tree/master/website/src/routes/guide/kkt/README.md"})}}}]);
//# sourceMappingURL=3152.ee744b78.chunk.js.map