ERROR in src/components/ValidateForm.vue:29:5
TS2769: No overload matches this call.
Overload 1 of 2, ‘(type: “", handler: WildcardHandler): void’, gave the following error.
Argument of type ‘“form-item-cteated”’ is not assignable to parameter of type '"”’.
Overload 2 of 2, ‘(type: string | symbol, handler: Handler): void’, gave the following error.
Argument of type ‘(func: ValidateFunc) => void’ is not assignable to parameter of type ‘Handler’.
Types of parameters ‘func’ and ‘event’ are incompatible.
Type ‘ValidateFunc | undefined’ is not assignable to type ‘ValidateFunc’.
Type ‘undefined’ is not assignable to type ‘ValidateFunc’.
27 | }
28 | };
29 | emitter.on(“form-item-cteated”, callback);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 | onUnmounted(() => {
31 | emitter.off(“form-item-cteated”, callback);
32 | funcArr = [];
ERROR in src/components/ValidateForm.vue:31:7
TS2769: No overload matches this call.
Overload 1 of 2, ‘(type: “", handler: WildcardHandler): void’, gave the following error.
Argument of type ‘“form-item-cteated”’ is not assignable to parameter of type '"”’.
Overload 2 of 2, ‘(type: string | symbol, handler: Handler): void’, gave the following error.
Argument of type ‘(func: ValidateFunc) => void’ is not assignable to parameter of type ‘Handler’.
29 | emitter.on(“form-item-cteated”, callback);
30 | onUnmounted(() => {
31 | emitter.off(“form-item-cteated”, callback);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 | funcArr = [];
33 | });
34 | return {
登录后可查看更多问答,登录/注册