fix(runtime-dom): defer setting value

fix #2325, fix #4024
This commit is contained in:
Evan You
2021-07-21 16:38:01 -04:00
parent 36ae23d27e
commit ff0c810300
3 changed files with 115 additions and 109 deletions

View File

@@ -13,7 +13,7 @@ import {
compatUtils
} from '@vue/runtime-core'
import { nodeOps } from './nodeOps'
import { patchProp, forcePatchProp } from './patchProp'
import { patchProp } from './patchProp'
// Importing from the compiler, will be tree-shaken in prod
import { isFunction, isString, isHTMLTag, isSVGTag, extend } from '@vue/shared'
@@ -24,7 +24,7 @@ declare module '@vue/reactivity' {
}
}
const rendererOptions = extend({ patchProp, forcePatchProp }, nodeOps)
const rendererOptions = extend({ patchProp }, nodeOps)
// lazy create the renderer - this makes core renderer logic tree-shakable
// in case the user only imports reactivity utilities from Vue.

View File

@@ -10,9 +10,6 @@ const nativeOnRE = /^on[a-z]/
type DOMRendererOptions = RendererOptions<Node, Element>
export const forcePatchProp: DOMRendererOptions['forcePatchProp'] = (_, key) =>
key === 'value'
export const patchProp: DOMRendererOptions['patchProp'] = (
el,
key,