Match-id-5ec5b8bb1e9670f83af42904d6795648595acd4a
This commit is contained in:
parent
4241025900
commit
8752ba53c5
|
@ -45,7 +45,7 @@ function shouldTriggerChangeEvent(targetDom, evtName) {
|
|||
const { type } = targetDom;
|
||||
const domTag = getDomTag(targetDom);
|
||||
|
||||
if (domTag === 'select' || domTag === 'input' && type === 'file') {
|
||||
if (domTag === 'select' || (domTag === 'input' && type === 'file')) {
|
||||
return evtName === 'change';
|
||||
} else if (domTag === 'input' && (type === 'checkbox' || type === 'radio')) {
|
||||
if (evtName === 'click') {
|
||||
|
|
|
@ -110,7 +110,7 @@ export function handleRenderThrowError(sourceVNode: VNode, error: any) {
|
|||
if (
|
||||
(vNode.flags & DidCapture) === InitFlag &&
|
||||
(typeof ctor.getDerivedStateFromError === 'function' ||
|
||||
instance !== null && typeof instance.componentDidCatch === 'function')
|
||||
(instance !== null && typeof instance.componentDidCatch === 'function'))
|
||||
) {
|
||||
FlagUtils.markShouldCapture(vNode);
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ export function captureVNode(processing: VNode): VNode | null {
|
|||
|
||||
export function markRef(processing: VNode) {
|
||||
const ref = processing.ref;
|
||||
if (processing.isCreated && ref !== null || !processing.isCreated && processing.oldRef !== ref) {
|
||||
if ((processing.isCreated && ref !== null) || (!processing.isCreated && processing.oldRef !== ref)) {
|
||||
FlagUtils.markRef(processing);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ export function bubbleRender(processing: VNode) {
|
|||
const { childStatus, oldChildStatus } = processing.suspenseState;
|
||||
if (
|
||||
childStatus === SuspenseChildStatus.ShowFallback ||
|
||||
!processing.isCreated && oldChildStatus === SuspenseChildStatus.ShowFallback
|
||||
(!processing.isCreated && oldChildStatus === SuspenseChildStatus.ShowFallback)
|
||||
) {
|
||||
FlagUtils.markUpdate(processing);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue