refactor: use shared util, remove unused regex
This commit is contained in:
parent
149d82d618
commit
aac7805b3a
@ -5,16 +5,11 @@ import {
|
||||
} from './component'
|
||||
import { VNodeFlags, ChildrenFlags } from './flags'
|
||||
import { createComponentClassFromOptions } from './componentUtils'
|
||||
import {
|
||||
handlersRE,
|
||||
EMPTY_OBJ,
|
||||
isObject,
|
||||
isArray,
|
||||
isFunction,
|
||||
isString
|
||||
} from '@vue/shared'
|
||||
import { EMPTY_OBJ, isObject, isArray, isFunction, isString } from '@vue/shared'
|
||||
import { RawChildrenType, RawSlots } from './h'
|
||||
|
||||
const handlersRE = /^on|^vnode/
|
||||
|
||||
// Vue core is platform agnostic, so we are not using Element for "DOM" nodes.
|
||||
export interface RenderNode {
|
||||
vnode?: VNode | null
|
||||
|
@ -4,8 +4,7 @@ import { patchStyle } from './modules/style'
|
||||
import { patchAttr } from './modules/attrs'
|
||||
import { patchDOMProp } from './modules/props'
|
||||
import { patchEvent } from './modules/events'
|
||||
|
||||
export const onRE = /^on/
|
||||
import { onRE } from '@vue/shared'
|
||||
|
||||
// value, checked, selected & muted
|
||||
// plus anything with upperCase letter in it are always patched as properties
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { VNode } from '@vue/core'
|
||||
import { handleDelegatedEvent } from './modules/events'
|
||||
import { onRE } from './patchData'
|
||||
import { onRE } from '@vue/shared'
|
||||
|
||||
export function teardownVNode(vnode: VNode) {
|
||||
const { el, data } = vnode
|
||||
|
@ -3,8 +3,6 @@ export const EMPTY_OBJ: { readonly [key: string]: any } = Object.freeze({})
|
||||
export const NOOP = () => {}
|
||||
|
||||
export const onRE = /^on/
|
||||
export const vnodeHookRE = /^vnode/
|
||||
export const handlersRE = /^on|^vnode/
|
||||
export const reservedPropRE = /^(?:key|ref|slots)$|^vnode/
|
||||
|
||||
export const isArray = Array.isArray
|
||||
|
Loading…
Reference in New Issue
Block a user