feat(ui): unify loading empty error states

This commit is contained in:
Cheng Zhou
2026-03-04 16:40:18 +08:00
parent a3036c2233
commit 5caf4c51cc
5 changed files with 83 additions and 64 deletions
+11 -12
View File
@@ -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>