fix: ban close-on-esc in modal
This commit is contained in:
@@ -163,7 +163,7 @@ const onModalClose = () => {};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NModal v-model:show="show" preset="card" style="width: 100vw; height: 100vh" :title="`${station.name} - 设备告警详情`" :mask-closable="false" @close="onModalClose">
|
||||
<NModal v-model:show="show" preset="card" style="width: 100vw; height: 100vh" :title="`${station.name} - 设备告警详情`" :close-on-esc="false" :mask-closable="false" @close="onModalClose">
|
||||
<div v-if="alarmCount === 0" style="text-align: center; padding: 20px; color: #6c757d">
|
||||
<span>当前没有设备告警</span>
|
||||
</div>
|
||||
|
||||
@@ -205,6 +205,7 @@ const { mutate: saveDeviceParams } = useMutation({
|
||||
preset="card"
|
||||
style="width: 800px; height: 600px"
|
||||
:title="`${station.name} - 设备参数配置`"
|
||||
:close-on-esc="false"
|
||||
:mask-closable="false"
|
||||
@after-enter="onAfterModalEnter"
|
||||
@before-leave="onBeforeModalLeave"
|
||||
|
||||
@@ -112,7 +112,7 @@ const onModalClose = () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NModal v-model:show="show" preset="card" style="width: 800px; height: 600px" :title="`${station.name} - 离线设备详情`" :mask-closable="false" @close="onModalClose">
|
||||
<NModal v-model:show="show" preset="card" style="width: 800px; height: 600px" :title="`${station.name} - 离线设备详情`" :close-on-esc="false" :mask-closable="false" @close="onModalClose">
|
||||
<div v-if="offlineDeviceCount === 0" style="text-align: center; padding: 20px; color: #6c757d">
|
||||
<span>当前没有离线设备</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user