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