From 8283d4d1919dee6d962c98f0d26270d15b0932d8 Mon Sep 17 00:00:00 2001 From: lixingchi1 Date: Wed, 20 Oct 2021 11:05:24 +0800 Subject: [PATCH] lixingchi1@huawei.com fix custom component mq Signed-off-by: lixingchi1 --- runtime/main/model/compiler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/main/model/compiler.ts b/runtime/main/model/compiler.ts index 5995d153..beb497be 100644 --- a/runtime/main/model/compiler.ts +++ b/runtime/main/model/compiler.ts @@ -415,7 +415,9 @@ function resetElementStyle(vm: Vm, element: Element): void { const mqArr = css['@MEDIA']; for (let ii = 0; ii < len; ii++) { const el = element.children[ii] as Element; - resetElementStyle(vm, el); + if (!el.isCustomComponent) { + resetElementStyle(vm, el); + } } if (element.type) { setTagStyle(vm, element, element.type);