ts 下的element-plus from自定义验证 类型的声明
强迫症犯了,见不得有any ↓
interface Icallback {
(message?: string | Error | undefined): Error | void
}
interface Ivalidate {
(rule: object, value: string, callback: Icallback): void
}
interface IruleForm {
title: {
validator: Ivalidate;
trigger: stri
原创
2021-03-30 10:44:37 ·
1182 阅读 ·
0 评论