fix(compiler-core): transform kebab case props to camelcase on slots (#2490)
fix #2488
This commit is contained in:
@@ -95,7 +95,9 @@ describe('compiler: transform <slot> outlets', () => {
|
||||
})
|
||||
|
||||
test('default slot outlet with props', () => {
|
||||
const ast = parseWithSlots(`<slot foo="bar" :baz="qux" />`)
|
||||
const ast = parseWithSlots(
|
||||
`<slot foo="bar" :baz="qux" :foo-bar="foo-bar" />`
|
||||
)
|
||||
expect((ast.children[0] as ElementNode).codegenNode).toMatchObject({
|
||||
type: NodeTypes.JS_CALL_EXPRESSION,
|
||||
callee: RENDER_SLOT,
|
||||
@@ -124,6 +126,16 @@ describe('compiler: transform <slot> outlets', () => {
|
||||
content: `qux`,
|
||||
isStatic: false
|
||||
}
|
||||
},
|
||||
{
|
||||
key: {
|
||||
content: `fooBar`,
|
||||
isStatic: true
|
||||
},
|
||||
value: {
|
||||
content: `foo-bar`,
|
||||
isStatic: false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user