组件
结果 Result
Result:结果页。状态图标使用固定语义色,标题使用衬线字,补充内容提供后续操作;这些区块可以按需组合。
#基础用法
The archive holds your letter
A copy has been sealed and shelved; you will hear back once it is read.
<script setup lang="ts">
import { Button, Result } from "@bysages/vue";
</script>
<template>
<Result.Root status="success" class="w-full">
<Result.Icon />
<Result.Title>The archive holds your letter</Result.Title>
<Result.Description>
A copy has been sealed and shelved; you will hear back once it is read.
</Result.Description>
<Result.Extra>
<Button variant="solid" tone="ink" size="sm">Back to the shelf</Button>
<Button variant="ghost" tone="ink" size="sm">Write another</Button>
</Result.Extra>
</Result.Root>
</template>
#属性
#SResultRoot
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
status | String as PropType<Status> | "info" | 操作返回的状态,用固定语义色呈现 |
#SResultIcon
结果图标。它包含四种状态图标,由根节点选择;这样图标始终与根节点声明的状态一致。
纯造型的部件——自身没有属性,沿用部件结构的共享样式。
#ResultTitle
纯造型的部件——自身没有属性,沿用部件结构的共享样式。
#ResultDescription
纯造型的部件——自身没有属性,沿用部件结构的共享样式。
#ResultExtra
纯造型的部件——自身没有属性,沿用部件结构的共享样式。