diff --git a/packages/babel-plugin-jsx/src/transform-vue-jsx.js b/packages/babel-plugin-jsx/src/transform-vue-jsx.js index b8b4c60..690647d 100644 --- a/packages/babel-plugin-jsx/src/transform-vue-jsx.js +++ b/packages/babel-plugin-jsx/src/transform-vue-jsx.js @@ -358,7 +358,8 @@ const transformJSXElement = (t, path, state) => { .join(', '); const isComponent = checkIsComponent(t, path.get('openingElement')); - const child = children.elements.length === 1 ? children.elements[0] : children; + const child = children.elements.length === 1 && t.isStringLiteral(children.elements[0]) + ? children.elements[0] : children; if (state.opts.compatibleProps && !state.get('compatibleProps')) { state.set('compatibleProps', addDefault( path, '@ant-design-vue/babel-helper-vue-compatible-props', { nameHint: '_compatibleProps' },