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 + }, }; 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;