完成 result 组件
This commit is contained in:
@@ -9,4 +9,4 @@
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
padding: 0 15px;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
.layui-nav .layui-show.layui-anim-upbit .layui-show.layui-anim-upbit {
|
||||
top: 0px;
|
||||
left: 106px;
|
||||
left: 94px;
|
||||
}
|
||||
|
||||
.layui-nav .layui-show.layui-anim-upbit .layui-nav-item {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
margin-top: 40px;
|
||||
|
||||
}
|
||||
.result .error svg {
|
||||
.result .failure svg {
|
||||
color: #f56c6c;
|
||||
text-align: center;
|
||||
margin-top: 40px;
|
||||
@@ -29,7 +29,6 @@
|
||||
width: 80%;
|
||||
border-radius: 10px;
|
||||
background-color: whitesmoke;
|
||||
height: 200px;
|
||||
margin-left: 10%;
|
||||
}
|
||||
.result .action {
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "LayResult"
|
||||
}
|
||||
name: "LayResult",
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import "./index.less"
|
||||
import "./index.less";
|
||||
import { defineProps, useSlots } from "vue";
|
||||
|
||||
export interface LayResultProps {
|
||||
title?: string,
|
||||
status?: 'success' | 'failure',
|
||||
describe?: string
|
||||
title?: string;
|
||||
status?: "success" | "failure";
|
||||
describe?: string;
|
||||
}
|
||||
|
||||
const slots = useSlots();
|
||||
|
||||
const props = withDefaults(defineProps<LayResultProps>(), {
|
||||
title: "Exception",
|
||||
describe: "describe"
|
||||
title: "提交信息",
|
||||
status: "success",
|
||||
describe: "请核对并修改以下信息后,再重新提交。",
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="result">
|
||||
<div class="error">
|
||||
<div :class="[status]">
|
||||
<svg
|
||||
v-if="status === 'failure'"
|
||||
viewBox="64 64 896 896"
|
||||
data-icon="close-circle"
|
||||
width="80px"
|
||||
@@ -42,18 +44,35 @@ const props = withDefaults(defineProps<LayResultProps>(), {
|
||||
d="M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
></path>
|
||||
</svg>
|
||||
|
||||
<svg
|
||||
v-else
|
||||
viewBox="64 64 896 896"
|
||||
data-icon="check-circle"
|
||||
width="80px"
|
||||
height="80px"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
class=""
|
||||
>
|
||||
<path
|
||||
d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0 0 51.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"
|
||||
></path>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h2 class="title">提交失败</h2>
|
||||
<h2 class="title">{{ title }}</h2>
|
||||
<p class="desc">
|
||||
请核对并修改以下信息后,再重新提交。如果仅是简单操作,使用 Message
|
||||
全局提示反馈即可。 本文字区域可以展示简单的补充说明,如果有类似展示
|
||||
“单据”的需求,下面这个灰色区域可以呈现比较复杂的内容。
|
||||
{{ describe }}
|
||||
</p>
|
||||
<div class="content"></div>
|
||||
<div class="content">
|
||||
<slot name="content"></slot>
|
||||
</div>
|
||||
<div class="action">
|
||||
<lay-button>返回修改</lay-button>
|
||||
|
||||
<lay-button type="primary">返回首页</lay-button>
|
||||
<slot name="action"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user