ConversationItem
说明
- ConversationItem组件为会话组件,demo如下
// tempalte
<conversation-item
id="1"
ip="42.48.83.94"
tagText="当前"
desc="这是你当前的会话"
device="Safari 于 Mac"
time="2023-07-16 10:24"
@handle-deleted="handleDeletedConversation"
>
</conversation-item>
// script
const handleDeletedConversation = (id:string) => {
};
Props
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| id | 卡片唯一id | string | ||
| ip | ip地址 | string | ||
| desc? | 描述 | string | ||
| tagText? | 标签文档(不传则不显示) | string | ||
| device? | 设备信息 | string | ||
| time | 登录时间 | string | ||
| hideDeleted? | 隐藏删除按钮 | boolean | false |
Emits
| 方法 | 说明 | 返回值 |
|---|---|---|
| handleDeleted | 点击删除按钮触发 | id(当前卡片唯一标识) |
Slots
| 名称 | 说明 |
|---|---|
| icon | 左侧icon区域插槽 |
| header | ip信息显示区域插槽 |
| content | 描述内容区域插槽 |
| right | 右侧按钮区域插槽 |