Giter VIP home page Giter VIP logo

chatui's Introduction

The UI design language and React library for Conversational UI

Website:https://chatui.io

LICENSE NPM version NPM downloads Gzip Size Jsdelivr Hits

English | 简体中文

Features

  • 😎 Best Practices: The best practice for chat interaction based on our experience of Alime Chatbot
  • 🛡 TypeScript: Written in TypeScript with predictable static types
  • 📱 Responsive: Responsive design to adapt automatically to whatever device
  • Accessibility: Accessibility support and get the certification from Accessibility Research Association
  • 🎨 Theming: Powerful theme customization in every detail
  • 🌍 International: Internationalization support for dozens of languages

Environment Support

Edge
Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS Safari
Android WebView
Android WebView
16+ 31+ 49+ 9.1+ 9.3+ 6+

Install

npm install @chatui/core --save
yarn add @chatui/core

Usage

import Chat, { Bubble, useMessages } from '@chatui/core';
import '@chatui/core/dist/index.css';

const App = () => {
  const { messages, appendMsg, setTyping } = useMessages([]);

  function handleSend(type, val) {
    if (type === 'text' && val.trim()) {
      appendMsg({
        type: 'text',
        content: { text: val },
        position: 'right',
      });

      setTyping(true);

      setTimeout(() => {
        appendMsg({
          type: 'text',
          content: { text: 'Bala bala' },
        });
      }, 1000);
    }
  }

  function renderMessageContent(msg) {
    const { content } = msg;
    return <Bubble content={content.text} />;
  }

  return (
    <Chat
      navbar={{ title: 'Assistant' }}
      messages={messages}
      renderMessageContent={renderMessageContent}
      onSend={handleSend}
    />
  );
};

DEMO

Development

cd demo
npm i
npm run dev

Theme

Visit Customize Theme for detail

Internationalization

Visit i18n for detail

Discussion

License

MIT

chatui's People

Contributors

akai avatar alibaba-oss avatar alifgt avatar fay-hu avatar jessiehan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatui's Issues

侧边栏配置异常

侧边栏文档界面配置文档中,部分实例无法复现。

具体的config代码如下:

var bot = new ChatSDK({

  config: {


// 省略部分正常代码

    sidebar: [

      // --------------------例1:成功渲染--------------------
      {
        title: '公告',
        code: 'richtext',
        data: {
          text:
            '<p>这里是富文本内容,支持<a href="https://chatui.io/sdk/getting-started">链接</a>,可展示图片<img src="https://gw.alicdn.com/tfs/TB17TaySSzqK1RjSZFHXXb3CpXa-80-80.svg" /></p>',
        },
      },


      // --------------------例2:使用内置的slot卡片渲染失败--------------------
      {
        title: '侧边栏测试1', 
        code: 'slot',
        data: {
          hideShortcuts: true,
          list: [
            {
              title: '社保卡'
            },
            {
              title: '参保证明打印'
            }
          ]
        }
      },


      // --------------------例3:使用sidebar-suggestion渲染失败--------------------
      // [文档 - 领域卡片模板](https://chatui.io/card)未找到该卡片
      {
        title: '侧边栏测试2',
        code: 'sidebar-suggestion', // 
        data: [
          {
            label: '疫情问题',
            list: [
              '身边有刚从湖北来的人,如何报备',
              '接触过武汉人,如何处理?',

            ],
          },
          {
            label: '法人问题',
            list: [
              '企业设立',

            ],
          },
        ],
      },
    ],

  },
}
// 省略部分正常代码

brand 怎么自定义组件

**Version information (版本信息)**sdk 0.2.2

  • ChatUI or ChatUI Pro? ChatUI Pro
  • ChatUI Version: 1.2.1
  • React Version: 17.0.1
  • OS Version:
  • Browser Version: google laster

Describe the bug (描述问题)
无法实现 brand 怎么自定义组件

Steps To Reproduce (重现步骤)
config: {
navbar: {
logo: 'https://gw.alicdn.com/tfs/TB1Wbldh7L0gK0jSZFxXXXWHVXa-168-33.svg',
title: '来虎服务支持',
code: 'brand-title', // 自定义组件不生效
},
....
}

Link to minimal reproduction (最小化重现链接)
https://img.alicdn.com/imgextra/i2/O1CN01sA6Q5220fG0Us4WDj_!!6000000006876-2-tps-1584-1146.png
Expected behavior (期望的结果是什么)
navbar 如何自定义组件配置,实现如上图链接效果

Popover 只展示了一次

Version information

  • ChatUI
  • ChatUI Version: 0.3.2
  • React Version: laetst
  • OS Version: Big Sur
  • Browser Version: Chrome 90

Describe the bug

配置了Action和 wideBreakpoint 之后所有 action 改成了 Popover 的形式展示,但是点击第一次可以展示,之后就再也不能展示了。通过debug发现 useClickOutside 会在 didmout 之后也触发了。

实际上是有添加到body的,但是又立马被删除了。

Steps To Reproduce
1.
2.

Link to minimal reproduction

Expected behavior

关于setState不能及时获取最新值

这里的currentSlide !== this.state.currentSlide永远不会成立
const { currentSlide } = this.state;

this.setState({
  currentSlide: Math.min(Math.max(index, 0), this.len - 1),
});

// eslint-disable-next-line react/destructuring-assignment
if (currentSlide !== this.state.currentSlide) {
  this.slideToCurrent();
  onChange.call(this);
  if (callback) {
    callback.call(this);
  }
}

chat容器组件在iOS 12.4.9 九宫格拼音输入法下:出现调起输入法后点击发送按钮无反应问题

用到的组件:chat对话容器

系统:iOS 12.4.9
浏览器:WKWebview内打开chat对话容器的Demo

问题:使用拼音九宫格输入法输入内容,会出现点击发送按钮或空白区域,键盘不收回,发送按钮未响应

尝试过程:在拼音九宫格输入法情况下,使用Safari打开Demo正常;在WKWebview内使用Input组件正常,但是chat容器的输入框会有问题;

Build failed: @chatui/core/dist/index.css ParserError: Syntax Error at line: 1, column 22

Version information (版本信息)

  • ChatUI or ChatUI Pro? ChatUI
  • ChatUI Version: 1.0.0
  • React Version: 17.0.2
  • OS Version: Ubuntu 20.04
  • Browser Version:

Describe the bug (描述问题)
Trying to build a reactjs project and it failed with this error:

$ npm run build

> [email protected] build /media/winstonfan/Workspace/MyDoc/Interviews/DigitalVictoria/code/frontend/covid-chat
> react-scripts build

Creating an optimized production build...
Failed to compile.

./node_modules/@chatui/core/dist/index.css
ParserError: Syntax Error at line: 1, column 22


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/winstonfan/.npm/_logs/2021-06-29T13_57_45_400Z-debug.log

Steps To Reproduce (重现步骤)

  1. create a reactjs project with create-react-app
  2. add @ChatUi
  3. npm run build

Link to minimal reproduction (最小化重现链接)

Here is the content of 2021-06-29T13_57_45_400Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/home/winstonfan/.nvm/versions/node/v14.16.0/bin/node',
1 verbose cli   '/home/winstonfan/.nvm/versions/node/v14.16.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /home/winstonfan/.nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/media/winstonfan/Workspace/MyDoc/code/frontend/covid-chat/node_modules/.bin:/home/winstonfan/.deta/bin:/home/winstonfan/.nvm/versions/node/v14.16.0/bin:/home/winstonfan/anaconda3/bin:/home/winstonfan/anaconda3/condabin:/home/winstonfan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda-11.1/bin
9 verbose lifecycle [email protected]~build: CWD: /media/winstonfan/Workspace/MyDoc/code/frontend/covid-chat
10 silly lifecycle [email protected]~build: Args: [ '-c', 'react-scripts build' ]
11 silly lifecycle [email protected]~build: Returned: code: 1  signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: `react-scripts build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/home/winstonfan/.nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (/home/winstonfan/.nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1048:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid [email protected]
15 verbose cwd /media/winstonfan/Workspace/MyDoc/code/frontend/covid-chat
16 verbose Linux 5.8.0-59-generic
17 verbose argv "/home/winstonfan/.nvm/versions/node/v14.16.0/bin/node" "/home/winstonfan/.nvm/versions/node/v14.16.0/bin/npm" "run" "build"
18 verbose node v14.16.0
19 verbose npm  v6.14.11
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: `react-scripts build`
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Expected behavior (期望的结果是什么)
Generated a built project

Msg Scroll Direction

What problem does this feature solve? (这个功能解决了什么问题)
Initially, messages start at the top and scroll to the bottom, and I need to change this direction

Describe the solution you'd like (描述您想要的解决方案)
I would like the option to change the direction messages come from
Before:
1
After:
image

What does the proposed API look like? (你期望的 API 是怎样的)
Maybe an option in the chat object

syntax error

What problem does this feature solve? (这个功能解决了什么问题)
In 0.3.3, the text on the primary type button is white. but on the latest beta, it's black and there is no where you can change it unless you set gray-1=white or something

Describe the solution you'd like (描述您想要的解决方案)
some option to change the text colour on the buttons

Chat UI Pro Input框样式问题, 初始rows=3 而不是1

Version information (版本信息)

  • ChatUI or ChatUI Pro?
  • ChatUI Version:
  • React Version:
  • OS Version:
  • Browser Version:

Describe the bug (描述问题)

Steps To Reproduce (重现步骤)
1.
2.

Link to minimal reproduction (最小化重现链接)

Expected behavior (期望的结果是什么)

Toast Duration

What problem does this feature solve? (这个功能解决了什么问题)
Toast notifications go too fast

Describe the solution you'd like (描述您想要的解决方案)
Some argument to control toast durations (or even an option to stay permanently)

What does the proposed API look like? (你期望的 API 是怎样的)
toast.fail("Error: Help",30000);

https://chatui.io/components/toast

How append new language to localeProvider

I trying to append japanese language.I do confirmed "@chatui/core/lib/components/LocalePrivider/locales/zh_CN.js" and not found 'please input...' phrase.

May be that not so simple just append ja_JP.js I guess.

How do append new language?

Screenshot from 2021-02-19 00-22-44

English docs

What problem does this feature solve? (这个功能解决了什么问题) Make the component library more accessible to English-speaking people.

Describe the solution you'd like (描述您想要的解决方案) Provide an English version of https://chatui.io/. Currently, I can sort of work around this using Google Translate but the translations are often far from perfect.

What does the proposed API look like? (你期望的 API 是怎样的) N/A

ticket card is not work

https://g.alicdn.com/alime-components/ticket/0.0.2/index.js
{
type: 'card',
content: {
code: "ticket",
data: {
"transportInfo": {
"to": "北京",
"icon": "train",
"searchLinkName": "更多车次",
"weekday": "周六",
"from": "杭州",
"date": "2017-12-16",
"searchLink": "https://h5.m.taobao.com/trip/train/searchlist/index.html?depCity=杭州&arrCity=北京&depDate=2017-12-16&onlyGD=false&ttid=taobao.xiaomi.huoqi.104666"
},
"transportList": [{
"bestPrice": 538.5,
"spendTime": "5小时55分",
"bestDiscount": "",
"departName": "杭州东",
"orderLink": "https://h5.m.taobao.com/trip/train/train-detail/index.html?depStation=杭州东&arrStation=北京南&depDate=2017-12-16&trainNo=G34&isStudent=0&ttid=taobao.xiaomi.huoqi.104666&spm=181.7406757.1998410225.500&_preProjVer=0.5.55&_projVer=0.5.55",
"ontimeRate": "",
"transportName": "G34",
"otherFlight": "",
"leftNum": "商务座 20张 一等座 有票 二等座 有票",
"arriveName": "北京南",
"depTime": "07:10",
"arrTime": "13:05"
}, {
"bestPrice": 538.5,
"spendTime": "5小时14分",
"bestDiscount": "",
"departName": "杭州东",
"orderLink": "https://h5.m.taobao.com/trip/train/train-detail/index.html?depStation=杭州东&arrStation=北京南&depDate=2017-12-16&trainNo=G20&isStudent=0&ttid=taobao.xiaomi.huoqi.104666&spm=181.7406757.1998410225.500&_preProjVer=0.5.55&_projVer=0.5.55",
"ontimeRate": "",
"transportName": "G20",
"otherFlight": "",
"leftNum": "商务座 1张 一等座 有票 二等座 有票",
"arriveName": "北京南",
"depTime": "08:24",
"arrTime": "13:38"
}]
}
}
}

Next JS support

What problem does this feature solve? (这个功能解决了什么问题)
When using with next js project you get window not defined!
node_modules/@chatui/core/lib/utils/canUse.js (30:30)
Screen Shot 2021-07-22 at 12 10 00 PM

Describe the solution you'd like (描述您想要的解决方案)
it should work with next js

What does the proposed API look like? (你期望的 API 是怎样的)

Less variables without less

What problem does this feature solve? (这个功能解决了什么问题)
Using less requires major changes to many projects

Describe the solution you'd like (描述您想要的解决方案)
Ability to change the variables in var.less (at least btn-primary-color) without using less

What does the proposed API look like? (你期望的 API 是怎样的)
maybe an option here? https://market.m.taobao.com/app/chatui/theme-builder/index.html

需要能够自定义发送按钮

What problem does this feature solve? (这个功能解决了什么问题)
需要自定义发送按钮的样式和内容(比如现在是纯文本,而之前可以是Icon)

Describe the solution you'd like (描述您想要的解决方案)
加一个prop,可以让我自定义发送按钮的组件

What does the proposed API look like? (你期望的 API 是怎样的)
加个prop,只要能自定义组件并绑上默认点击事件啥的就行:

bug:移动设备ui问题

Version information (版本信息)

  • ChatUI or ChatUI Pro? chatUI
  • ChatUI Version:1.2.1
  • React Version:17.0.2
  • OS Version:mac11.6
  • Browser Version:chrome版本 92.0.4515.131(正式版本) (x86_64)

Describe the bug (描述问题)
当使用浏览器中的调试模式移动设备或直接在手机上运行时,当输入框取到focus后聊天消息显示框会自动下移到输入框附近。
image

Steps To Reproduce (重现步骤)

  1. 用webstore新建react项目
  2. 复制chatui示例代码到app.js:
import React from 'react';
import '@chatui/core/es/styles/index.less';
// 引入组件
import Chat, { Bubble, useMessages } from '@chatui/core';
// 引入样式
import '@chatui/core/dist/index.css';

const initialMessages = [
 {
   type: 'text',
   content: { text: '主人好,我是智能助理,你的贴心小助手~' },
   user: { avatar: '//gw.alicdn.com/tfs/TB1DYHLwMHqK1RjSZFEXXcGMXXa-56-62.svg' },
 },
 {
   type: 'image',
   content: {
     picUrl: '//img.alicdn.com/tfs/TB1p_nirYr1gK0jSZR0XXbP8XXa-300-300.png',
   },
 },
];

const toolbar = [
 {
   type: 'image',
   icon: 'image',
   title: '相册',
 },
 {
   type: 'speech',
   icon: 'mic',
   title: '语音输入'
 }
];

// 默认快捷短语,可选
const defaultQuickReplies = [
 {
   icon: 'message',
   name: '联系人工服务',
   isNew: true,
   isHighlight: true,
 },
 {
   name: '短语1',
   isNew: true,
 },
 {
   name: '短语2',
   isHighlight: true,
 },
 {
   name: '短语3',
 },
];

// eslint-disable-next-line import/no-anonymous-default-export
export default function() {
 // 消息列表
 const { messages, appendMsg, setTyping } = useMessages(initialMessages);

 // 发送回调
 function handleSend(type, val) {
   if (type === 'text' && val.trim()) {
     // TODO: 发送请求
     appendMsg({
       type: 'text',
       content: { text: val },
       position: 'right',
     });

     setTyping(true);

     // 模拟回复消息
     setTimeout(() => {
       appendMsg({
         type: 'text',
         content: { text: '亲,您遇到什么问题啦?请简要描述您的问题~' },
       });
     }, 1000);
   }
 }

 // 快捷短语回调,可根据 item 数据做出不同的操作,这里以发送文本消息为例
 function handleQuickReplyClick(item) {
   handleSend('text', item.name);
 }

 function ToolbarClick (item, ctx) {
   if (item.type === 'speech') {
     // // 这里改成 App 提供的 bridge 方法
     // nativeInvoke('speech', (text) => {
     //   if (text) {
     //     // 通过 setText 更新输入框内容
     //     // bot.appRef.current.setText(text);
     //   }
     // });
   }
 }

 function renderMessageContent(msg) {
   const { type, content } = msg;

   // 根据消息类型来渲染
   switch (type) {
     case 'text':
       return <Bubble content={content.text} />;
     case 'image':
       return (
           <Bubble type="image">
             <img src={content.picUrl} alt="" />
           </Bubble>
       );
     default:
       return null;
   }
 }

 return (
     <Chat
         navbar={{ title: '智能助理' }}
         messages={messages}
         renderMessageContent={renderMessageContent}
         quickReplies={defaultQuickReplies}
         onQuickReplyClick={handleQuickReplyClick}
         onSend={handleSend}
         placeholder={'请输入...'}
         toolbar={toolbar}
         onToolbarClick={ToolbarClick}
     />
 );
}

3.index.html文件代码:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="Web site created using create-react-app"
    />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
    <!--
      manifest.json provides metadata used when your web app is installed on a
      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
    -->
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <!--
      Notice the use of %PUBLIC_URL% in the tags above.
      It will be replaced with the URL of the `public` folder during the build.
      Only files inside the `public` folder can be referenced from the HTML.

      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
      work correctly both with client-side routing and a non-root public URL.
      Learn how to configure a non-root public URL by running `npm run build`.
    -->
    <script src="./icons.js"></script>
    <title>React App</title>
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
  </body>
</html>

4.npm start
5.在chrome浏览器开启开发者模式,设置为移动设备状态。
6.点击输入框
7.bug出现,消息内容直接显示到输入框附近。

Link to minimal reproduction (最小化重现链接)
以下是工程源代码
https://github.com/jacoblai/charuitest

Expected behavior (期望的结果是什么)
希望能正常显示消息。

sidebar 配置不显示

ChatUI Pro

  • ChatUI Version: 0.2.2
  • React Version: 17
    os: window10
  • Browser Version: chrome 最新

Describe the bug (描述问题)
sidebar 配置不显示 使用 0.2.4 页面展示不出来 使用 0.2.2 不显示 sidebar

Steps To Reproduce (重现步骤)

  1. config 增加 sidebar 配置

Link to minimal reproduction (最小化重现链接)
https://codesandbox.io/s/chatui-pro-x-react-forked-mchie?file=/src/App.js

Expected behavior (期望的结果是什么)
sidebar 可以展示出来

How customize scroll style?

Is it possible to customize message container's scroll style?

Like thumb/track,auto hide....

If provider a way to customize the render will be more flexible. like as below

<Scroll renderView={renderView} renderThumbHorizontal={renderThumb} renderThumbVertical={renderThumb} onUpdate={handleUpdate} {...props} />

Screenshot from 2021-02-19 00-22-44

Toast duration 为-1 时,无法隐藏轻提示。可否加上遮罩层?

What problem does this feature solve? (这个功能解决了什么问题)
可否加上遮罩层,解决了 toast duration 为 -1 时,toast 无法隐藏问题

Describe the solution you'd like (描述您想要的解决方案)
toast.loading 返回 hide 方法

What does the proposed API look like? (你期望的 API 是怎样的)
const hide = toast.loading('网络请求',-1)
hide()

appendMsg或resetList更新消息列表时如何不让滚动条自动滚动到底部

What problem does this feature solve? (这个功能解决了什么问题)

通过socket或其他方式接收到后端数据,然后通过appendMsg渲染消息列表时,滚动条会自动滚动到底部。如果此时我正在阅读前面的消息,会直接跳走,体验不好。

Describe the solution you'd like (描述您想要的解决方案)
执行appendMsg时,如果通过某种方式判断到正在阅读前面的消息记录,则不要让滚动条自动跳转到底部

What does the proposed API look like? (你期望的 API 是怎样的)
暂时没深入了解相关API,不做评论

可以用vue框架?

What problem does this feature solve? (这个功能解决了什么问题)

Describe the solution you'd like (描述您想要的解决方案)

What does the proposed API look like? (你期望的 API 是怎样的)

需求:根据消息ID,定位到某一个消息的位置。 模仿查看历史消息,点击定位到消息所在位置。

此功能可以解决什么问题?(这个功能解决了什么问题)
通过消息id或其他方式定位到聊天框内消息所在位置,最好有一个选中状态

描述您想要的解决方案?(描述您想要的解决方案)
给出一方法,传值定位消息列表到消息所在位置

拟议的API是什么样的?(您期望的API是怎样的)
怎么方便怎么来,无要求

Timestamps not in english

Version information (版本信息)

  • ChatUI or ChatUI Pro? ChatUI
  • ChatUI Version: 0.3.3
  • React Version: 17.0.2
  • OS Version: Windows 10
  • Browser Version: Chrome (latest)

Describe the bug (描述问题)
In the dates shown in chat, the dates are not displayed in english, instead of "yesterday" it says "昨天"

Steps To Reproduce (重现步骤)

  1. create a message with a timestamp that is a different day (or leave a chat running for a day)

maxLength

What problem does this feature solve? (这个功能解决了什么问题)
At the moment you can enter any amount of items in the chat input box

Describe the solution you'd like (描述您想要的解决方案)
a parameter for the chat item with a max input length
https://chatui.io/components/chat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.