feat(compiler-dom/runtime-dom): stringify eligible static trees

This commit is contained in:
Evan You
2020-02-12 11:56:42 -05:00
parent e861c6da90
commit 27913e661a
13 changed files with 304 additions and 87 deletions

View File

@@ -4,23 +4,19 @@ import { patchAttr } from './modules/attrs'
import { patchDOMProp } from './modules/props'
import { patchEvent } from './modules/events'
import { isOn } from '@vue/shared'
import {
ComponentInternalInstance,
SuspenseBoundary,
VNode
} from '@vue/runtime-core'
import { RendererOptions } from '@vue/runtime-core'
export function patchProp(
el: Element,
key: string,
nextValue: any,
prevValue: any,
isSVG: boolean,
prevChildren?: VNode[],
parentComponent?: ComponentInternalInstance,
parentSuspense?: SuspenseBoundary<Node, Element>,
unmountChildren?: any
) {
export const patchProp: RendererOptions<Node, Element>['patchProp'] = (
el,
key,
nextValue,
prevValue,
isSVG = false,
prevChildren,
parentComponent,
parentSuspense,
unmountChildren
) => {
switch (key) {
// special
case 'class':