Browse Source

chore: jsx use PatchFlags (#2498)

pull/2502/head
Amour1688 4 years ago committed by GitHub
parent
commit
7308d63e6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      components/vc-menu/Menu.jsx
  2. 2
      webpack.config.js

9
components/vc-menu/Menu.jsx

@ -169,11 +169,10 @@ const Menu = {
onSelect: this.onSelect, onSelect: this.onSelect,
ref: 'innerMenu', ref: 'innerMenu',
}; };
return (
<Provider store={this.store}> const subPopupMenu = <SubPopupMenu {...subPopupMenuProps} />;
<SubPopupMenu {...subPopupMenuProps} /> return <Provider store={this.store}>{subPopupMenu}</Provider>;
</Provider>
);
}, },
}; };
export default Menu; export default Menu;

2
webpack.config.js

@ -46,7 +46,7 @@ module.exports = {
style: true, style: true,
}, },
], ],
['@ant-design-vue/babel-plugin-jsx', { transformOn: true }], ['@ant-design-vue/babel-plugin-jsx', { transformOn: true, usePatchFlag: true }],
'@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-object-assign', '@babel/plugin-transform-object-assign',
'@babel/plugin-proposal-object-rest-spread', '@babel/plugin-proposal-object-rest-spread',

Loading…
Cancel
Save