feat(short-drama-agent-front): 完善主体身份骨架屏与交互反馈
This commit is contained in:
1 parent
5fa1c251a9
commit
dd0bd79a35
19 files changed
+1552
-419
No files matched your search
@@ -0,0 +1,104 @@
|
||||
<script setup lang="ts">
|
||||
import { NSkeleton } from 'naive-ui'
|
||||
|
||||
/** 身份详情占位选项。 */
|
||||
interface Props {
|
||||
/** 是否显示未知主体的标题与刷新操作占位。 */
|
||||
heading?: boolean
|
||||
}
|
||||
/** 完整工作区未知主体名称时显示标题占位,切换主体时保留真实名称。 */
|
||||
withDefaults(defineProps<Props>(), { heading: false })
|
||||
/** 占位高度对应身份描述与核心提示词的最低编辑高度。 */
|
||||
const fieldHeights = [80, 96]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 以下是主体身份步骤、编辑器、参考图操作与形态入口占位模块 -->
|
||||
<div class="identity-detail-skeleton" role="status" aria-label="正在读取主体身份内容" aria-busy="true">
|
||||
<div v-if="heading" class="identity-skeleton-row identity-skeleton-heading">
|
||||
<NSkeleton :width="120" :height="16" />
|
||||
<NSkeleton :width="56" :height="12" />
|
||||
</div>
|
||||
<div class="identity-skeleton-steps">
|
||||
<div v-for="step in 3" :key="step" class="identity-skeleton-row">
|
||||
<NSkeleton circle :width="20" :height="20" />
|
||||
<NSkeleton :width="88" :height="12" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="identity-skeleton-row identity-skeleton-next">
|
||||
<div class="identity-skeleton-copy">
|
||||
<NSkeleton :width="170" :height="14" />
|
||||
<NSkeleton :width="'min(260px, 100%)'" :height="12" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="height in fieldHeights" :key="height" class="identity-skeleton-field">
|
||||
<NSkeleton :width="70" :height="12" />
|
||||
<NSkeleton :height="height" />
|
||||
</div>
|
||||
<div class="identity-skeleton-row">
|
||||
<NSkeleton :width="16" :height="16" />
|
||||
<NSkeleton :width="96" :height="12" />
|
||||
</div>
|
||||
<div class="identity-skeleton-row identity-skeleton-save">
|
||||
<NSkeleton :width="96" :height="34" />
|
||||
<NSkeleton :width="126" :height="34" />
|
||||
</div>
|
||||
<div class="identity-skeleton-row identity-skeleton-gallery-heading">
|
||||
<NSkeleton :width="100" :height="14" />
|
||||
<NSkeleton :width="126" :height="34" />
|
||||
</div>
|
||||
<NSkeleton :height="150" />
|
||||
<div class="identity-skeleton-field">
|
||||
<NSkeleton :width="85" :height="12" />
|
||||
<div class="identity-skeleton-row">
|
||||
<NSkeleton :width="70" :height="24" />
|
||||
<NSkeleton :width="80" :height="24" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
@reference "../../../styles/styles.css";
|
||||
.identity-detail-skeleton {
|
||||
@apply flex flex-col min-w-0 gap-5;
|
||||
}
|
||||
.identity-skeleton-row {
|
||||
@apply flex min-w-0 items-center gap-3;
|
||||
}
|
||||
.identity-skeleton-row :deep(.n-skeleton) {
|
||||
@apply shrink-0 max-w-full;
|
||||
}
|
||||
.identity-skeleton-heading,
|
||||
.identity-skeleton-gallery-heading,
|
||||
.identity-skeleton-next {
|
||||
@apply justify-between flex-wrap;
|
||||
}
|
||||
.identity-skeleton-steps {
|
||||
@apply flex flex-wrap gap-x-6 gap-y-2;
|
||||
}
|
||||
.identity-skeleton-copy,
|
||||
.identity-skeleton-field {
|
||||
@apply flex flex-col min-w-0 gap-3;
|
||||
}
|
||||
.identity-skeleton-save {
|
||||
@apply flex-wrap;
|
||||
}
|
||||
.identity-detail-skeleton :deep(.n-skeleton) {
|
||||
--n-color-start: var(--app-border) !important;
|
||||
--n-color-end: var(--app-field-hover) !important;
|
||||
}
|
||||
@media (max-width: 760px) {
|
||||
.identity-skeleton-next {
|
||||
@apply items-start flex-col;
|
||||
}
|
||||
.identity-skeleton-save > :deep(.n-skeleton) {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.identity-detail-skeleton :deep(.n-skeleton) {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user