@@ -11,11 +11,11 @@ import { isArray, looseEqual, looseIndexOf } from '@vue/shared'
|
||||
const getModelAssigner = (vnode: VNode): ((value: any) => void) =>
|
||||
vnode.props!['onUpdate:modelValue']
|
||||
|
||||
function onCompositionStart(e: CompositionEvent) {
|
||||
function onCompositionStart(e: Event) {
|
||||
;(e.target as any).composing = true
|
||||
}
|
||||
|
||||
function onCompositionEnd(e: CompositionEvent) {
|
||||
function onCompositionEnd(e: Event) {
|
||||
const target = e.target as any
|
||||
if (target.composing) {
|
||||
target.composing = false
|
||||
|
||||
@@ -6,7 +6,7 @@ type KeyedEvent = KeyboardEvent | MouseEvent | TouchEvent
|
||||
|
||||
const modifierGuards: Record<
|
||||
string,
|
||||
(e: Event, modifiers?: string[]) => void | boolean
|
||||
(e: Event, modifiers: string[]) => void | boolean
|
||||
> = {
|
||||
stop: e => e.stopPropagation(),
|
||||
prevent: e => e.preventDefault(),
|
||||
@@ -18,7 +18,7 @@ const modifierGuards: Record<
|
||||
left: e => 'button' in e && (e as MouseEvent).button !== 0,
|
||||
middle: e => 'button' in e && (e as MouseEvent).button !== 1,
|
||||
right: e => 'button' in e && (e as MouseEvent).button !== 2,
|
||||
exact: (e, modifiers: string[]) =>
|
||||
exact: (e, modifiers) =>
|
||||
systemModifiers.some(m => (e as any)[`${m}Key`] && !modifiers.includes(m))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user