chore: rename & property missing (#335)
This commit is contained in:
parent
65bd838cb8
commit
71f3826f99
@ -313,7 +313,7 @@ describe('compiler: transform', () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: NodeTypes.JS_CALL_EXPRESSION,
|
type: NodeTypes.JS_CALL_EXPRESSION,
|
||||||
// should wrap applyDirectives() around createBlock()
|
// should wrap withDirectives() around createBlock()
|
||||||
callee: WITH_DIRECTIVES,
|
callee: WITH_DIRECTIVES,
|
||||||
arguments: [
|
arguments: [
|
||||||
{ callee: CREATE_BLOCK },
|
{ callee: CREATE_BLOCK },
|
||||||
|
@ -857,7 +857,7 @@ describe('compiler: v-for', () => {
|
|||||||
type: NodeTypes.JS_SEQUENCE_EXPRESSION,
|
type: NodeTypes.JS_SEQUENCE_EXPRESSION,
|
||||||
expressions: [
|
expressions: [
|
||||||
{ callee: OPEN_BLOCK },
|
{ callee: OPEN_BLOCK },
|
||||||
// should wrap applyDirectives() around createBlock()
|
// should wrap withDirectives() around createBlock()
|
||||||
{
|
{
|
||||||
callee: WITH_DIRECTIVES,
|
callee: WITH_DIRECTIVES,
|
||||||
arguments: [
|
arguments: [
|
||||||
|
@ -396,7 +396,7 @@ export interface DynamicSlotFnProperty extends Property {
|
|||||||
value: SlotFunctionExpression
|
value: SlotFunctionExpression
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyDirectives(createVNode(...), [
|
// withDirectives(createVNode(...), [
|
||||||
// [_directive_foo, someValue],
|
// [_directive_foo, someValue],
|
||||||
// [_directive_bar, someValue, "arg", { mod: true }]
|
// [_directive_bar, someValue, "arg", { mod: true }]
|
||||||
// ])
|
// ])
|
||||||
|
@ -97,6 +97,7 @@ export function parse(content: string, options: ParserOptions = {}): RootNode {
|
|||||||
components: [],
|
components: [],
|
||||||
directives: [],
|
directives: [],
|
||||||
hoists: [],
|
hoists: [],
|
||||||
|
cached: 0,
|
||||||
codegenNode: undefined,
|
codegenNode: undefined,
|
||||||
loc: getSelection(context, start),
|
loc: getSelection(context, start),
|
||||||
cached: 0
|
cached: 0
|
||||||
|
@ -5,7 +5,7 @@ const comp = resolveComponent('comp')
|
|||||||
const foo = resolveDirective('foo')
|
const foo = resolveDirective('foo')
|
||||||
const bar = resolveDirective('bar')
|
const bar = resolveDirective('bar')
|
||||||
|
|
||||||
return applyDirectives(h(comp), [
|
return withDirectives(h(comp), [
|
||||||
[foo, this.x],
|
[foo, this.x],
|
||||||
[bar, this.y]
|
[bar, this.y]
|
||||||
])
|
])
|
||||||
@ -129,7 +129,7 @@ export function withDirectives(vnode: VNode, directives: DirectiveArguments) {
|
|||||||
applyDirective(vnode.props, instance, dir, value, arg, modifiers)
|
applyDirective(vnode.props, instance, dir, value, arg, modifiers)
|
||||||
}
|
}
|
||||||
} else if (__DEV__) {
|
} else if (__DEV__) {
|
||||||
warn(`applyDirectives can only be used inside render functions.`)
|
warn(`withDirectives can only be used inside render functions.`)
|
||||||
}
|
}
|
||||||
return vnode
|
return vnode
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user