Ver código fonte

wip: treat compat model listener as already declared

Evan You 5 anos atrás
pai
commit
a75b00c558
1 arquivos alterados com 5 adições e 0 exclusões
  1. 5 0
      packages/runtime-core/src/componentEmits.ts

+ 5 - 0
packages/runtime-core/src/componentEmits.ts

@@ -219,6 +219,11 @@ export function isEmitListener(
   if (!options || !isOn(key)) {
     return false
   }
+
+  if (__COMPAT__ && key.startsWith(compatModelEventPrefix)) {
+    return true
+  }
+
   key = key.slice(2).replace(/Once$/, '')
   return (
     hasOwn(options, key[0].toLowerCase() + key.slice(1)) ||