Closed
Description
Version
2.6.10
Reproduction link
https://github.com/tbutcaru/v-issue-multiple-dynamic-slot-names
Steps to reproduce
- Clone this repo: https://github.com/tbutcaru/v-issue-multiple-dynamic-slot-names
- Run:
npm install
- Run:
npm run serve
What is expected?
Multiple dynamic slot names should work as expected.
What is actually happening?
The following error is thrown:
Invalid dynamic argument expression: attribute names cannot contain spaces, quotes, <, >, / or =.#[headerslot]>Header slot</template>
Default slot
<template #[footerslot]
If one of the dynamic slot names is made static (doesn't matter which), the application is working.
My investigation
- file:
node_modules/vue-template-compiler/build.js
- line: 2563 (inside
attrs.forEach(function (attr) {
) added the following warn:
warn$1('--------------->> ' + attr.name);
Investigation results:
- In the working scenario with only one dynamic slot name: the value of that dynamic slot name is
#[headerslot]
- In the error scenario with two dynamic slot names: the value of the first dynamic slot name is
#[headerslot]>Header slot</template>
Default slot
<template #[footerslot]
So, it looks like the compiler doesn't know how to extract just the attribute when there are multiple dynamic slot names.