From 6ccee9941ff0c6ef08c17705af2bee89d7fa7ce0 Mon Sep 17 00:00:00 2001 From: "lihao.ylh" Date: Wed, 20 Apr 2022 14:35:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(vision-polyfill):=20=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E5=80=BC=E6=98=AF=20JSSlot=20=E7=B1=BB=E5=9E=8B=EF=BC=8C?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=E7=9B=B8=E5=AF=B9=E5=BA=94=E7=9A=84=20slotNo?= =?UTF-8?q?de?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/props-reducers/downgrade-schema-reducer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/vision-polyfill/src/props-reducers/downgrade-schema-reducer.ts b/packages/vision-polyfill/src/props-reducers/downgrade-schema-reducer.ts index 65082fb76..9db814b10 100644 --- a/packages/vision-polyfill/src/props-reducers/downgrade-schema-reducer.ts +++ b/packages/vision-polyfill/src/props-reducers/downgrade-schema-reducer.ts @@ -47,6 +47,10 @@ export function compatibleReducer(props: any, node: Node): any { // newProps[key] = props[key]; // return; // } + // 假如当前值是 JSSlot 类型,优先传入相对应的 slotNode + if (isJSSlot(val)) { + node = node.getProp(key)?.slotNode || node; + } newProps[key] = compatibleReducer(val, node); }); return newProps; From 22cb676d149475a6fc5dadfc1e634864d13d063e Mon Sep 17 00:00:00 2001 From: "lihao.ylh" Date: Wed, 20 Apr 2022 14:38:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E5=85=B3=E9=97=AD=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E7=B1=BB=E5=9E=8B=E4=BF=A1=E6=81=AF=E7=9A=84eslint?= =?UTF-8?q?=E8=A7=84=E5=88=99=EF=BC=8C=E4=BB=A5=E6=8F=90=E5=8D=87lint?= =?UTF-8?q?=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index bf1394e65..6a1c241fd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,9 @@ module.exports = { extends: 'eslint-config-ali/typescript/react', + parserOptions: { + project: [], // for lint performance + createDefaultProgram: false, // for lint performance + }, rules: { 'react/no-multi-comp': 0, 'no-unused-expressions': 0, @@ -31,5 +35,7 @@ module.exports = { '@typescript-eslint/indent': 0, 'import/no-cycle': 0, '@typescript-eslint/no-shadow': 0, - } + '@typescript-eslint/dot-notation': 0, // for lint performance + '@typescript-eslint/restrict-plus-operands': 0, // for lint performance + }, };