当前位置:网站首页>runtime-core.esm-bundler.js?d2dd:218 Uncaught TypeError: formRef.value?.validate is not a function
runtime-core.esm-bundler.js?d2dd:218 Uncaught TypeError: formRef.value?.validate is not a function
2022-08-10 10:23:00 【要成为光的女人】
1.vue3 使用 elemetPlus 组件,写表单验证时,在setup 里面也登录验证方法时,我们拿到了组件对象,但是在调用这个组件对象的的属性方法时,发现控制台打印的 这个方法无效。写在网上查找了许多方案也未得到解决。网上大部分都是vue2 使用解决方案。
后来找了好友圈的一个大佬也是研究半天得以解决,
解决方案:
1.利用vue 里面有个函数,利用这个函数将这个登录验证方法暴露出去
之前我们是这么写的:控制台打印并没有这个属性和方法,
解决代码如下:
猜想可能是elementplus只兼容script setup 的原因。
边栏推荐
- PTA 7-2 方阵对角线元素求和及计数 题解
- bus事件总线 使用
- 2022.8.8-----leetcode.761
- [C language] Header file #include
, conio is Console Input/Output (console input and output) - OSSCore 开源解决方案介绍
- 关于json转换器缺失的问题,报错内容:No converter found for return value of type
- 序列化技术ProtoBuf
- LiveGBS操作日志页面快速的筛选上级平台的调用记录直播观看录像回看等操作
- ECCV 2022 | 视频理解新框架X-CLIP:仅用微调的成本,达到预训练的全能
- "Scalability" extensibility best practices: lessons from eBay
猜你喜欢
随机推荐
bus event bus use
LeetCode Algorithm 914. 卡牌分组
商城限时秒杀功能系统
「第二部:容器和微服务架构」(1) 基于容器应用架构设计原则
OSSCore 开源解决方案介绍
14 high-frequency handwritten JS interview questions and answers to consolidate your JS foundation
Swin Transformer作者曹越加入智源,开展视觉基础模型研究
用.bat文件做Airtest脚本的多设备批量运行
兼容移动和PC的loading加载和toast消息插件
[C language] Header file #include
, conio is Console Input/Output (console input and output) 网络安全笔记5——数字签名
ESP8266 教程2 — 烧录AT固件
2022.8.9-----leetcode.1413
dedecms supports one-click upload of Word content
关于json转换器缺失的问题,报错内容:No converter found for return value of type
自动化测试及Selenium
ZZULIOJ 1116 Delete elements [delete]
SQL与NoSQL最终会走向融合吗?
GPU加速Pinterest推荐模型,参数量增加100倍,用户活跃度提高16%
"Time Series Database" uses cassandra to scan time series data