diff --git a/frontend/src/components/ModalBox.vue b/frontend/src/components/ModalBox.vue index bf426cd..9fc8590 100644 --- a/frontend/src/components/ModalBox.vue +++ b/frontend/src/components/ModalBox.vue @@ -3,18 +3,33 @@ * 通用弹窗:遮罩 + 居中面板 + 标题栏 + 底部按钮插槽 * * 用 Teleport 挂到 body,避免被列表容器的 `overflow: hidden` 裁掉。 + * + * **点遮罩默认不关闭**:弹窗里基本都在填表单/编辑内容, + * 手一滑点外面就把整屏输入丢掉太容易发生(编辑中尤其明显)。 + * 只有纯展示类弹窗(例如实时预览)才显式加 `mask-closable`。 */ -withDefaults(defineProps<{ open: boolean; title?: string; width?: string }>(), { +const props = withDefaults(defineProps<{ + open: boolean; + title?: string; + width?: string; + /** 点遮罩是否关闭(默认 false) */ + maskClosable?: boolean; +}>(), { title: '', width: '560px', + maskClosable: false, }); const emit = defineEmits<{ (e: 'close'): void }>(); + +function onMaskClick() { + if (props.maskClosable) emit('close'); +} - +
{{ previewCamera?.name || '通道 ' + previewCamera?.channelNo }} diff --git a/frontend/src/views/WorkstationsView.vue b/frontend/src/views/WorkstationsView.vue index 0892af3..215efa5 100644 --- a/frontend/src/views/WorkstationsView.vue +++ b/frontend/src/views/WorkstationsView.vue @@ -911,7 +911,7 @@ onBeforeUnmount(() => { - +
{{ previewError }}

加载布局…