8776a9bf1e
- ElMessage.error 全收进 showAdminFeedback(例外清单 CAP=0,唯一保留的裸调用是出口本体); window.confirm 24 处全部改成 await 的 openAdminConfirm(逐处核过所在函数本就 async, 不存在"点了确认不执行"的异步断层)。 - 新增 load-failure-model + LoadFailureBar:22/23 个取数页有失败态与真重试 (只有"知道了"清条不算过),例外仅登录页。 - DedupeRegistryPage / DuplicateCheckPage 补 onUnmounted,并加全树定时器/监听配对判据。 - 去重页那处"能点但后端 403":读侧认 wholeCompany、写侧只认 groupIds/userIds 的不对称 本轮没动后端(前端拿不到与写侧同集合的 groupIds,按它置灰会误伤同事名下真能改的行=静默删功能); 先修更实在的一半——403 的中文原因此前整段丢失,现在走统一文案到界面。 - 验收:node --test 1,818 例 0 红、npx vue-tsc --noEmit rc=0;5 支新判据 26 例。
54 lines
1.6 KiB
Vue
54 lines
1.6 KiB
Vue
<script setup lang="ts">
|
|
/** 列表加载失败条(四面9分口径 · 后管「模板内失败态只有 4/24 页」)。
|
|
* 两件事一起做:把失败原因留在页面上(不是一闪而过的 toast),并给出一个真能重跑的出口。
|
|
* 重试动作由父页面传回自己的取数函数,本组件不自己发请求、也不放占位按钮。 */
|
|
import { LOAD_FAILURE_RETRY_LABEL } from './load-failure-model'
|
|
|
|
defineProps<{ message: string }>()
|
|
defineEmits<{ (event: 'retry'): void }>()
|
|
</script>
|
|
|
|
<template>
|
|
<div class="load-failure-bar" role="alert">
|
|
<span class="load-failure-bar-text">{{ message }}</span>
|
|
<button class="load-failure-bar-retry" type="button" @click="$emit('retry')">{{ LOAD_FAILURE_RETRY_LABEL }}</button>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
/* 自带样式:各页的 .btn 是 scoped 的,套不到子组件内部的元素上。 */
|
|
.load-failure-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
margin: 0 0 14px;
|
|
padding: 10px 14px;
|
|
border: 1px solid #e0bfc4;
|
|
border-radius: 10px;
|
|
background: #fdf3f4;
|
|
color: #8f4650;
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
}
|
|
.load-failure-bar-text {
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.load-failure-bar-retry {
|
|
flex: none;
|
|
min-height: 32px;
|
|
padding: 5px 14px;
|
|
border: 1px solid #b35f6a;
|
|
border-radius: 8px;
|
|
background: linear-gradient(135deg, #c06d77, #b35f6a);
|
|
color: #ffffff;
|
|
font-family: inherit;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
.load-failure-bar-retry:hover {
|
|
background: linear-gradient(135deg, #cb7c84, #b96570);
|
|
}
|
|
</style>
|