Skip to content

Latest commit

 

History

History
3028 lines (2383 loc) · 310 KB

File metadata and controls

3028 lines (2383 loc) · 310 KB

组件 Props / Events(自动生成)

此文件由 scripts/generate-component-api-docs.ts 自动生成,请勿手改。

目录

T3DViewport

源码:src/vue/components/T3DViewport.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number Horizontal position in terminal cells.
y number Vertical position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Paint and pointer hit-test stacking order.
renderer T3DRenderer Pull renderer captured at mount; remount the component to replace it.
paused boolean false Stops frame pulling while true.
maxFps number DEFAULT_MAX_FPS Maximum requested frames per second.
pixelWidth number undefined Requested source width in pixels; TVideo may adapt it for ASCII output.
pixelHeight number undefined Requested source height in pixels; TVideo may adapt it for ASCII output.
fallback string "[3D viewport]" Text displayed before a frame is available or after rendering fails.
style Style undefined Terminal style applied to fallback and ASCII output.
clear boolean true Clears cells underneath each video frame.
interactive boolean true Enables pointer orbit, wheel zoom, and hover motion tracking.
initialYaw number 0 Initial yaw angle in radians, also restored by resetMotion().
initialPitch number 0 Initial pitch angle in radians, also restored by resetMotion().
autoRotate boolean true Enables continuous yaw rotation when not dragging.
autoRotateSpeed number DEFAULT_AUTO_ROTATE_SPEED Automatic yaw rotation speed in radians per second.
pointerSensitivity number DEFAULT_POINTER_SENSITIVITY Drag sensitivity in radians per terminal cell.
initialZoom number 1 Initial camera zoom, also restored by resetMotion().
minZoom number DEFAULT_MIN_ZOOM Minimum camera zoom accepted from wheel and trackpad gestures.
maxZoom number DEFAULT_MAX_ZOOM Maximum camera zoom accepted from wheel and trackpad gestures.
zoomSensitivity number DEFAULT_ZOOM_SENSITIVITY Zoom impulse per normalized wheel or trackpad unit.

Events

名称 Payload 说明
frame TVideoFrameEvent A frame was committed by TVideo.
error unknown Rendering or frame processing failed.
objecthover T3DHitResult | null Hovered renderer object changed, or cleared to null.
objectselect T3DHitResult | null Click-locked renderer object changed, or cleared to null.

TAgentTerminalGraphic

源码:src/vue/components/TAgentTerminalGraphic.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number undefined
zIndex number 0
content string
kind TAgentTerminalGraphicKind "image"
fallback string undefined
style Style undefined
loadingStyle Style undefined
errorStyle Style undefined
clear boolean true
final boolean true
streaming boolean false
renderer TAgentTerminalGraphicRenderer undefined
loadingText string "Rendering terminal graphic..."
deferRenderUntilVisible boolean true
suspendRawWhileScrolling boolean true
suspendRenderWhileScrolling boolean true
scrolling boolean false
scrollVersion number 0
placementMoveWithoutClear boolean false Advanced Kitty-only opt-in for moving an unchanged image via a reusable placement sequence.
preserveRawWhileRendering boolean false
suspended boolean false
retainRawWhileCovered boolean false
ignoreRawCoverage boolean false
ignoreSamePlaneRawCoverage boolean false
cacheKey string undefined
placementKey string undefined
trace (event: TAgentTerminalGraphicTraceEvent) => void undefined

Events

TAgentTranscript

源码:src/vue/components/TTranscriptView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
source TTranscriptDataSource
version number
scrollTop number undefined
defaultScrollTop number 0
autoStickToBottom boolean false
selectable boolean true
wrap boolean false
style Style undefined
hoverStyle Style undefined
focusStyle Style undefined
autoFocus boolean false
focusable boolean true
wheelScroll boolean true
keyboardRegions boolean true
rowScrollMode RowScrollMode "unsafe-full-row"

Events

名称 Payload 说明
scroll
update:scrollTop
rowClick
actionClick
linkClick
foldToggle
toolClick
hoverRegion

TAnchor

源码:src/vue/components/TAnchor.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
left number undefined
top number undefined
right number undefined
bottom number undefined
w number undefined
h number undefined
zIndex number 0
focusable boolean false
selectable boolean undefined

Events

名称 Payload 说明
clickCapture
click
dblclickCapture
dblclick
pointerdownCapture
pointerdown
pointerupCapture
pointerup
pointermoveCapture
pointermove
wheelCapture
wheel
keydownCapture
keydown
keyupCapture
keyup
focusCapture
focus
blurCapture
blur

TAutocompleteInput

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number 5 Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
modelValue string Controlled component value.
suggestions readonly TAutocompleteOption[] () => [] Autocomplete suggestions.
suggestionProvider TAutocompleteSuggestionProvider undefined Async suggestion provider called with the current input value.
open boolean undefined Controlled suggestion popup visibility.
highlightedIndex number 0 Controlled highlighted suggestion index.
placeholder string "" Placeholder text shown when the input is empty.
debounce number 0 Delay before calling an async provider, in milliseconds.
minChars number 0 Minimum input length before suggestions are shown or loaded.
filterLocal boolean false Filters provided suggestions against the input value.
closeOnSelect boolean true Closes suggestions after a suggestion is selected.
loadingText string "Loading..." Text rendered while async loading is pending.
emptyText string "" Text rendered when there are no rows or items.
errorText string "Unable to load suggestions" Text rendered when async loading fails.
style Style undefined Base terminal cell style override.
suggestionStyle Style undefined Style override for suggestion rows.
activeSuggestionStyle Style () => ({ inverse: true }) Style override for the active suggestion row.

Events

名称 Payload 说明
update:modelValue string Emitted when the controlled model value changes.
update:open boolean Emitted when popup visibility changes.
update:highlightedIndex number Emitted when the active autocomplete suggestion changes.
input string Emitted for input edits.
change string Emitted when the component commits a value change.
select TAutocompleteSelectPayload Emitted when the active item is selected.
loadError TAutocompleteLoadErrorPayload Emitted when the async suggestion provider rejects; aborted stale requests do not emit.

TBadge

源码:src/vue/components/TFeedback.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number undefined Width in terminal cells.
value string | number Text or scalar value rendered by the badge.
tone TFeedbackTone "default" Semantic color tone.
zIndex number 0 Render and event ordering within the current plane.
style Style undefined Base terminal cell style override.

Events

TBox

源码:src/vue/components/TBox.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
border boolean true Draws a border around the component.
title string "" Optional title text.
padding number 0 Inner padding in terminal cells.
scrollX number 0 Horizontal content offset in terminal cells.
scrollY number 0 Vertical content offset in terminal cells.
style Style undefined Base terminal cell style override.
titleStyle Style undefined Style override for title text.
clear boolean true Clears the component rectangle before drawing content.

Events

名称 Payload 说明
pointerenterCapture TerminalPointerEvent Emitted when the pointer enters the component. Runs during capture.
pointerenter TerminalPointerEvent Emitted when the pointer enters the component.
pointerleaveCapture TerminalPointerEvent Emitted when the pointer leaves the component. Runs during capture.
pointerleave TerminalPointerEvent Emitted when the pointer leaves the component.

Slots

名称 Props 说明
default Content rendered inside the box content area with origin, clipping, and scroll offsets applied.

TBreadcrumb

源码:src/vue/components/TNavigation.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
zIndex number 0
items readonly TBreadcrumbItem[]
separator string "/"
style Style undefined
activeStyle Style () => ({ bold: true })
disabledStyle Style () => ({ dim: true })

Events

名称 Payload 说明
select TBreadcrumbSelectPayload

TBrowser

源码:src/vue/components/TBrowser.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental/browser

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
url string
sessionFactory TBrowserSessionFactory
autoFocus boolean false
maxFps number 60
pixelWidth number undefined
pixelHeight number undefined
fallback string "[browser requires terminal graphics]"
style Style undefined
clear boolean true

Events

名称 Payload 说明
ready TBrowserSession
frame TVideoFrameEvent
navigate string
titleChange string
requestAddress
close
error unknown

TCandlestickChart

源码:src/vue/components/TCharts.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0
candles readonly TCandlestickDatum[] Candles rendered from left to right; the most recent candles are kept when width is smaller.
labels readonly string[] undefined Labels aligned with candles and shown in hover tooltips.
min number undefined Lower price bound. Defaults to the smallest candle low.
max number undefined Upper price bound. Defaults to the largest candle high.
style Style undefined
upStyle Style () => ({ fg: "greenBright" }) Style used when close is greater than or equal to open.
downStyle Style () => ({ fg: "redBright" }) Style used when close is less than open.
wickStyle Style undefined Optional style override for wick cells.
showAxes boolean true Whether to render axes and price labels when there is enough space.
axisStyle Style () => ({ fg: "white", dim: true }) Style used for axis lines.
labelStyle Style () => ({ fg: "whiteBright" }) Style used for axis labels.
xLabel string "" Label centered under the x axis.
yLabel string "" Label rendered at the top of the plot area.
startLabel string "" Left endpoint label for the x axis when xLabel is empty.
endLabel string "" Right endpoint label for the x axis when xLabel is empty.
showTooltip boolean true Whether pointer hover shows candle values.
hoverStyle Style () => ({}) Style merged onto the currently hovered candle.
tooltipStyle Style () => ({ fg: "whiteBright" }) Style used for hover tooltip text.

Events

TCheckbox

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
modelValue boolean false Controlled component value.
label string "" Visible label text.
disabled boolean false Disables pointer and keyboard activation.
style Style undefined Base terminal cell style override.
checkedStyle Style undefined Style used when the checkbox is checked.
disabledStyle Style () => ({ dim: true }) Style used for disabled content.

Events

名称 Payload 说明
update:modelValue boolean Emitted when the controlled model value changes.
change boolean Emitted when the component commits a value change.

TCode

源码:src/vue/components/TFeedback.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number undefined Width in terminal cells.
value string Code text rendered inside the code block.
zIndex number 0 Render and event ordering within the current plane.
style Style () => ({ fg: "yellowBright" }) Base terminal cell style override.

Events

TCommandPalette

源码:src/vue/components/TCommandPalette.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
modelValue boolean Controlled component value.
title string "" Optional title text.
query string undefined Search query used by filtering or async providers.
initialQuery string "" Query used when the command palette opens.
items readonly TCommandPaletteItem[] () => [] Command items rendered and filtered by the palette.
itemsProvider TCommandPaletteItemsProvider undefined Async command provider called with the current query.
matcher TCommandPaletteMatcher undefined Custom command matcher.
filterStrategy "substring" | "fuzzy" "substring" Built-in command matching strategy.
selectedIndex number undefined Controlled active item index.
showRowDetails boolean false Shows command detail text next to labels.
placeholder string "" Placeholder text shown when the input is empty.
noMatchesText string "No matches" Text rendered when filtering returns no commands.
loadingText string "Loading..." Text rendered while async loading is pending.
errorText string "Unable to load commands" Text rendered when async loading fails.
hint string "" Footer hint text.
debounce number 0 Delay before calling an async provider, in milliseconds.
minQueryLength number 0 Minimum query length before async loading runs.
maxVisibleItems number undefined Maximum number of command rows rendered at once.
closeOnSelect boolean false Closes the command palette after a command is selected.
resetQueryOnClose boolean false Resets the query when the palette closes.
w number 72 Width in terminal cells.
h number 18 Height in terminal cells.
chromeStyle Style undefined Style override for command palette chrome.
inputStyle Style undefined Style override for the embedded input.
listStyle Style undefined Style override for list rows.
bodyStyle Style undefined Style override for dialog body cells.
highlightStyle Style undefined Style used for the highlighted row or match.
matchStyle Style undefined Style used for matched text.
highlightMatchStyle Style undefined Style used for highlighted text while the row is active.
dividerStyle Style undefined Style override for dividers.
hintStyle Style undefined Style override for hint text.
detailStyle Style undefined Style override for detail text.
emptyStyle Style undefined Style used when rendering an empty state.

Events

名称 Payload 说明
update:modelValue boolean Emitted when the controlled model value changes.
update:query string Emitted when the controlled query changes.
update:selectedIndex number Emitted when the controlled active index changes.
select TCommandPaletteSelectPayload Emitted when the active item is selected.
loadError TCommandPaletteLoadErrorPayload Emitted when the async command provider rejects; aborted stale requests do not emit.
close void Emitted when the component requests to close.

TContextMenu

源码:src/vue/components/TOverlay.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
modelValue boolean
x number Caller-owned x position; no viewport clamp or flip placement is applied.
y number Caller-owned y position; no viewport clamp or flip placement is applied.
w number 24
zIndex number 20
items readonly TContextMenuItem[]
selectedIndex number undefined
closeOnOutside boolean true
style Style undefined
activeStyle Style () => ({ inverse: true })
disabledStyle Style () => ({ dim: true })

Events

名称 Payload 说明
update:modelValue boolean
update:selectedIndex number
select TContextMenuSelectPayload
close

TContributionGraph

源码:src/vue/components/TCharts.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number undefined Width in terminal cells. Defaults to the rendered graph width.
h number undefined Height in terminal cells. Defaults to the row count plus a tooltip row when tooltips are enabled.
zIndex number 0
values readonly number[] Numeric samples rendered column-major from top to bottom.
rows number 7 Number of rows in each heatmap column.
columns number undefined Number of columns to render. Defaults to enough columns for the values.
max number undefined Maximum sample value used for level mapping. Defaults to the largest positive value.
labels readonly string[] undefined Labels aligned with values and shown in hover tooltips.
unit string "" Unit appended to hover tooltip values.
showTooltip boolean true Whether pointer hover shows a value tooltip.
emptyStyle Style () => ({ fg: "blackBright", dim: true }) Empty cells and surrounding clear area style.
levelStyles readonly Style[] () => DEFAULT_HEATMAP_LEVEL_STYLES Positive value styles ordered from low to high intensity.
cell string "■" Glyph used for each heatmap cell.
gap number 1 Horizontal gap between columns in terminal cells.
hoverStyle Style () => ({}) Style merged onto the currently hovered heatmap cell.
tooltipStyle Style () => ({ fg: "whiteBright" }) Style used for hover tooltip text.
style Style undefined

Events

TDataTable

源码:src/vue/components/TDataTable.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
columns readonly TTableColumn[] Table column definitions.
rows readonly TTableRow[] TDataTable can accept a controlled viewport offset through scrollTop. It is
still non-virtual: rows are sorted/filtered in memory and only the visible
slice is passed to TTable.
rowKey string | ((row: TTableRow, index: number) => unknown) undefined Row key field or resolver.
selectedRowKey unknown undefined Controlled selected row key.
selectedRowKeys readonly unknown[] undefined Controlled selected row keys for multi-select tables.
scrollTop number undefined Controlled top row offset.
sortBy string "" Sorts by the raw row value at this key; column format only affects display and filtering.
sortDirection TDataTableSortDirection "asc" Controlled sort direction.
sortable boolean false Enables sortable column header interactions.
manualSort boolean false Disables built-in sorting while keeping sort events controlled by the host.
sorter TDataTableSorter undefined Custom row comparison function.
filter string "" Controlled filter query.
filterable boolean false Enables built-in row filtering.
manualFilter boolean false Disables built-in filtering while keeping filter state host-owned.
filterPredicate TDataTableFilterPredicate undefined Custom row filter predicate.
selectable boolean false Enables row selection.
selectionMode TDataTableSelectionMode "single" Row selection mode.
border boolean false Draws a border around the component.
style Style undefined Base terminal cell style override.
headerStyle Style undefined Style override for table header cells.
borderStyle Style undefined Style override for border cells.
selectedStyle Style undefined Style used for selected rows or nodes.
activeStyle Style undefined Style used for the active item or row.
emptyText string "No rows" Text rendered when there are no rows or items.

Events

名称 Payload 说明
update:selectedRowKey unknown Emitted when the selected row key changes.
update:selectedRowKeys unknown[] Emitted when selected row keys change.
update:scrollTop number Emitted when the top visible row offset should change.
update:sortBy string Emitted when the sorted column key changes.
update:sortDirection TDataTableSortDirection Emitted when the sort direction changes.
sortChange TDataTableSortChangePayload Emitted when table sort state changes.
rowSelect TDataTableRowSelectPayload Emitted when a data table row is selected; index is viewport-local, dataIndex is filtered/sorted, and originalIndex is the input row index.

TDebugOverlay

源码:src/vue/components/TDebugOverlay.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
mode "focus" | "all" "focus"
panel boolean true
maxRects number 40
zIndex number 90

Events

TDialog

源码:src/vue/components/TDialog.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
modelValue boolean Controlled component value.
w number Width in terminal cells.
h number Height in terminal cells.
title string "" Optional title text.
padding number 1 Inner padding in terminal cells.
zIndex number 1000 Render and event ordering within the current plane.
style Style undefined Base terminal cell style override.
titleStyle Style undefined Style override for title text.
contentStyle Style undefined Style override for dialog or popover content cells.
backdropStyle Style undefined Style override for backdrop cells.
placement Placement "center" Dialog placement within the current layout.
offsetX number 0 Horizontal placement offset in cells.
offsetY number 0 Vertical placement offset in cells.
backdrop boolean true Renders a backdrop behind the dialog.
closeOnBackdrop boolean true Closes the dialog when the backdrop is clicked.
closeOnEsc boolean true Closes the dialog on Escape.
closeOnBlur boolean false Emits close when focus leaves the component.
teleport boolean false Mounts the dialog into the overlay runtime plane.
tabMode "cycle" | "wrapFromButtons" "cycle" Keyboard Tab behavior inside the dialog.
buttons DialogButton[] () => [] Dialog footer buttons.
closeOnConfirm boolean true Closes the dialog after a footer button confirms.

Events

名称 Payload 说明
update:modelValue boolean Emitted when the controlled model value changes.
close void Emitted when the component requests to close.
focus void Emitted when the component receives focus.
blur void Emitted when the component loses focus.
keydown TerminalKeyboardEvent Emitted for keydown events.
confirm DialogButton & { index: number } Emitted when a focused action is confirmed.

Slots

名称 Props 说明
default Dialog body content rendered inside the content rect before optional footer buttons.

TDivider

源码:src/vue/components/TFeedback.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
title string "" Optional title text.
zIndex number 0 Render and event ordering within the current plane.
style Style undefined Base terminal cell style override.

Events

TerminalProvider

源码:src/vue/components/TerminalProvider.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
cols number Terminal column count.
rows number Terminal row count.
widthProvider WidthProvider "default" Cell width provider used by the terminal buffer.
defaultStyle Style () => ({}) Default terminal cell style for descendants.
theme TuiThemeOverrides undefined Theme token overrides for component defaults.
autoResize boolean false Resizes the terminal from the host element when enabled.
minCols number 1 Minimum column count used by auto resize.
minRows number 1 Minimum row count used by auto resize.
recordEvents ((e: TerminalEventRecord) => void) | undefined undefined Optional event recorder callback.
inputPlugins readonly TInputPlugin[] () => [defaultTInputHostPlugin] Input plugins provided to descendant text inputs.
pathPickerProvider PathPickerProvider undefined Path provider injected into descendant path pickers.
linkOpener TerminalLinkOpenerLike undefined Host link opener used by components with host-owned activation.
debugIme boolean false Enables IME debugging output.
debugTrace boolean false Enables runtime trace logging.
domRendererOptions DomRendererOptions undefined DOM renderer options used by TerminalProvider.
clipboard ClipboardApi undefined Clipboard implementation used for terminal selection copy.
selection TerminalProviderSelectionConfig false Terminal cell selection configuration.

Events

名称 Payload 说明
selectionCopy TerminalSelectionCopyPayload Emitted after terminal selection copy.

Slots

名称 Props 说明
default Terminal component tree rendered inside the provider runtime context.

TFlex

源码:src/vue/components/TFlex.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
direction TFlexDirection "row"
gap number 0
rowGap number undefined
columnGap number undefined
padding number 0
paddingX number undefined
paddingY number undefined
paddingTop number undefined
paddingRight number undefined
paddingBottom number undefined
paddingLeft number undefined
wrap boolean false
alignItems TFlexAlign "stretch"
justifyContent TFlexJustify "start"
alignContent TFlexAlignContent "start"
zIndex number 0

Events

Slots

名称 Props 说明
default Flex item subtree measured and positioned inside the flex container.

TFlexItem

源码:src/vue/components/TFlex.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
grow number 0
shrink number 1
basis TFlexSize undefined
w TFlexSize undefined
width TFlexSize undefined
h TFlexSize undefined
height TFlexSize undefined
minWidth TFlexSize undefined
minHeight TFlexSize undefined
maxWidth TFlexSize undefined
maxHeight TFlexSize undefined
measure TFlexMeasure undefined
order number 0
zIndex number 0
margin number 0
marginX number undefined
marginY number undefined
marginTop number undefined
marginRight number undefined
marginBottom number undefined
marginLeft number undefined
alignSelf TFlexAlign undefined

Events

Slots

名称 Props 说明
default { rect: Rect } Item content rendered inside the computed child rect.

TFlow

源码:src/vue/components/TFlow.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
items unknown[]
direction Direction "vertical"
gap number 0
itemSize number 1
zIndex number 0

Events

TForm

源码:src/vue/components/TForm.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
model TFormModel
rules Record<string, TFormRule> () => ({})
disabled boolean false
readOnly boolean false Provides a read-only hint to custom form field consumers; built-in controls do not automatically consume it.
submitOnEnter boolean false

Events

名称 Payload 说明
submit TFormSubmitPayload
validation Record<string, string>

Slots

名称 Props 说明
default Form field subtree rendered with TForm context provided to descendants.

TFormField

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
name string "" Field name used by form context.
label string "" Visible label text.
help string "" Help text rendered below the field.
error string "" Error text rendered below the field.
required boolean false Marks the field label as required.
disabled boolean false Disables pointer and keyboard activation.
style Style undefined Base terminal cell style override.
labelStyle Style undefined Style override for label text.
helpStyle Style undefined Style override for help text.
errorStyle Style undefined Style override for error text.

Events

Slots

名称 Props 说明
default Field control content rendered between the label and help/error row.

TInput

源码:src/vue/components/TInput.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number 1 Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
modelValue string Controlled component value.
cursorToEndOnExternalUpdate boolean false Moves the cursor to the end after external model updates.
cursorToEndOnFirstFocus boolean false Moves the cursor to the end on first focus.
placeholder string "" Placeholder text shown when the input is empty.
placeholderWhenFocused boolean false Placeholder text used while the input has focus.
style Style undefined Base terminal cell style override.
autoFocus boolean false Requests focus when the component becomes visible.
cursorBlink boolean true Enables cursor blink rendering.
cursorShape "block" | "underline" | "bar" "block" Cursor glyph shape.
blinkInterval number 500 Cursor blink interval in milliseconds.
promptSuggestions readonly PromptSuggestion[] () => [] Prompt popup suggestions.
promptTrigger string "/" Prompt popup trigger character.
promptTriggers readonly string[] undefined Prompt popup trigger characters.
promptMaxItems number 6 Maximum prompt popup rows.
promptAlign "input" | "center" "input" Prompt popup alignment.
promptSelectedStyle Style undefined Style override for the active prompt suggestion.
promptPopupStyle Style undefined Style override for the prompt popup body.
promptPopupBorderStyle Style undefined Style override for the prompt popup border.
promptPopupMatchStyle Style undefined Style override for prompt match highlights.
skillTrigger string "" Trigger used for skill suggestions.
skillSuggestions readonly PromptSuggestion[] undefined Skill suggestions shown in the prompt popup.
skillHighlightStyle Style undefined Style override for highlighted skill chips.
mentionTrigger string "@" Trigger used for path or mention suggestions.
mentionWorkspace string "" Workspace root used by mention providers.
mentionMode PathPickMode "file" Mention provider mode.
mentionShowHidden boolean false Includes hidden paths in mention suggestions.
mentionSuggestions readonly PromptSuggestion[] () => [] Mention suggestions supplied by the host.
mentionMaxItems number 8 Maximum mention rows.
mentionChipStyle Style undefined Style override for mention chips.
multilineChipStyle Style undefined Style override for multiline chips.
dedupeMentions boolean true Removes duplicate mention entries.
collectMentions boolean false Collects mention values from committed input.
mentions readonly string[] () => [] Controlled collected mention values.
collapseMultiline boolean false Collapses multiline pasted text into chips.
multilineTexts readonly string[] () => [] Controlled multiline chip text values.
secret boolean false Masks input text when enabled.
maskChar string "•" Character used to mask secret input.
submitOnEnter boolean true Emits change on Enter.
plugins readonly TInputPlugin[] () => [] Input plugins attached to this input.
pasteImageHandler () => Promise<string | null> | string | null undefined Host handler for pasted images.
filePasteHandler (absPath: string) => Promise<string | null> | string | null undefined Host handler for pasted files.

Events

名称 Payload 说明
update:modelValue string Emitted when the controlled model value changes.
input string Emitted for input edits.
change string Emitted when the component commits a value change.
keydown TerminalKeyboardEvent Emitted for keydown events.
focus void Emitted when the component receives focus.
blur void Emitted when the component loses focus.
pointerenter TerminalPointerEvent Emitted when the pointer enters the component.
pointerleave TerminalPointerEvent Emitted when the pointer leaves the component.
update:mentions readonly string[] Emitted when collected mentions change.
mentionClick (absPath: string, event: TerminalPointerEvent) Emitted when a rendered mention chip is clicked.
update:multilineTexts readonly string[] Emitted when multiline chip text values change.
multilineClick number Emitted when a multiline chip is clicked.
validationError { reason: string } Emitted when input validation rejects a host action.

TInputBox

源码:src/vue/components/TInputBox.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
title string ""
padding number 0
modelValue string
placeholder string ""
style Style undefined
autoFocus boolean false
plugins readonly TInputPlugin[] () => []
cursorBlink boolean true
cursorShape "block" | "underline" | "bar" "block"
blinkInterval number 500

Events

名称 Payload 说明
update:modelValue
input
change
keydown
focus
blur

TJsonEditor

源码:src/vue/components/TJsonEditor.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number 8
zIndex number 0
modelValue string
placeholder string ""
style Style undefined
showIndentGuides boolean true
indentSize number 2
guideColors readonly AnsiColorName[] () => [...DEFAULT_GUIDE_COLORS]
autoFocus boolean false
cursorToEndOnFirstFocus boolean true
cursorToEndOnExternalUpdate boolean true
submitOnEnter boolean false

Events

名称 Payload 说明
update:modelValue
keydown
focus
blur
undo
redo
lintChange
validationError

TKeyHint

源码:src/vue/components/TNavigation.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number undefined
zIndex number 0
combo string
label string
style Style undefined
comboStyle Style () => ({ inverse: true })

Events

TLineChart

源码:src/vue/components/TCharts.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0
values readonly number[] Numeric samples rendered across the chart width.
labels readonly string[] undefined Labels aligned with values and shown in hover tooltips.
unit string "" Unit appended to hover y values.
min number undefined Lower domain bound. Defaults to the smallest sample.
max number undefined Upper domain bound. Defaults to the largest sample.
style Style undefined
lineStyle Style () => ({ fg: "cyanBright" }) Style used for line glyphs.
showAxes boolean true Whether to render axes and domain labels when there is enough space.
axisStyle Style () => ({ fg: "white", dim: true }) Style used for axis lines.
labelStyle Style () => ({ fg: "whiteBright" }) Style used for axis labels.
xLabel string "" Label centered under the x axis.
yLabel string "" Label rendered at the top of the plot area.
startLabel string "" Left endpoint label for the x axis when xLabel is empty.
endLabel string "" Right endpoint label for the x axis when xLabel is empty.
showTooltip boolean true Whether pointer hover shows point values.
hoverStyle Style () => ({ fg: "whiteBright", bold: true }) Style merged onto the currently hovered point.
tooltipStyle Style () => ({ fg: "whiteBright" }) Style used for hover tooltip text.

Events

TLink

源码:src/vue/components/TLink.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number undefined Width in terminal cells.
h number 1 Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
href string Link target to render and activate.
label string undefined Visible label text.
style Style undefined Base terminal cell style override.
hoverStyle Style undefined Style applied while the pointer hovers the link.
focusStyle Style undefined Style applied while the link has keyboard focus.
activeStyle Style undefined Style used for the active item or row.
disabled boolean false Disables pointer and keyboard activation.
visited boolean false Marks the link as already visited for styling.
openMode TLinkOpenMode "host" Link activation mode.
activationKeys readonly string[] () => DEFAULT_ACTIVATION_KEYS Keyboard keys that activate the link.
modifierClick TLinkModifierClick "none" Pointer modifier required for click activation.
autoFocus boolean false Requests focus when the component becomes visible.

Events

名称 Payload 说明
activate TLinkActivatePayload Emitted when the link is activated.
open TLinkOpenPayload Emitted when the host opener accepts a link open request.
invalidHref TLinkInvalidHrefPayload Emitted when a link href is rejected by the sanitizer.
click TerminalPointerEvent Emitted for click events.
keydown TerminalKeyboardEvent Emitted for keydown events.
focus TerminalBaseEvent Emitted when the component receives focus.
blur TerminalBaseEvent Emitted when the component loses focus.

TLinkifyText

源码:src/vue/components/TLinkifyText.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
value string Text scanned for links and rendered into terminal cells.
w number undefined Width in terminal cells.
h number undefined Height in terminal cells.
style Style undefined Base terminal cell style override.
linkStyle Style undefined Style applied to detected link segments.
clear boolean true Clears the component rectangle before drawing content.
wrap boolean false Wraps text to the available cell width.
protocols readonly TLinkifyProtocol[] undefined URL protocols accepted by linkification.
allowRelative boolean false Allows relative hrefs in detected link segments.
maxUrlLength number undefined Maximum detected URL length.

Events

TList

源码:src/vue/components/TList.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
items string[] List rows rendered by the component.
itemVersion number 0 External version key for item changes that keep array identity stable.
modelValue number 0 Controlled component value.
style Style undefined Base terminal cell style override.
autoFocus boolean false Requests focus when the component becomes visible.
closeOnBlur boolean false Emits close when focus leaves the component.

Events

名称 Payload 说明
update:modelValue number Emitted when the controlled model value changes.
change { index: number; value: string } Emitted when the component commits a value change.
scroll number Emitted when the visible scroll offset changes.
close void Emitted when the component requests to close.
focus void Emitted when the component receives focus.
blur void Emitted when the component loses focus.
keydown TerminalKeyboardEvent Emitted for keydown events.

TLogLinksPanel

源码:src/vue/components/TLogLinksPanel.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
links readonly TLogLinkPanelItem[] () => []
activeIndex number -1
style Style undefined
activeStyle Style () => ({ inverse: true })
currentStyle Style () => ({ bold: true })
hrefStyle Style () => ({ underline: true })
disabledStyle Style () => ({ dim: true })
showLineNumbers boolean true
showHref boolean true
focusable boolean true

Events

名称 Payload 说明
select
activate
activeChange
focus
blur
keydown

TLogMinimap

源码:src/vue/components/TLogMinimap.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
metrics TLogMinimapMetrics | null null
markers readonly TLogMinimapMarker[] () => []
density readonly TLogMinimapDensityBucket[] () => []
style Style undefined
densityStyle Style undefined
markerStyle Style undefined
currentMarkerStyle Style undefined
viewportStyle Style undefined
estimatedStyle Style undefined
showMarkers boolean true
showDensity boolean true
showViewport boolean true

Events

名称 Payload 说明
scrollTo
markerClick

TLogScrollbar

源码:src/vue/components/TLogScrollbar.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
h number
zIndex number 0
metrics TLogScrollbarMetrics | null null
style Style undefined
thumbStyle Style undefined
trackStyle Style undefined
measuringStyle Style undefined
markers readonly TLogScrollbarMarker[] () => []
markerStyle Style () => ({ fg: "yellowBright" })
currentMarkerStyle Style () => ({ fg: "redBright", bold: true })
showMarkers boolean true
showArrows boolean false

Events

名称 Payload 说明
scrollTo
scrollBy
markerClick

TLogSearchBar

源码:src/vue/components/TLogSearchBar.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
zIndex number 0
state TLogSearchBarState
placeholder string "Search…"
style Style undefined
inputStyle Style undefined
activeStyle Style () => ({ inverse: true })
errorStyle Style () => ({ fg: "redBright", bold: true })
disabledStyle Style () => ({ dim: true })
toggleStyle Style undefined
focusable boolean true
showModeToggle boolean true
showCaseToggle boolean true
showWholeWordToggle boolean true
showCount boolean true
showNavigation boolean true

Events

名称 Payload 说明
update
update:query
update:mode
update:caseSensitive
update:wholeWord
previous
next
clear
focus
blur
keydown

TLogSearchPager

源码:src/vue/components/TLogSearchPager.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
zIndex number 0
state TLogSearchPagerState | null null
style Style undefined
activeStyle Style undefined
disabledStyle Style () => ({ dim: true })
errorStyle Style () => ({ fg: "redBright", bold: true })
showCount boolean true

Events

名称 Payload 说明
previousPage
nextPage
pageChange

TLogSearchResults

源码:src/vue/components/TLogSearchResults.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
results readonly TLogSearchResultItem[] () => []
activeIndex number -1
style Style undefined
activeStyle Style () => ({ inverse: true })
matchStyle Style () => ({ underline: true })
currentStyle Style () => ({ bold: true })
showLineNumbers boolean true
focusable boolean true

Events

名称 Payload 说明
select
activeChange
keydown
focus
blur

TLogView

源码:src/vue/components/TLogView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
source TLogDataSource
version number
scrollTop number undefined
defaultScrollTop number undefined
style Style undefined
autoFocus boolean false
selectable boolean true
autoStickToBottom boolean true
overscan number 2
wrap boolean false
visualIndexMode "estimated" | "exact" "estimated"
visualIndexOptions TLogViewVisualIndexOptions undefined
ansi boolean false
links boolean false Parses OSC8 links only with ansi=true; OSC8 links preserve parsed ANSI style and
do not inherit TLink theme defaults.
linkify boolean | TLinkifyOptions false Plain-text URL linkification for ansi=false rows; generated links inherit TLink
theme defaults before linkStyle.
linkStyle Style undefined Link style override. OSC8 defaults to underline-only over parsed ANSI style;
linkify also inherits TLink theme defaults.
keyboardLinks boolean false
linkFocusStyle Style () => ({ inverse: true })
searchQuery string ""
searchOptions TLogViewSearchOptions undefined
highlightMatches boolean true
matchStyle Style () => ({ inverse: true })
currentMatchStyle Style () => ({ inverse: true, bold: true })
rowScrollMode RowScrollMode "off"

Events

名称 Payload 说明
scroll
update:scrollTop
update:searchQuery
search
searchMatch
searchMarkers
linkClick
linkFocus
linkActivate
visualIndex
focus
blur
keydown

TLogVirtualLinksPanel

源码:src/vue/components/TLogVirtualLinksPanel.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
links readonly TLogLinkPanelItem[] () => []
modelValue number -1
style Style undefined
activeStyle Style undefined
showLineNumbers boolean true
rowScrollMode RowScrollMode "off"

Events

名称 Payload 说明
update:modelValue
activeChange
select
activate
focus
blur
keydown
scroll

TLogVirtualSearchResults

源码:src/vue/components/TLogVirtualSearchResults.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
itemCount number
itemVersion number
getItem (index: number) => TLogSearchResultItem | null
modelValue number -1
style Style undefined
activeStyle Style undefined
showLineNumbers boolean true
rowScrollMode RowScrollMode "off"

Events

名称 Payload 说明
update:modelValue
activeChange
select
focus
blur
keydown
scroll

TMarkdownText

源码:src/vue/components/TMarkdownText.ts

API maturity: Public

Import: @simon_he/vue-tui/markdown

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
content string Markdown source rendered into terminal visual rows.
w number Width in terminal cells.
h number undefined Height in terminal cells.
style Style undefined Base terminal cell style override.
final boolean true Parses the markdown as a complete document when enabled.
streaming boolean false Coalesces rapid content updates into frame-scheduled markdown rebuilds.
clear boolean true Clears the component rectangle before drawing content.
customHtmlTags readonly string[] undefined Additional HTML tag names accepted by the markdown parser.
theme TuiMarkdownThemeOverrides undefined Markdown theme token overrides for parsed blocks and inline segments.
imageRenderer TuiMarkdownImageResolver undefined Optional resolver for markdown image payloads before terminal graphics rendering.
imageMinWidth number undefined Minimum markdown image render width in terminal cells.
imageMaxWidth number undefined Maximum markdown image render width in terminal cells.
imageMinHeight number undefined Minimum markdown image render height in terminal cells.
imageMaxHeight number undefined Maximum markdown image render height in terminal cells.
imagePreserveAspectRatio boolean true Preserves markdown image aspect ratio while fitting width and height bounds.
mathImages boolean true Renders markdown math as terminal graphics images when the terminal supports it.
mathCellWidthPx number undefined Terminal cell width in pixels used to map rendered formulas to cells.
mathCellHeightPx number undefined Terminal cell height in pixels used to map rendered formulas to cells.
mathScale number undefined Rasterization DPI scale for rendered formulas (does not change cell size).
mathColor string undefined Hex color used for rendered formula glyphs; defaults to the text foreground.
mathMaxWidthCells number undefined Maximum width in terminal cells for block-level formulas before they are scaled down.
mathBaselineRatio number undefined Inline formula baseline position as a fraction of cell height, used to align formulas with text.
imageActions boolean false Enables pointer actions for rendered markdown images.
mathActions boolean false Enables pointer actions for rendered or raw markdown math syntax.
linkActions boolean false Enables pointer actions for rendered markdown links.
imageOcclusionRects readonly Rect[] undefined Terminal rectangles that markdown image layout treats as unavailable for graphics placement.

Events

名称 Payload 说明
imageAction TuiMarkdownImageActionPayload Emitted when imageActions is enabled and a markdown image action is selected.
mathAction TuiMarkdownMathActionPayload Emitted when mathActions is enabled and a markdown math action is selected.
linkAction TuiMarkdownLinkActionPayload Emitted when linkActions is enabled and a markdown link action is selected.

TMermaid

源码:src/vue/components/TMermaidText.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number undefined
zIndex number 0
content string ""
code string undefined
style Style undefined
loadingStyle Style undefined
errorStyle Style undefined
clear boolean true
final boolean true
streaming boolean false
ascii boolean false
paddingX number undefined
paddingY number undefined
boxBorderPadding number undefined
options TMermaidAsciiOptions undefined
renderer TMermaidRenderer undefined
isTransientError TMermaidTransientErrorClassifier undefined
shouldRenderSource TMermaidRenderEligibility undefined
loadingText string "Rendering Mermaid diagram..."
incompleteText string "Waiting for complete Mermaid diagram..."
missingDependencyText string "Install the Mermaid renderer package and use TMermaidText from @simon_he/vue...
errorText string "Mermaid render failed"
showErrorDetails boolean true
box boolean true
title string "mermaid"
copyButton boolean true
copyText string "copy"
copiedText string "copied"
renderTimeoutMs number DEFAULT_MERMAID_RENDER_TIMEOUT_MS
maxRenderSourceChars number DEFAULT_MERMAID_MAX_RENDER_SOURCE_CHARS
maxRenderSourceLines number DEFAULT_MERMAID_MAX_RENDER_SOURCE_LINES
copiedDurationMs number DEFAULT_MERMAID_COPIED_DURATION_MS

Events

名称 Payload 说明
copy TMermaidCopyPayload

TMermaidText

源码:src/vue/components/TMermaidText.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number undefined
zIndex number 0
content string ""
code string undefined
style Style undefined
loadingStyle Style undefined
errorStyle Style undefined
clear boolean true
final boolean true
streaming boolean false
ascii boolean false
paddingX number undefined
paddingY number undefined
boxBorderPadding number undefined
options TMermaidAsciiOptions undefined
renderer TMermaidRenderer undefined
isTransientError TMermaidTransientErrorClassifier undefined
shouldRenderSource TMermaidRenderEligibility undefined
loadingText string "Rendering Mermaid diagram..."
incompleteText string "Waiting for complete Mermaid diagram..."
missingDependencyText string "Install the Mermaid renderer package and use TMermaidText from @simon_he/vue...
errorText string "Mermaid render failed"
showErrorDetails boolean true
box boolean true
title string "mermaid"
copyButton boolean true
copyText string "copy"
copiedText string "copied"
renderTimeoutMs number DEFAULT_MERMAID_RENDER_TIMEOUT_MS
maxRenderSourceChars number DEFAULT_MERMAID_MAX_RENDER_SOURCE_CHARS
maxRenderSourceLines number DEFAULT_MERMAID_MAX_RENDER_SOURCE_LINES
copiedDurationMs number DEFAULT_MERMAID_COPIED_DURATION_MS

Events

名称 Payload 说明
copy TMermaidCopyPayload

TMultilineModal

源码:src/vue/components/TMultilineModal.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
visible boolean
content string
title string "Multiline Text"
style Style undefined
zIndex number 1000

Events

名称 Payload 说明
close

TPasswordInput

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number 1 Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
modelValue string Controlled component value.
placeholder string "" Placeholder text shown when the input is empty.
style Style undefined Base terminal cell style override.
autoFocus boolean false Requests focus when the component becomes visible.

Events

名称 Payload 说明
update:modelValue string Emitted when the controlled model value changes.
input string Emitted for input edits.
change string Emitted when the component commits a value change.

TPathPicker

源码:src/vue/components/TPathPicker.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
workspace string
mode PathPickMode "any"
modelValue string
placeholder string ""
style Style undefined
inputStyle Style undefined
activeStyle Style undefined
matchStyle Style undefined
autoFocus boolean false
showHidden boolean false
maxSuggestions number 50
provider PathPickerProvider undefined

Events

名称 Payload 说明
update:modelValue
select
invalid
keydown
focus
blur

TPieChart

源码:src/vue/components/TCharts.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0
values readonly number[] Segment values rendered clockwise from the top.
labels readonly string[] undefined Labels aligned with segment values and shown in the legend.
style Style undefined
segmentStyles readonly Style[] () => DEFAULT_PIE_SEGMENT_STYLES Segment styles cycled when there are more segments than styles.
cell string "█" Glyph used for filled pie cells.
showLegend boolean true Whether to render a label/value/percent legend when there is enough space.
legendStyle Style () => ({ fg: "whiteBright" }) Style used for legend text.

Events

TPopover

源码:src/vue/components/TOverlay.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
modelValue boolean
x number Caller-owned x position; no viewport clamp or flip placement is applied.
y number Caller-owned y position; no viewport clamp or flip placement is applied.
w number
h number
zIndex number 15
title string ""
content string ""
style Style undefined
contentStyle Style undefined

Events

TProgress

源码:src/vue/components/TFeedback.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
zIndex number 0
value number
max number 100
label string ""
showPercent boolean true
style Style undefined
barStyle Style undefined

Events

TRadioGroup

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
modelValue string "" Controlled component value.
options readonly TRadioOption[] Options rendered by the control.
style Style undefined Base terminal cell style override.
activeStyle Style () => ({ inverse: true }) Style used for the active item or row.
disabledStyle Style () => ({ dim: true }) Style used for disabled content.

Events

名称 Payload 说明
update:modelValue string Emitted when the controlled model value changes.
change string Emitted when the component commits a value change.

TRenderLayer

源码:src/vue/components/TRenderLayer.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
zIndex number 0

Events

TRenderPlane

源码:src/vue/components/TRenderPlane.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
plane TerminalRenderPlane "default"

Events

TRouterView

源码:src/vue/router/RouterView.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
routes TerminalRouteRecord[]
forceRemount boolean true

Events

TSelect

源码:src/vue/components/TSelect.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
options readonly SelectOption[] () => [] Options rendered by the control.
optionProvider TSelectOptionProvider undefined Async option provider called with the current query and an AbortSignal for stale requests.
query string undefined Search query used by filtering or async providers.
modelValue TSelectModelValue 0 Controlled component value.
valueMode TSelectValueMode "index" Model value shape emitted by the select v-model.
activeIndex number undefined Controlled active option index.
multiple boolean false Enables multi-select mode.
multipleEmit TSelectMultipleEmitMode "label" Payload shape used by multi-select change and confirm events: "label" emits labels, "value" emits option values, "index" emits indices, and "both" emits an object payload.
style Style undefined Base terminal cell style override.
highlightStyle Style undefined Style used for the highlighted row or match.
matchStyle Style undefined Style used for matched text.
highlightMatchStyle Style undefined Style used for highlighted text while the row is active.
autoFocus boolean false Requests focus when the component becomes visible.
closeOnBlur boolean false Emits close when focus leaves the component.
searchable boolean false Emits query updates from typed characters; local options are not filtered automatically.
typeahead boolean true Enables keyboard typeahead navigation.
debounce number 0 Delay before calling an async provider, in milliseconds.
emptyText string "No options" Text rendered when there are no rows or items.
loading boolean false Shows the loading row; true also covers pending async option providers.
loadingText string "Loading..." Text rendered while async loading is pending.
errorText string "Unable to load options" Text rendered when async loading fails.
maxVisible number undefined Maximum number of option rows rendered at once.

Events

名称 Payload 说明
update:modelValue number | number[] | string | string[] | unknown | unknown[] | SelectOption | SelectOption[] Emitted when the controlled model value changes.
update:activeIndex number Emitted when the active option index changes.
update:query string Emitted when the controlled query changes.
change string | string[] | unknown[] | number[] | TSelectMultipleChangePayload | null For single select, emits the selected option label or null; valueMode only affects update:modelValue. For multiple select, the payload follows multipleEmit.
confirm string[] | unknown[] | number[] | TSelectMultipleChangePayload Emitted when multi-select commits the current selection.
close void Emitted when the component requests to close.
focus void Emitted when the component receives focus.
blur void Emitted when the component loses focus.
keydown TerminalKeyboardEvent Emitted for keydown events.
loadError { query: string; error: unknown } Emitted when the async option provider rejects; aborted stale requests do not emit.

TSlider

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
modelValue number 0 Controlled component value.
min number 0 Minimum numeric value.
max number 100 Maximum numeric value.
step number 1 Keyboard increment step.
disabled boolean false Disables pointer and keyboard activation.
style Style undefined Base terminal cell style override.
activeStyle Style () => ({ fg: "cyanBright" }) Style used for the active item or row.
disabledStyle Style () => ({ dim: true }) Style used for disabled content.

Events

名称 Payload 说明
update:modelValue number Emitted when the controlled model value changes.
change number Emitted when the component commits a value change.

TSpinner

源码:src/vue/components/TFeedback.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number undefined
zIndex number 0
frames readonly string[] () => ["|", "/", "-", "\"]
frameIndex number 0
label string ""
running boolean true
style Style undefined

Events

TSplitPane

源码:src/vue/components/TPanels.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
direction TSplitPaneDirection "horizontal"
sizes readonly number[]
minSizes readonly number[] () => []
separatorStyle Style () => ({ dim: true })

Events

名称 Payload 说明
update:sizes number[]
resize number[]

Slots

名称 Props 说明
default { panes: readonly TSplitPaneRect[] } Pane content renderer. The host renders pane children from the resolved pane rectangles.

TStatusBar

源码:src/vue/components/TNavigation.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
zIndex number 0
left string ""
center string ""
right string ""
style Style () => ({ inverse: true })

Events

TSwitch

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
modelValue boolean false Controlled component value.
label string "" Visible label text.
disabled boolean false Disables pointer and keyboard activation.
style Style undefined Base terminal cell style override.
activeStyle Style () => ({ fg: "greenBright" }) Style used for the active item or row.
disabledStyle Style () => ({ dim: true }) Style used for disabled content.

Events

名称 Payload 说明
update:modelValue boolean Emitted when the controlled model value changes.
change boolean Emitted when the component commits a value change.

TTable

源码:src/vue/components/TTable.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
columns readonly TTableColumn[] Table column definitions.
rows readonly TTableRow[] Rows are rendered from the top of the current viewport; TTable does not own
scrollTop or virtualization.
rowKey string | ((row: TTableRow, index: number) => unknown) undefined Row key field or resolver.
selectedRowKey unknown undefined Controlled selected row key.
selectedRowKeys readonly unknown[] undefined Controlled selected row keys for multi-select tables.
activeRowKey unknown undefined Controlled active row key.
border boolean false Draws a border around the component.
header boolean true Shows the table header when enabled.
style Style undefined Base terminal cell style override.
headerStyle Style undefined Style override for table header cells.
borderStyle Style undefined Style override for border cells.
selectedStyle Style undefined Style used for selected rows or nodes.
activeStyle Style undefined Style used for the active item or row.
emptyText string "No rows" Text rendered when there are no rows or items.
headerFocusable boolean false Makes header cells keyboard focusable.
rowFocusable boolean false Makes body rows keyboard focusable.

Events

名称 Payload 说明
rowClick TTableRowClickPayload Emitted when a table row is clicked or confirmed.
headerClick TTableHeaderClickPayload Emitted when a table header is clicked or confirmed.
rowKeydown TTableRowKeydownPayload Emitted when a focused table row receives a keydown event.

TTabs

源码:src/vue/components/TPanels.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number
y number
w number
zIndex number 0
items readonly TTabsItem[]
activeKey string
style Style undefined
activeStyle Style () => ({ inverse: true })
disabledStyle Style () => ({ dim: true })

Events

名称 Payload 说明
update:activeKey string
change TTabsItem

TTag

源码:src/vue/components/TFeedback.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number undefined Width in terminal cells.
label string Visible label text.
tone TFeedbackTone "default" Semantic color tone.
zIndex number 0 Render and event ordering within the current plane.
style Style undefined Base terminal cell style override.

Events

TText

源码:src/vue/components/TText.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
value string Text content rendered into terminal cells.
w number undefined Width in terminal cells.
h number undefined Height in terminal cells.
style Style undefined Base terminal cell style override.
clear boolean true Clears the component rectangle before drawing content.
wrap boolean false Wraps text to the available cell width.
depsKey unknown undefined Optional key that participates in render-node dependency tracking.
Useful for forcing a repaint when the rendered output might change
even if value, style, and geometry are unchanged (e.g. external
terminal writes or higher-level virtualized row reuse).

Events

TThinkingView

源码:src/vue/components/TThinkingView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number undefined
zIndex number 0
title string "Thinking"
content string ""
collapsed boolean false
pulseFrame number | null null
style Style undefined
headerStyle Style () => DEFAULT_HEADER_STYLE
markerStyle Style undefined
titleStyle Style undefined
bodyStyle Style () => DEFAULT_BODY_STYLE
focusable boolean false
selectable boolean undefined

Events

名称 Payload 说明
click
toggle

TToastViewport

源码:src/vue/components/TFeedback.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
x number 0 Fallback placement viewport x when no parent clip rect is available.
y number 0 Fallback placement viewport y when no parent clip rect is available.
offsetX number 0
offsetY number 0
w number Toast item width in terminal cells.
viewportW number undefined Placement viewport width when no parent clip rect is available.
viewportH number undefined Placement viewport height when no parent clip rect is available.
zIndex number 40
max number 3
placement "top-right" | "top-left" | "bottom-right" | "bottom-left" "top-right"
items readonly TToastItem[]
style Style undefined

Events

名称 Payload 说明
dismiss string

TToolCallView

源码:src/vue/components/TToolCallView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number undefined
zIndex number 0
title string
collapsed boolean false
status TToolCallStatus "pending"
suffix string ""
preview string ""
nested boolean false
selected boolean false
markerCollapsed string "▸"
markerExpanded string "▾"
statusDot string "●"
previewPrefix string " ⎿ "
style Style undefined
mutedStyle Style undefined
headerStyle Style undefined
collapsedStyle Style undefined
expandedStyle Style undefined
markerStyle Style undefined
statusStyle Style undefined
titleStyle Style undefined
suffixStyle Style undefined
previewStyle Style undefined
focusable boolean false
selectable boolean undefined

Events

名称 Payload 说明
click
toggle

TToolLogView

源码:src/vue/components/TLogView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
source TLogDataSource
version number
scrollTop number undefined
defaultScrollTop number undefined
style Style undefined
autoFocus boolean false
selectable boolean true
autoStickToBottom boolean true
overscan number 2
wrap boolean false
visualIndexMode "estimated" | "exact" "estimated"
visualIndexOptions TLogViewVisualIndexOptions undefined
ansi boolean false
links boolean false Parses OSC8 links only with ansi=true; OSC8 links preserve parsed ANSI style and
do not inherit TLink theme defaults.
linkify boolean | TLinkifyOptions false Plain-text URL linkification for ansi=false rows; generated links inherit TLink
theme defaults before linkStyle.
linkStyle Style undefined Link style override. OSC8 defaults to underline-only over parsed ANSI style;
linkify also inherits TLink theme defaults.
keyboardLinks boolean false
linkFocusStyle Style () => ({ inverse: true })
searchQuery string ""
searchOptions TLogViewSearchOptions undefined
highlightMatches boolean true
matchStyle Style () => ({ inverse: true })
currentMatchStyle Style () => ({ inverse: true, bold: true })
rowScrollMode RowScrollMode "off"

Events

名称 Payload 说明
scroll
update:scrollTop
update:searchQuery
search
searchMatch
searchMarkers
linkClick
linkFocus
linkActivate
visualIndex
focus
blur
keydown

TTooltip

源码:src/vue/components/TOverlay.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
modelValue boolean true
x number
y number
w number undefined
zIndex number 30
content string
style Style () => ({ inverse: true })

Events

TTranscriptView

源码:src/vue/components/TTranscriptView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
source TTranscriptDataSource
version number
scrollTop number undefined
defaultScrollTop number 0
autoStickToBottom boolean false
selectable boolean true
wrap boolean false
style Style undefined
hoverStyle Style undefined
focusStyle Style undefined
autoFocus boolean false
focusable boolean true
wheelScroll boolean true
keyboardRegions boolean true
rowScrollMode RowScrollMode "unsafe-full-row"

Events

名称 Payload 说明
scroll
update:scrollTop
rowClick
actionClick
linkClick
foldToggle
toolClick
hoverRegion

TTransition

源码:src/vue/components/TTransition.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props

名称 类型 默认值 必填 说明
show boolean
duration number 200
beforeEnter TransitionHook undefined
enter TransitionHook undefined
afterEnter TransitionHook undefined
beforeLeave TransitionHook undefined
leave TransitionHook undefined
afterLeave TransitionHook undefined

Events

TTree

源码:src/vue/components/TTree.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
nodes readonly TTreeNode[] Tree nodes.
expandedIds readonly string[] () => [] Controlled expanded tree node ids.
selectedId string "" Controlled selected tree node id.
style Style undefined Base terminal cell style override.
selectedStyle Style () => ({ inverse: true }) Style used for selected rows or nodes.
disabledStyle Style () => ({ dim: true }) Style used for disabled content.
indent number 2 Indent width per tree depth.
selectableParents boolean false Allows expandable parent tree nodes to be selected from their label.

Events

名称 Payload 说明
update:expandedIds string[] Emitted when expanded tree node ids change.
update:selectedId string Emitted when the selected tree node id changes.
select TTreeSelectPayload Emitted when the active item is selected.
toggle TTreeTogglePayload Emitted when a tree node expands or collapses.

TUserMessageView

源码:src/vue/components/TUserMessageView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number undefined
zIndex number 0
label string "user"
prefix string "> "
meta string ""
content string
indent number 2
topBlank boolean true
bottomBlank boolean true
segments readonly TUserMessageSegment[] () => []
style Style () => DEFAULT_BLOCK_STYLE
headerStyle Style () => DEFAULT_HEADER_STYLE
prefixStyle Style () => DEFAULT_LABEL_STYLE
labelStyle Style () => DEFAULT_LABEL_STYLE
contentStyle Style undefined
segmentStyle Style () => DEFAULT_SEGMENT_STYLE
focusable boolean false
selectable boolean undefined

Events

TVideo

源码:src/vue/components/TVideo.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
src string
frameSource TVideoFrameSource
paused boolean undefined
playbackRate TVideoPlaybackRate undefined
controls boolean false
controlsLayout TVideoControlsLayout "compact"
durationMs number undefined
loop boolean false
maxFps number DEFAULT_MAX_FPS
pixelWidth number undefined
pixelHeight number undefined
fallback string "[video]"
style Style undefined
clear boolean true

Events

名称 Payload 说明
frame TVideoFrameEvent
ended
error unknown
seek TVideoSeekEvent
update:paused boolean
update:playbackRate TVideoPlaybackRate

TView

源码:src/vue/components/TView.ts

API maturity: Public

Import: @simon_he/vue-tui

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
scrollX number 0 Horizontal content offset in terminal cells.
scrollY number 0 Vertical content offset in terminal cells.
focusable boolean false Adds the component to keyboard focus navigation.
selectable boolean undefined Controls whether terminal text selection may start inside the view.
selectionScrollBy (deltaRows: number) => boolean | void undefined Scroll callback used while a pointer selection reaches the viewport edge.
autoFocus boolean false Requests focus when the component becomes visible.

Events

名称 Payload 说明
clickCapture TerminalPointerEvent Emitted for click events. Runs during capture.
click TerminalPointerEvent Emitted for click events.
dblclickCapture TerminalPointerEvent Emitted for double-click events. Runs during capture.
dblclick TerminalPointerEvent Emitted for double-click events.
pointerdownCapture TerminalPointerEvent Emitted for pointer down events. Runs during capture.
pointerdown TerminalPointerEvent Emitted for pointer down events.
pointerupCapture TerminalPointerEvent Emitted for pointer up events. Runs during capture.
pointerup TerminalPointerEvent Emitted for pointer up events.
pointermoveCapture TerminalPointerEvent Emitted for pointer move events. Runs during capture.
pointermove TerminalPointerEvent Emitted for pointer move events.
pointerenterCapture TerminalPointerEvent Emitted when the pointer enters the component. Runs during capture.
pointerenter TerminalPointerEvent Emitted when the pointer enters the component.
pointerleaveCapture TerminalPointerEvent Emitted when the pointer leaves the component. Runs during capture.
pointerleave TerminalPointerEvent Emitted when the pointer leaves the component.
wheelCapture TerminalPointerEvent Emitted for wheel events. Runs during capture.
wheel TerminalPointerEvent Emitted for wheel events.
keydownCapture TerminalKeyboardEvent Emitted for keydown events. Runs during capture.
keydown TerminalKeyboardEvent Emitted for keydown events.
keyupCapture TerminalKeyboardEvent Emitted for keyup events. Runs during capture.
keyup TerminalKeyboardEvent Emitted for keyup events.
focusCapture void Emitted when the component receives focus. Runs during capture.
focus void Emitted when the component receives focus.
blurCapture void Emitted when the component loses focus. Runs during capture.
blur void Emitted when the component loses focus.

Slots

名称 Props 说明
default Children rendered with this view's layout origin, clip rect, render stack, and event z-index context.

TVirtualList

源码:src/vue/components/TVirtualList.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props

名称 类型 默认值 必填 说明
x number
y number
w number
h number
zIndex number 0
itemCount number
itemVersion number
getItem (index: number) => unknown
renderItem (item: unknown, index: number) => unknown undefined
modelValue number 0
scrollTop number undefined
style Style undefined
activeStyle Style undefined
autoFocus boolean false
selectionText (item: unknown, index: number) => string undefined
selectable boolean false
rowScrollMode RowScrollMode "off"
terminalGraphicScrollIdleMs number 96

Events

名称 Payload 说明
update:modelValue
update:scrollTop
change
itemClick
scroll
focus
blur
keydown

TVirtualMarkdown

源码:src/vue/components/TVirtualMarkdown.ts

API maturity: Public

Import: @simon_he/vue-tui/markdown

Props

名称 类型 默认值 必填 说明
x number Left position in terminal cells.
y number Top position in terminal cells.
w number Width in terminal cells.
h number Height in terminal cells.
zIndex number 0 Render and event ordering within the current plane.
content string "" Markdown source rendered when external blocks are not provided.
blocks readonly TuiMarkdownBlock[] undefined Prebuilt markdown blocks used instead of parsing content.
scrollTop number 0 Controlled top visual-row offset within the markdown viewport.
style Style undefined Base terminal cell style override.
final boolean true Parses the markdown as a complete document when enabled.
streaming boolean false Coalesces rapid content updates into frame-scheduled markdown rebuilds.
autoFocus boolean false Requests focus when the component becomes visible.
selectable boolean true Controls whether native terminal text selection may start inside the markdown viewport.
customHtmlTags readonly string[] undefined Additional HTML tag names accepted by the markdown parser.
theme TuiMarkdownThemeOverrides undefined Markdown theme token overrides for parsed blocks and inline segments.
imageRenderer TuiMarkdownImageResolver undefined Optional resolver for markdown image payloads before terminal graphics rendering.
imageMinWidth number undefined Minimum markdown image render width in terminal cells.
imageMaxWidth number undefined Maximum markdown image render width in terminal cells.
imageMinHeight number undefined Minimum markdown image render height in terminal cells.
imageMaxHeight number undefined Maximum markdown image render height in terminal cells.
imagePreserveAspectRatio boolean true Preserves markdown image aspect ratio while fitting width and height bounds.
mathImages boolean true Renders markdown math as terminal graphics images when the terminal supports it.
mathCellWidthPx number undefined Terminal cell width in pixels used to map rendered formulas to cells.
mathCellHeightPx number undefined Terminal cell height in pixels used to map rendered formulas to cells.
mathScale number undefined Rasterization DPI scale for rendered formulas (does not change cell size).
mathColor string undefined Hex color used for rendered formula glyphs; defaults to the text foreground.
mathMaxWidthCells number undefined Maximum width in terminal cells for block-level formulas before they are scaled down.
mathBaselineRatio number undefined Inline formula baseline position as a fraction of cell height, used to align formulas with text.
imageActions boolean false Enables pointer actions for rendered markdown images.
mathActions boolean false Enables pointer actions for rendered or raw markdown math syntax.
linkActions boolean false Enables pointer actions for rendered markdown links.
imageOcclusionRects readonly Rect[] undefined Terminal rectangles that markdown image layout treats as unavailable for graphics placement.
rowScrollMode TVirtualRowsRowScrollMode "off" Enables exposed-row scrolling for an unclipped full-width viewport that exclusively owns its render-plane rows when set to "unsafe-full-row".

Events

名称 Payload 说明
update:scrollTop number Emitted when the top visible row offset should change.
scroll number Emitted when the visible scroll offset changes.
focus void Emitted when the component receives focus.
blur void Emitted when the component loses focus.
keydown TerminalKeyboardEvent Emitted for keydown events.
imageAction TuiMarkdownImageActionPayload Emitted when imageActions is enabled and a markdown image action is selected.
mathAction TuiMarkdownMathActionPayload Emitted when mathActions is enabled and a markdown math action is selected.
linkAction TuiMarkdownLinkActionPayload Emitted when linkActions is enabled and a markdown link action is selected.