fix(#10923): typo
This commit is contained in:
parent
e63db8c2ed
commit
f839d6c31c
|
@ -112,22 +112,38 @@ export function unwindCssModuleClassName(ast: estree.Node): void {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.replace({
|
(walk as typeof estreeWalker.walk)(render.argument.body, {
|
||||||
type: 'VariableDeclaration',
|
enter(childNode) {
|
||||||
declarations: [{
|
if (childNode.type !== 'MemberExpression') return;
|
||||||
type: 'VariableDeclarator',
|
if (childNode.object.type !== 'MemberExpression') return;
|
||||||
id: {
|
if (childNode.object.object.type !== 'Identifier') return;
|
||||||
type: 'Identifier',
|
if (childNode.object.object.name !== ctx.name) return;
|
||||||
name: node.declarations[0].id.name,
|
if (childNode.object.property.type !== 'Identifier') return;
|
||||||
},
|
if (childNode.object.property.name !== key) return;
|
||||||
init: {
|
if (childNode.property.type !== 'Identifier') return;
|
||||||
type: 'Identifier',
|
console.error(`${key}.${childNode.property.name} is not a valid css module class name`);
|
||||||
name: ident,
|
this.replace({
|
||||||
},
|
type: 'Literal',
|
||||||
}],
|
value: null,
|
||||||
kind: 'const',
|
});
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
this.replace({
|
||||||
|
type: 'VariableDeclaration',
|
||||||
|
declarations: [{
|
||||||
|
type: 'VariableDeclarator',
|
||||||
|
id: {
|
||||||
|
type: 'Identifier',
|
||||||
|
name: node.declarations[0].id.name,
|
||||||
|
},
|
||||||
|
init: {
|
||||||
|
type: 'Identifier',
|
||||||
|
name: ident,
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
kind: 'const',
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -138,6 +154,7 @@ export default function pluginUnwindCssModuleClassName(): Plugin {
|
||||||
name: 'UnwindCssModuleClassName',
|
name: 'UnwindCssModuleClassName',
|
||||||
renderChunk(code, chunk): { code: string } {
|
renderChunk(code, chunk): { code: string } {
|
||||||
const ast = this.parse(code) as unknown as estree.Node;
|
const ast = this.parse(code) as unknown as estree.Node;
|
||||||
|
console.log(`======= ${chunk.fileName} =======`);
|
||||||
unwindCssModuleClassName(ast);
|
unwindCssModuleClassName(ast);
|
||||||
return { code: generate(ast) };
|
return { code: generate(ast) };
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
$style.medias,
|
$style.medias,
|
||||||
count === 1 ? [$style.n1, {
|
count === 1 ? [$style.n1, {
|
||||||
[$style.n116_9]: defaultStore.reactiveState.mediaListWithOneImageAppearance.value === '16_9',
|
[$style.n116_9]: defaultStore.reactiveState.mediaListWithOneImageAppearance.value === '16_9',
|
||||||
[$style.n1_1]: defaultStore.reactiveState.mediaListWithOneImageAppearance.value === '1_1',
|
[$style.n11_1]: defaultStore.reactiveState.mediaListWithOneImageAppearance.value === '1_1',
|
||||||
[$style.n12_3]: defaultStore.reactiveState.mediaListWithOneImageAppearance.value === '2_3',
|
[$style.n12_3]: defaultStore.reactiveState.mediaListWithOneImageAppearance.value === '2_3',
|
||||||
}] : count === 2 ? $style.n2 : count === 3 ? $style.n3 : count === 4 ? $style.n4 : $style.nMany,
|
}] : count === 2 ? $style.n2 : count === 3 ? $style.n3 : count === 4 ? $style.n4 : $style.nMany,
|
||||||
]"
|
]"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
[$style.transition_send_enterFrom]: transitionName === 'send',
|
[$style.transition_send_enterFrom]: transitionName === 'send',
|
||||||
}"
|
}"
|
||||||
:leaveToClass="{
|
:leaveToClass="{
|
||||||
[$style.transition_modalPopup_leaveTo]: transitionName === 'modal-popup',
|
[$style.transition_modalDrawer_leaveTo]: transitionName === 'modal-drawer',
|
||||||
[$style.transition_modalPopup_leaveTo]: transitionName === 'modal-popup',
|
[$style.transition_modalPopup_leaveTo]: transitionName === 'modal-popup',
|
||||||
[$style.transition_modal_leaveTo]: transitionName === 'modal',
|
[$style.transition_modal_leaveTo]: transitionName === 'modal',
|
||||||
[$style.transition_send_leaveTo]: transitionName === 'send',
|
[$style.transition_send_leaveTo]: transitionName === 'send',
|
||||||
|
@ -402,8 +402,8 @@ defineExpose({
|
||||||
transition: transform 0.2s cubic-bezier(0,.5,0,1) !important;
|
transition: transform 0.2s cubic-bezier(0,.5,0,1) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.transition_modal-drawer_enterFrom,
|
.transition_modalDrawer_enterFrom,
|
||||||
.transition_modal-drawer_leaveTo {
|
.transition_modalDrawer_leaveTo {
|
||||||
> .bg {
|
> .bg {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue