组件/GuideState 引导状态
自 2.4.7BETA

GuideState 引导状态

引导场景的快捷空态组件,基于 TxEmptyState 的 `variant="guide"` 预设。

该页面由 AI 迁移生成,请谨慎使用

内容已迁移完成,但仍建议结合源码和人工评审结果使用。

GuideState 引导状态

TxGuideStateTxEmptyState 的快捷封装,自动设置 variant="guide",用于新用户引导、功能入门等场景。

基础用法

使用默认标题和描述,搭配操作按钮。

GuideState (basic)

示例即将加载...
<template>
  <TxGuideState
    :primary-action="{ label: 'Get Started', type: 'primary' }"
    :secondary-action="{ label: 'Learn More' }"
  />
</template>

自定义内容

自定义标题描述,配合 surface="card"size="large" 呈现更醒目的引导。

GuideState (custom)

示例即将加载...
<template>
  <TxGuideState
    title="Create your first workspace"
    description="Workspaces help you organize projects. Follow the steps below to begin."
    surface="card"
    size="large"
    :primary-action="{ label: 'Create Workspace', type: 'primary' }"
  />
</template>

API

TxGuideState 继承 TxEmptyState 的全部 Props(除 variant)、Slots 和 Events,详见 EmptyState

Props

属性名类型默认值说明
titlestring'Start here'标题(可覆盖)
descriptionstring'Follow the steps to get started.'描述(可覆盖)
layout'vertical' | 'horizontal''vertical'布局方向
align'start' | 'center' | 'end''center'对齐方式
size'small' | 'medium' | 'large''medium'尺寸等级
surface'plain' | 'card''plain'表面风格
primaryActionEmptyStateAction-主操作配置
secondaryActionEmptyStateAction-次操作配置

完整 Props 参考 EmptyState API

交互契约

  • TxGuideState 始终向 TxEmptyState 透传 variant="guide"
  • 组件不额外改写 titledescriptionsurfacesize 或 action 配置;显式 props 会原样透传。
  • icontitledescriptionactions 插槽会原样转发给 TxEmptyState