Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BubbleListProps支持ContentType泛型传递 #568

Open
whitexie opened this issue Mar 1, 2025 · 0 comments
Open

BubbleListProps支持ContentType泛型传递 #568

whitexie opened this issue Mar 1, 2025 · 0 comments

Comments

@whitexie
Copy link
Contributor

whitexie commented Mar 1, 2025

需求动机

在使用BubbleList组件时,根据文档的示例,定义roles:

const roles: GetProp<BubbleListProps, 'roles'> = {
  ai: {
    // ....other config
    messageRender: (content) => {},
    // ....other config
  },
  user: {
    // ....other config
    messageRender: (content) => {},
    // ....other config
  },
};

messageRender中的content会推断为默认string, 但实际content是一个泛型结构。

提议的 API 是什么样的?

在Bubble组件中是可以传递一个泛型来定义content的,希望BubbleListProps也能支持传递一个泛型来定义content的结构。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant