Files
DevFlow/src/components/ConfirmDialog.vue
绝尘 cf017f81e2 新增: Phase2 阶段收尾(Sprint 1-20)
重构:删 5 零引用 crate(df-evolve/plugin/stages/task/traceability)+ 清死模块、ai.rs 拆 11 子 module、ai.ts 拆 6 composable、i18n 拆目录
功能:知识库全栈(df-project/scan + CRUD + 时间线 + 前端)、Settings 拆分、appSettings KV 迁移、模型池、LLM 并发 Semaphore
修复:审批持久化根治、ConditionEngine 默认拒绝、NodeRegistry unimplemented 清除、promote 补偿删除、工具结果截断 50KB、路径校验防 symlink 逃逸
文档:B-03 人工审批设计、决策记录三分档、规格契约自检、经验记录、todo 看板、PROGRESS 更新

详见 PROGRESS.md。src-tauri/儿童每日打卡应用/ 与本项目无关,已排除。
2026-06-14 14:08:20 +08:00

97 lines
2.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<!-- 自建确认弹层替代 window.confirm后者在 Tauri webview localhost:port 来源信息无法去除
组件自包含按钮样式内联不依赖外部 .btn-*便于在任何视图复用 -->
<Transition name="confirm">
<div v-if="visible" class="confirm-mask" @click.self="$emit('result', false)">
<div class="confirm-box">
<div class="confirm-msg">{{ msg }}</div>
<div class="confirm-actions">
<button class="confirm-btn confirm-btn--cancel" @click="$emit('result', false)">{{ $t('common.cancel') }}</button>
<button class="confirm-btn confirm-btn--danger" @click="$emit('result', true)">{{ dangerLabel || $t('common.delete') }}</button>
</div>
</div>
</div>
</Transition>
</template>
<script setup lang="ts">
withDefaults(defineProps<{
visible: boolean
msg: string
/** 危险按钮文案;不传则回退到 common.delete(随语言切换) */
dangerLabel?: string
}>(), {
dangerLabel: '',
})
defineEmits<{
result: [ok: boolean]
}>()
</script>
<style scoped>
.confirm-mask {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.confirm-box {
background: var(--df-bg-card, #fff);
border: 0.5px solid var(--df-border, #ddd);
border-radius: var(--df-radius-lg, 8px);
padding: 20px 24px;
min-width: 280px;
max-width: 360px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.confirm-msg {
font-size: 13px;
color: var(--df-text, #333);
line-height: 1.5;
margin-bottom: 16px;
}
.confirm-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
.confirm-btn {
padding: 5px 14px;
font-size: 12px;
font-weight: 500;
font-family: var(--df-font-sans);
border-radius: var(--df-radius-sm, 4px);
border: 0.5px solid var(--df-border, #ddd);
cursor: pointer;
transition: all 0.15s;
}
.confirm-btn--cancel {
background: transparent;
color: var(--df-text-dim, #888);
}
.confirm-btn--cancel:hover {
background: var(--df-bg-card-hover, #f0f0f0);
color: var(--df-text, #333);
}
.confirm-btn--danger {
background: var(--df-danger, #e5484d);
color: #fff;
border-color: var(--df-danger, #e5484d);
}
.confirm-btn--danger:hover {
filter: brightness(1.1);
}
.confirm-enter-active,
.confirm-leave-active {
transition: opacity 0.15s;
}
.confirm-enter-from,
.confirm-leave-to {
opacity: 0;
}
</style>