vuetify3 弹窗中使用 element-plus 时间控件异常解决

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>
相关推荐
533_1 天前
[vue3] h函数,阻止事件冒泡
javascript·vue.js·elementui
Jeffrey__Lin2 天前
解决Grid布局下el-table自适应缩小失败的问题
vue.js·elementui·html
天天向上10245 天前
在 Vue3 项目中使用 el-tree
javascript·vue.js·elementui
天天向上10245 天前
vue2 vue3 修改elementUI和elementPlus主题颜色
前端·javascript·elementui
D_C_tyu7 天前
Vue3 + Element Plus 实现前端手动分页
javascript·vue.js·elementui
星光一影7 天前
供应链进销存源码uniapp全开源ERP多仓库管理系统pc+app手机端
mysql·elementui·uni-app·开源·php·phpstorm·1024程序员节
xu_duo_i7 天前
vue2+elementUI后端返回二进制流,前端下载实现
前端·javascript·elementui
我家媳妇儿萌哒哒8 天前
Vue2 elementUI年份区间选择组件
前端·javascript·elementui
asdfsdgss8 天前
Axure 组件不用手绘:ElementUI/Plus 元件库 + 大厂规范现成资源
elementui·axure·photoshop
Joker`s smile8 天前
vue + elementUI 实现特殊字符(上标、下标、特殊符号等)输入框
vue.js·elementui·特殊字符·unicode字符·上标·下标