parent
478b4cfb2c
commit
7b987d9450
@ -137,7 +137,7 @@ describe('compiler: transform v-bind', () => {
|
|||||||
expect(props.properties[0]).toMatchObject({
|
expect(props.properties[0]).toMatchObject({
|
||||||
key: {
|
key: {
|
||||||
children: [
|
children: [
|
||||||
`${helperNameMap[CAMELIZE]}(`,
|
`_${helperNameMap[CAMELIZE]}(`,
|
||||||
{ content: `_ctx.foo` },
|
{ content: `_ctx.foo` },
|
||||||
`(`,
|
`(`,
|
||||||
{ content: `_ctx.bar` },
|
{ content: `_ctx.bar` },
|
||||||
|
@ -161,10 +161,7 @@ export function createTransformContext(
|
|||||||
return name
|
return name
|
||||||
},
|
},
|
||||||
helperString(name) {
|
helperString(name) {
|
||||||
return (
|
return `_${helperNameMap[context.helper(name)]}`
|
||||||
(context.prefixIdentifiers ? `` : `_`) +
|
|
||||||
helperNameMap[context.helper(name)]
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
replaceNode(node) {
|
replaceNode(node) {
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
|
@ -517,7 +517,6 @@ function buildDirectiveArgs(
|
|||||||
const dirArgs: ArrayExpression['elements'] = []
|
const dirArgs: ArrayExpression['elements'] = []
|
||||||
const runtime = directiveImportMap.get(dir)
|
const runtime = directiveImportMap.get(dir)
|
||||||
if (runtime) {
|
if (runtime) {
|
||||||
context.helper(runtime)
|
|
||||||
dirArgs.push(context.helperString(runtime))
|
dirArgs.push(context.helperString(runtime))
|
||||||
} else {
|
} else {
|
||||||
// inject statement for resolving directive
|
// inject statement for resolving directive
|
||||||
|
Loading…
x
Reference in New Issue
Block a user