feat(ui): unify loading empty error states
This commit is contained in:
@@ -1,25 +1,24 @@
|
||||
<template>
|
||||
<div class="state state-loading">
|
||||
<el-skeleton :rows="rows" animated />
|
||||
</div>
|
||||
<section class="ctms-state ctms-state-loading state state-loading">
|
||||
<h3 class="ctms-state-title state-title">{{ title }}</h3>
|
||||
<p class="ctms-state-desc state-desc">{{ description }}</p>
|
||||
<el-skeleton :rows="rows" animated class="ctms-state-skeleton" />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { TEXT } from "../locales";
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
rows?: number;
|
||||
title?: string;
|
||||
description?: string;
|
||||
}>(),
|
||||
{
|
||||
rows: 4,
|
||||
title: TEXT.common.loading,
|
||||
description: TEXT.common.messages.loadSuccess,
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.state-loading {
|
||||
padding: 24px;
|
||||
border: 1px solid var(--ctms-border-color);
|
||||
border-radius: var(--ctms-radius);
|
||||
background-color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user