Match-id-5ec5b8bb1e9670f83af42904d6795648595acd4a

This commit is contained in:
* 2023-04-18 10:08:43 +08:00
parent 4241025900
commit 8752ba53c5
4 changed files with 4 additions and 4 deletions

View File

@ -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') {

View File

@ -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);

View File

@ -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);
}
}

View File

@ -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);
}