-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using multiple dynamic slot names (Invalid dynamic argument expression) #9781
Comments
The shorthand is only available when an argument is provided. Try to use: |
I've tried that before creating the issue and the result is the same 😞 |
Hi everyone! What new about this ? I still have the problem in 2.6.11 reproduce here |
After many tries, I found a way to make multi dynamic slots work. When i add keys to root element of the dynamics slot templates, it fall in work: this doesn't work: reproduce here
this work: reproduce here
Why i need to add keys to make it work? I missed something. |
@davis90 's solution worked for me. I don't get why it works too. |
Why are the errors so misleading in vue. Thanks though your solution worked |
* fix(#9781): non greedy `dynamicArgAttribute` RegExp * test(parser): add test case for multiple dynamic slot names * test: add test with value Co-authored-by: Eduardo San Martin Morote <posva13@gmail.com>
Hey all, I am using vue 2.6.10, I got same problem, after google something I found this way to fix it.
the main idea is add '=""' after [], remember only last one can keep without ="", for short just add ="" for all v-slot good luck for everyone. btw VUE is good. |
Solution proposed by @016 seems to work and is less verbose than adding keys |
Thanks look. I working with bootstrap-vue
|
Version
2.6.10
Reproduction link
https://github.com/tbutcaru/v-issue-multiple-dynamic-slot-names
Steps to reproduce
npm install
npm run serve
What is expected?
Multiple dynamic slot names should work as expected.
What is actually happening?
The following error is thrown:
If one of the dynamic slot names is made static (doesn't matter which), the application is working.
My investigation
node_modules/vue-template-compiler/build.js
attrs.forEach(function (attr) {
) added the following warn:Investigation results:
#[headerslot]
So, it looks like the compiler doesn't know how to extract just the attribute when there are multiple dynamic slot names.
The text was updated successfully, but these errors were encountered: