Conversations 管理对话

用于承载用户侧发送的历史对话列表。
使用

何时使用#

  • 需要对多个对话进行管理
  • 查看历史对话列表

代码演示#

  • Conversation Item 1
  • Conversation Item 2
  • This's Conversation Item 3, you can click me!
  • Conversation Item 4

基础用法。

      加载中
    
  • Conversation Item 1
  • Conversation Item 2
  • Conversation Item 3
  • Conversation Item 4

配合 nxMenu 属性,配置操作菜单

      加载中
    
  • Conversation Item 1
  • Conversation Item 2
  • Conversation Item 3
  • Conversation Item 4

自定义菜单入口。

      加载中
    
  • Conversation Item 1
  • Conversation Item 2
  • Conversation Item 3

使用 nxActiveKeynxActiveChange 属性,控制当前选中的会话。

      加载中
    

API#

nx-conversations#

参数说明类型默认值
[nxActiveKey]当前选中的值string-
[nxDefaultActiveKey]默认选中值string-
[nxItems]会话列表数据源NxConversation[]-
[nxMenu]会话操作菜单NzMenu[]-
(nxActiveChange)选中变更回调EventEmitter<string>-

Interfaces#

interface NxConversation {
  key: string;
  label: string | TemplateRef<void>;
  icon?: string | TemplateRef<void>;
  disabled?: boolean;
}

interface NxMenu {
  key?: string;
  label: string | TemplateRef<void>;
  icon?: string | TemplateRef<void>;
  disabled?: boolean;
  danger?: boolean;
}