mirror of https://github.com/vuejs/core.git
chore: simplify more
`compatModelEventPrefix + event in props` can only be true if `isCompatEnabled(DeprecationTypes.COMPONENT_V_MODEL, instance)`; see `convertLegacyVModelProps`.
This commit is contained in:
parent
e2dc92dc9a
commit
9d1a0b2ef0
|
@ -32,7 +32,6 @@ import {
|
||||||
import type { ComponentTypeEmits } from './apiSetupHelpers'
|
import type { ComponentTypeEmits } from './apiSetupHelpers'
|
||||||
import { getModelModifiers } from './helpers/useModel'
|
import { getModelModifiers } from './helpers/useModel'
|
||||||
import type { ComponentPublicInstance } from './componentPublicInstance'
|
import type { ComponentPublicInstance } from './componentPublicInstance'
|
||||||
import { DeprecationTypes, isCompatEnabled } from './compat/compatConfig'
|
|
||||||
|
|
||||||
export type ObjectEmitsOptions = Record<
|
export type ObjectEmitsOptions = Record<
|
||||||
string,
|
string,
|
||||||
|
@ -156,7 +155,6 @@ export function emit(
|
||||||
let modifiers
|
let modifiers
|
||||||
if (
|
if (
|
||||||
__COMPAT__ &&
|
__COMPAT__ &&
|
||||||
isCompatEnabled(DeprecationTypes.COMPONENT_V_MODEL, instance) &&
|
|
||||||
(isModelListener = compatModelEventPrefix + event in props)
|
(isModelListener = compatModelEventPrefix + event in props)
|
||||||
) {
|
) {
|
||||||
modifiers = props.modelModifiers
|
modifiers = props.modelModifiers
|
||||||
|
|
Loading…
Reference in New Issue