1、解决方案:
v-dialog 标签加上3个属性:
1、persistent :禁用点击窗口外的关闭事件
2、no-click-animation:禁用点击动画
3、retain-focus:取消焦点事件
2、填报弹窗基本代码:
就看 v-dialog 标签属性就行:
persistent no-click-animation :retain-focus="false"
1)完整的如下:
<v-dialog v-model="dialogVisible" max-width="50vw" persistent no-click-animation :retain-focus="false">
<v-card class="px-5 pt-2 pb-5">
<!-- form表头 -->
<v-card-title class="d-flex align-center px-0">
{{ formData.id ? '编辑 登录日志' : '新增 登录日志' }}
<v-spacer></v-spacer>
<v-btn icon="mdi-close" @click="dialogVisible = false" flat size="small"></v-btn>
</v-card-title>
<!-- form -->
<v-form ref="formRef" class="my-4">
<v-row>
<v-col cols="3">
<label><span class="text-error">*</span>操作时间:</label>
</v-col>
<v-col cols="8">
<el-date-picker v-model="formData.time" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" />
</v-col>
</v-row>
</v-form>
<!-- form bottom 按钮 -->
<template #actions>
<v-spacer></v-spacer>
<v-btn color="primary" variant="flat" :disabled="formLoading" @click="submitForm" flat size="large">
确定
</v-btn>
<v-btn color="secondary" variant="outlined" @click="dialogVisible = false" flat size="large"> 取消</v-btn>
</template>
</v-card>
</v-dialog>