1.4.1 • Published 8 months ago
bytedesk-web v1.4.1
bytedesk-web
Online customer service SDK, supporting multiple frameworks:

Installation Steps
Install Dependencies
npm install bytedesk-web
# 或
yarn add bytedesk-web导入组件
import { BytedeskReact } from 'bytedesk-web/react';
import type { BytedeskConfig } from 'bytedesk-web/react';配置参数
const config: BytedeskConfig = {
placement: 'bottom-right',
marginBottom: 20,
marginSide: 20,
bubbleConfig: {
show: true,
icon: '👋',
title: 'Need help?',
subtitle: 'Click to chat'
},
buttonConfig: {
show: true,
width: 60,
height: 60,
// icon: '👋',
// text: '需要帮助吗?',
},
chatConfig: {
org: 'df_org_uid', // 替换为您的组织ID
t: "2",
sid: 'df_rt_uid' // 替换为您的SID
}
};使用组件
const App = () => {
const handleInit = () => {
console.log('BytedeskReact initialized');
};
return (
<div>
<BytedeskReact {...config} onInit={handleInit} />
<button onClick={() => (window as any).bytedesk?.showChat()}>
打开聊天
</button>
</div>
);
};可用方法
# 显示/隐藏按钮
(window as any).bytedesk?.showButton();
(window as any).bytedesk?.hideButton();
# 显示/隐藏气泡消息
(window as any).bytedesk?.showBubble();
(window as any).bytedesk?.hideBubble();
# 显示/隐藏聊天窗口
(window as any).bytedesk?.showChat();
(window as any).bytedesk?.hideChat();
# 显示/隐藏邀请对话框
(window as any).bytedesk?.showInviteDialog();
(window as any).bytedesk?.hideInviteDialog();运行示例
yarn install
yarn demo:react # Run React demo
yarn demo:vue # Run Vue demo
yarn demo:svelte # Run Svelte demo
yarn demo:vanilla # Run Vanilla JS demo
yarn demo:angular # Run Angular demo
yarn demo:nextjs # Run Next.js demo
# JavaScript demo requires build first
yarn build
yarn demo:javascript开源Demo + SDK
| Project | Description | Forks | Stars |
|---|---|---|---|
| iOS | iOS | ||
| Android | Android | ||
| Flutter | Flutter | ||
| UniApp | Uniapp | ||
| Web | Vue/React/Angular/Next.js/JQuery/... | ||
| Wordpress | Wordpress | ||
| Woocommerce | woocommerce | ||
| Magento | Magento | ||
| Prestashop | Prestashop | ||
| Shopify | Shopify | ||
| Opencart | Opencart | ||
| Laravel | Laravel | ||
| Django | Django |
1.4.1
8 months ago
1.3.9
8 months ago
1.3.8
8 months ago
1.3.7
9 months ago
1.2.8
10 months ago
1.3.6
9 months ago
1.2.7
10 months ago
1.3.5
9 months ago
1.2.6
10 months ago
1.3.4
9 months ago
1.2.5
10 months ago
1.2.4
10 months ago
1.3.2
10 months ago
1.2.3
10 months ago
1.3.1
10 months ago
1.2.2
10 months ago
1.2.1
10 months ago
1.2.9
10 months ago
1.1.9
10 months ago
1.1.8
10 months ago
1.1.7
10 months ago
1.1.6
10 months ago
1.1.5
10 months ago
1.1.4
10 months ago
1.1.3
10 months ago
1.1.11
10 months ago
1.1.10
10 months ago
1.1.1
10 months ago
1.0.19
10 months ago
1.0.2
10 months ago
1.1.0
10 months ago
1.0.18
10 months ago
1.0.17
10 months ago
1.0.16
10 months ago
1.0.9
10 months ago
1.0.7
10 months ago
1.0.5
10 months ago
1.0.4
10 months ago
1.1.2
10 months ago
1.0.3
10 months ago
1.0.11
10 months ago
1.0.10
10 months ago
1.0.15
10 months ago
1.0.14
10 months ago
1.0.24
10 months ago
1.0.13
10 months ago
1.0.12
10 months ago
1.0.1
10 months ago
1.0.0
10 months ago