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

brand 怎么自定义组件 #79

Closed
kiwilili opened this issue Nov 15, 2021 · 4 comments
Closed

brand 怎么自定义组件 #79

kiwilili opened this issue Nov 15, 2021 · 4 comments

Comments

@kiwilili
Copy link

**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 如何自定义组件配置,实现如上图链接效果

@akai
Copy link
Collaborator

akai commented Nov 15, 2021

文档里有句话:

注:图中的 brand 和 sidebar 需要通过卡片来实现。

@kiwilili
Copy link
Author

kiwilili commented Nov 15, 2021

sidebar 我这边实现了 但是 brand 怎么配置卡片呢

{
    components: {
        'brand-title': Brand
    },
    config: {
       navbar: {
           code: 'brand-title', // 自定义组件不生效
       },
    }
}

也试了

config: {
   brand: {
       code: 'brand-title', // 自定义组件不生效
   },
}

以上都不生效

@akai
Copy link
Collaborator

akai commented Jan 6, 2022

{
  config: {
    brand: { ... }, // 传配置
  },
  components: {
    header: MyHeader // 自定义的导航组件
  }
}

@akai akai closed this as completed Jan 6, 2022
@82kg
Copy link

82kg commented Apr 15, 2023

sidebar 我这边实现了 但是 brand 怎么配置卡片呢

{
    components: {
        'brand-title': Brand
    },
    config: {
       navbar: {
           code: 'brand-title', // 自定义组件不生效
       },
    }
}

也试了

config: {
   brand: {
       code: 'brand-title', // 自定义组件不生效
   },
}

以上都不生效

请教 sidebar怎么实现的呀

captainstdin pushed a commit to captainstdin/ChatUI that referenced this issue May 31, 2023
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

3 participants