所有者模板详情页或编辑弹窗当点击窗口之外的区域时实现自动关闭窗口

This commit is contained in:
jingrow 2025-08-06 17:57:35 +08:00
parent 3a1ec3c7cb
commit 0b355b12b3

View File

@ -71,8 +71,8 @@
@click="viewOwner(owner)" @click="viewOwner(owner)"
> >
<!-- 名称列 --> <!-- 名称列 -->
<div class="col-span-4"> <div class="col-span-4 flex items-center">
<div class="font-medium text-gray-900">{{ getDisplayName(owner) }}</div> <div class="text-sm text-gray-900">{{ getDisplayName(owner) }}</div>
</div> </div>
<!-- 实名状态列 --> <!-- 实名状态列 -->
@ -82,8 +82,8 @@
<!-- 联系信息列 --> <!-- 联系信息列 -->
<div class="col-span-3"> <div class="col-span-3">
<div class="text-sm text-gray-500">{{ owner.c_ph || '-' }}</div> <div class="text-sm text-gray-900">{{ owner.c_ph || '-' }}</div>
<div class="text-sm text-gray-900">{{ owner.c_em || '-' }}</div> <div class="text-sm text-gray-500">{{ owner.c_em || '-' }}</div>
</div> </div>
<!-- 操作列 --> <!-- 操作列 -->
@ -148,8 +148,8 @@
/> />
<!-- 详情查看弹窗 --> <!-- 详情查看弹窗 -->
<div v-if="showDetailDialog" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"> <div v-if="showDetailDialog" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50" @click="closeDetailDialog">
<div class="bg-white rounded-lg shadow-2xl max-w-2xl w-full mx-4 max-h-[90vh] flex flex-col overflow-hidden"> <div class="bg-white rounded-lg shadow-2xl max-w-2xl w-full mx-4 max-h-[90vh] flex flex-col overflow-hidden" @click.stop>
<!-- 标题栏 --> <!-- 标题栏 -->
<div class="p-4 border-b border-gray-200 bg-white rounded-t-lg flex-shrink-0"> <div class="p-4 border-b border-gray-200 bg-white rounded-t-lg flex-shrink-0">
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
@ -256,8 +256,8 @@
</div> </div>
<!-- 编辑域名所有者弹窗 --> <!-- 编辑域名所有者弹窗 -->
<div v-if="showEditDialog" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"> <div v-if="showEditDialog" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50" @click="closeEditDialog">
<div class="bg-white rounded-lg shadow-2xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col overflow-hidden"> <div class="bg-white rounded-lg shadow-2xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col overflow-hidden" @click.stop>
<!-- 标题栏 --> <!-- 标题栏 -->
<div class="p-4 border-b border-gray-200 bg-white rounded-t-lg flex-shrink-0"> <div class="p-4 border-b border-gray-200 bg-white rounded-t-lg flex-shrink-0">
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">