@ant-design-vue/babel-plugin-jsx
Advanced tools
Comparing version 1.0.0-alpha.5 to 1.0.0-alpha.6
@@ -561,7 +561,7 @@ 'use strict'; | ||
if ((patchFlag === 0 || patchFlag === PatchFlags.HYDRATE_EVENTS) && hasRef) { | ||
if ((patchFlag === 0 || patchFlag === PatchFlags.HYDRATE_EVENTS) && (hasRef || directives.length > 0)) { | ||
patchFlag |= PatchFlags.NEED_PATCH; | ||
} | ||
let propsExpression; | ||
let propsExpression = t.nullLiteral(); | ||
@@ -655,4 +655,8 @@ if (mergeArgs.length) { | ||
const child = children.length === 1 && t.isStringLiteral(children[0]) ? children[0] : t.arrayExpression(children); | ||
const { | ||
compatibleProps, | ||
usePatchFlag | ||
} = state.opts; | ||
if (state.opts.compatibleProps && !state.get('compatibleProps')) { | ||
if (compatibleProps && !state.get('compatibleProps')) { | ||
state.set('compatibleProps', helperModuleImports.addDefault(path, '@ant-design-vue/babel-helper-vue-compatible-props', { | ||
@@ -663,3 +667,3 @@ nameHint: '_compatibleProps' | ||
const createVNode = t.callExpression(createIdentifier(t, state, 'createVNode'), [tag, state.opts.compatibleProps ? t.callExpression(state.get('compatibleProps'), [props]) : props, children[0] ? isComponent ? t.objectExpression([t.objectProperty(t.identifier('default'), t.callExpression(createIdentifier(t, state, 'withCtx'), [t.arrowFunctionExpression([], t.isStringLiteral(child) ? t.callExpression(createIdentifier(t, state, 'createTextVNode'), [child]) : child)])), t.objectProperty(t.identifier('_'), t.numericLiteral(1))]) : child : t.nullLiteral(), patchFlag && t.addComment(t.numericLiteral(patchFlag), 'trailing', ` ${flagNames} `, false), dynamicPropNames.size && t.arrayExpression([...dynamicPropNames.keys()].map(name => t.stringLiteral(name)))].filter(Boolean)); | ||
const createVNode = t.callExpression(createIdentifier(t, state, usePatchFlag ? 'createVNode' : 'h'), [tag, compatibleProps ? t.callExpression(state.get('compatibleProps'), [props]) : props, children[0] ? isComponent ? t.objectExpression([t.objectProperty(t.identifier('default'), t.callExpression(createIdentifier(t, state, 'withCtx'), [t.arrowFunctionExpression([], t.isStringLiteral(child) ? t.callExpression(createIdentifier(t, state, 'createTextVNode'), [child]) : child)]))]) : child : t.nullLiteral(), patchFlag && usePatchFlag && t.addComment(t.numericLiteral(patchFlag), 'trailing', ` ${flagNames} `, false), dynamicPropNames.size && usePatchFlag && t.arrayExpression([...dynamicPropNames.keys()].map(name => t.stringLiteral(name)))].filter(Boolean)); | ||
@@ -666,0 +670,0 @@ if (!directives.length) { |
{ | ||
"name": "@ant-design-vue/babel-plugin-jsx", | ||
"version": "1.0.0-alpha.5", | ||
"version": "1.0.0-alpha.6", | ||
"description": "Babel plugin for Vue 3.0 JSX", | ||
@@ -5,0 +5,0 @@ "author": "Amour1688 <lcz_1996@foxmail.com>", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
23195
589
0