Files
weiyu/docs/assets/js/17fadf48.37e6aba3.js
jack ning fffbecbf17 update
2025-01-03 07:52:00 +08:00

1 line
4.8 KiB
JavaScript

"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6418],{580:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"develop/visitor/platform/react","title":"React","description":"\u90e8\u5206\u529f\u80fd","source":"@site/i18n/en/docusaurus-plugin-content-docs/current/develop/visitor/platform/react.md","sourceDirName":"develop/visitor/platform","slug":"/develop/visitor/platform/react","permalink":"/bytedesk/docs/develop/visitor/platform/react","draft":false,"unlisted":false,"editUrl":"https://github.com/bytedesk/bytedesk/docs/develop/visitor/platform/react.md","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_label":"React","sidebar_position":2},"sidebar":"tutorialSidebar","previous":{"title":"Flutter","permalink":"/bytedesk/docs/develop/visitor/platform/flutter"},"next":{"title":"Uniapp","permalink":"/bytedesk/docs/develop/visitor/platform/uniapp"}}');var i=n(5723),s=n(6246);const o={sidebar_label:"React",sidebar_position:2},l="React",a={},d=[{value:"\u90e8\u5206\u529f\u80fd",id:"\u90e8\u5206\u529f\u80fd",level:2},{value:"SDK\u6e90\u7801\u53caDemo\u4e0b\u8f7d",id:"sdk\u6e90\u7801\u53cademo\u4e0b\u8f7d",level:2},{value:"\u5b89\u88c5",id:"\u5b89\u88c5",level:2},{value:"\u4f7f\u7528",id:"\u4f7f\u7528",level:2},{value:"\u83b7\u53d6\u5ba2\u670d\u94fe\u63a5",id:"\u83b7\u53d6\u5ba2\u670d\u94fe\u63a5",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"react",children:"React"})}),"\n",(0,i.jsx)(t.h2,{id:"\u90e8\u5206\u529f\u80fd",children:"\u90e8\u5206\u529f\u80fd"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"\u5fae\u8bed\u5b98\u65b9\u6280\u672f\u652f\u6301"}),"\n",(0,i.jsx)(t.li,{children:"100%\u5168\u90e8\u5f00\u6e90\uff0c\u652f\u6301\u81ea\u5b9a\u4e49\u754c\u9762"}),"\n",(0,i.jsx)(t.li,{children:"\u652f\u6301\u4eba\u5de5\u5ba2\u670d"}),"\n",(0,i.jsx)(t.li,{children:"\u652f\u6301\u673a\u5668\u4eba"}),"\n",(0,i.jsx)(t.li,{children:"\u652f\u6301\u6587\u5b57\u3001\u56fe\u7247\u3001\u8bed\u97f3\u3001\u8868\u60c5"}),"\n",(0,i.jsx)(t.li,{children:"\u652f\u6301\u6d88\u606f\u9884\u77e5\uff1a\u5bf9\u65b9\u6b63\u5728\u8f93\u5165"}),"\n",(0,i.jsx)(t.li,{children:"\u652f\u6301\u6d88\u606f\u72b6\u6001\uff1a\u9001\u8fbe\u3001\u5df2\u8bfb"}),"\n",(0,i.jsx)(t.li,{children:"\u652f\u6301\u6d88\u606f\u64a4\u56de"}),"\n",(0,i.jsx)(t.li,{children:"\u5bf9\u63a5\u7b2c\u4e09\u65b9\u8d26\u53f7\u7cfb\u7edf/\u591a\u7528\u6237\u5207\u6362"}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"sdk\u6e90\u7801\u53cademo\u4e0b\u8f7d",children:"SDK\u6e90\u7801\u53caDemo\u4e0b\u8f7d"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://gitee.com/270580156/bytedesk-react",children:"Gitee Demo"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://github.com/Bytedesk/bytedesk-react",children:"Github Demo"})}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"\u5b89\u88c5",children:"\u5b89\u88c5"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-bash",children:"npm install bytedesk-react --save\n# or\nyarn add bytedesk-react\n"})}),"\n",(0,i.jsx)(t.h2,{id:"\u4f7f\u7528",children:"\u4f7f\u7528"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-jsx",children:"import { ChatFloat } from \"bytedesk-react\";\n// \n<ChatFloat\n chatUrl=\"http://localhost:9006/chat?t=1&sid=default_wg_uid&\"\n //buttonPosition: 'right', // botton position\uff1aleft or right\n //buttonBackgroundColor: 'blue', // button background color\n //iframeWidth: 400,\n //iframeHeight: 600,\n //iframeMargins: { right: 20, bottom: 20, left: 20 }, // iframe margins\n //buttonMargins: { right: 20, bottom: 20, left: 20 }, // button margins\n //showButton: true, // show button or not\n //showIframe: true // show iframe or not\n/>\n// params:\nchatUrl: \u5ba2\u670d\u94fe\u63a5;\n"})}),"\n",(0,i.jsx)(t.h2,{id:"\u83b7\u53d6\u5ba2\u670d\u94fe\u63a5",children:"\u83b7\u53d6\u5ba2\u670d\u94fe\u63a5"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"https://www.weiyuai.cn/admin/cs/wgroup",children:"\u767b\u5f55\u7ba1\u7406\u540e\u53f0"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},6246:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>l});var r=n(2155);const i={},s=r.createContext(i);function o(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]);