Preview Updated 2026-05-10

Protocol pane

Protocol monitor shell with SSE / MQTT / Kafka / gRPC tabs.

Basic usage

4 predefined tabs (ids: sse, mqtt, kafka, grpc). Each tab’s content is filled in by the consumer via the named slot #panel-{tabId} (Vue) / slots["panel-{tabId}"] (React). You can also override the default list via the tabs prop.

Source: protocols.html.

这里渲染 SSE EventStream 监视器(事件流时间轴 + 重连状态)。

<CfProtocolPane>
<template #panel-sse>...</template>
<template #panel-mqtt>...</template>
</CfProtocolPane>
<CfProtocolPane slots={{
'panel-sse': <PanelA />,
'panel-mqtt': <PanelB />,
}} />

Real content composition

Replace the placeholders with concrete visualizations — one per tab: SSE timeline / MQTT topic tree / Kafka partition table / gRPC method list.

  • 14:32:01connection.established
  • 14:32:08order.created · #1842
  • 14:32:14order.paid · #1842
  • 14:32:30heartbeat
  • 14:32:45connection.reconnect
<CfProtocolPane>
<template #panel-sse><EventList /></template>
<template #panel-mqtt><CfTreeView ... /></template>
<template #panel-kafka><CfDataGrid ... /></template>
<template #panel-grpc><CfList ... /></template>
</CfProtocolPane>
<CfProtocolPane slots={{...}} />

API

PropTypeDefaultDescription
modelValue / valuestringFirst tab idActive tab
tabsTemplatePaneTab[]presetCustom tab list
size'sm' | 'md' | 'lg''md'

The preset tab id lists are exported as constants PROTOCOL_TABS / NETWORK_TABS / SQL_TABS, ready to reuse when customizing tabs.

Template components are a thin semantic wrapper over CfTabs. If you don’t need a predefined tab set, use CfTabs directly.

反馈与讨论

Protocol pane · Discussion

0
0 / 600
一键发送
正在加载评论...