chore(runtime-core): use ReactiveFlags.SKIP in vnode for consistency (#1901)

This commit is contained in:
Li Chen 2020-08-22 01:45:42 +08:00 committed by GitHub
parent 3c05f8bbd6
commit 0f8c9917f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ import {
Component Component
} from './component' } from './component'
import { RawSlots } from './componentSlots' import { RawSlots } from './componentSlots'
import { isProxy, Ref, toRaw } from '@vue/reactivity' import { isProxy, Ref, toRaw, ReactiveFlags } from '@vue/reactivity'
import { AppContext } from './apiCreateApp' import { AppContext } from './apiCreateApp'
import { import {
SuspenseImpl, SuspenseImpl,
@ -118,7 +118,7 @@ export interface VNode<
/** /**
* @internal * @internal
*/ */
__v_skip: true [ReactiveFlags.SKIP]: true
type: VNodeTypes type: VNodeTypes
props: (VNodeProps & ExtraProps) | null props: (VNodeProps & ExtraProps) | null
key: string | number | null key: string | number | null
@ -375,7 +375,7 @@ function _createVNode(
const vnode: VNode = { const vnode: VNode = {
__v_isVNode: true, __v_isVNode: true,
__v_skip: true, [ReactiveFlags.SKIP]: true,
type, type,
props, props,
key: props && normalizeKey(props), key: props && normalizeKey(props),
@ -440,7 +440,7 @@ export function cloneVNode<T, U>(
: props : props
return { return {
__v_isVNode: true, __v_isVNode: true,
__v_skip: true, [ReactiveFlags.SKIP]: true,
type: vnode.type, type: vnode.type,
props: mergedProps, props: mergedProps,
key: mergedProps && normalizeKey(mergedProps), key: mergedProps && normalizeKey(mergedProps),