babel-plugin-jsx/packages/babel-helper-vue-compatible-props/index.js
2020-05-27 12:53:25 +08:00

13 lines
285 B
JavaScript

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;