Result 结果
操作结果或者异常状态做反馈。
基础用法
查看代码
vue
<template>
<demo-container>
<gov-row>
<gov-col :span="6">
<gov-result
type="success"
title="成功提示"
description="请根据提示进行操作"
/>
</gov-col>
<gov-col :span="6">
<gov-result
type="info"
title="成功提示"
description="请根据提示进行操作"
/>
</gov-col>
<gov-col :span="6">
<gov-result
type="warning"
title="成功提示"
description="请根据提示进行操作"
/>
</gov-col>
<gov-col :span="6">
<gov-result
type="danger"
title="成功提示"
description="请根据提示进行操作"
/>
</gov-col>
</gov-row>
</demo-container>
</template>
定义插槽内容
默认插槽里可以追加一些按钮等操作。
查看代码
vue
<template>
<demo-container>
<gov-result
type="success"
title="成功提示"
description="请根据提示进行操作"
>
<gov-button type="success">我知道了</gov-button>
</gov-result>
</demo-container>
</template>
Attributes
属性 | 类型 | 默认值 | 描述 |
---|---|---|---|
title | String | - | 结果标题。 |
description | String | - | 结果描述。 |
type | String | "success" | 结果类型,可选值有'success', 'info', 'warning', 'danger'。 |
Slots
Slot Name | 描述 |
---|---|
icon | 用于自定义结果图标的插槽。默认情况下,会显示与`type`对应的图标。 |
title | 用于自定义结果标题的插槽。如果未提供,则显示`title`属性的内容。 |
description | 用于自定义结果描述的插槽。如果未提供,则显示`description`属性的内容。 |
default | 用于自定义结果底部内容的插槽。只有在提供了内容时才会显示。 |