Skip to content

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

属性类型默认值描述
titleString-结果标题。
descriptionString-结果描述。
typeString"success"结果类型,可选值有'success', 'info', 'warning', 'danger'。

Slots

Slot Name描述
icon用于自定义结果图标的插槽。默认情况下,会显示与`type`对应的图标。
title用于自定义结果标题的插槽。如果未提供,则显示`title`属性的内容。
description用于自定义结果描述的插槽。如果未提供,则显示`description`属性的内容。
default用于自定义结果底部内容的插槽。只有在提供了内容时才会显示。

Released under the MIT License.