fix(Transition): fix validate duration (#1188)
This commit is contained in:
@@ -6,7 +6,13 @@ import {
|
||||
warn
|
||||
} from '@vue/runtime-core'
|
||||
import { addEventListener } from '../modules/events'
|
||||
import { isArray, looseEqual, looseIndexOf, invokeArrayFns } from '@vue/shared'
|
||||
import {
|
||||
isArray,
|
||||
looseEqual,
|
||||
looseIndexOf,
|
||||
invokeArrayFns,
|
||||
toNumber
|
||||
} from '@vue/shared'
|
||||
|
||||
type AssignerFn = (value: any) => void
|
||||
|
||||
@@ -33,11 +39,6 @@ function trigger(el: HTMLElement, type: string) {
|
||||
el.dispatchEvent(e)
|
||||
}
|
||||
|
||||
function toNumber(val: string): number | string {
|
||||
const n = parseFloat(val)
|
||||
return isNaN(n) ? val : n
|
||||
}
|
||||
|
||||
type ModelDirective<T> = ObjectDirective<T & { _assign: AssignerFn }>
|
||||
|
||||
// We are exporting the v-model runtime directly as vnode hooks so that it can
|
||||
|
||||
Reference in New Issue
Block a user