babel-plugin-jsx/packages/babel-helper-vue-compatible-props/index.js

13 lines
285 B
JavaScript
Raw Normal View History

2020-05-27 12:52:52 +08:00
const transformOn = require('@ant-design-vue/babel-helper-vue-transform-on');
const compatibleProps = (attr) => {
const {
props, on = {}, attrs, ...rest
} = attr || {};
return {
...props, ...attrs, ...transformOn(on), ...rest,
};
};
module.exports = compatibleProps;