一个开源的imean对话ui示例项目
-
Clone the repository
git clone https://git.starblazer.cn/dhc/example-chat.git
-
Install dependencies
yarn install
-
Start the development server
yarn build && yarn preview
-
Open http://localhost:4173/exampleChat/index.js with your browser to see the result.
-
Installation
yarn add @imean/example-chat
-
Usage
import iMeanExampleChat from '@imean/example-chat' try { iMeanExampleChat.init({ // imean服务地址 baseUrl: "xxx", // imean项目ID projectId: "xxx", }); } catch (error) {}
-
Usage
<!DOCTYPE html> <html lang="zh-CN"> <head> <!-- 请勿设置异步加载,不然有可能导致js文件还未下载完成时调用init方法 --> <script src="https://xxx/exampleChat/index.js"></script> </head> <script> try { window.iMeanExampleChat.init({ // imean服务地址 baseUrl: "xxx", // imean项目ID projectId: "xxx", }); } catch (error) {} </script> <body></body> </html>