vue
vue copied to clipboard
New slot syntax doesn't work the same way as old syntax (in some cases)
Version
2.6.14
Reproduction link
https://github.com/hivokas/vue-2-slots-issue
Steps to reproduce
- Clone the repo
- Run
npm run serve - Change the value in the text input
What is expected?
Preview updates with both old and new slot syntax (here: https://github.com/hivokas/vue-2-slots-issue/blob/cd7f3a6db790472b88421a1497ae14d4135d23ef/src/components/PublishToSocialStep.vue#L4).
What is actually happening?
Preview updates with old slot syntax, but doesn't update with new slot syntax.
Video demonstration of the problem:
https://user-images.githubusercontent.com/22997803/130232152-bd5e445d-600e-4816-b140-685d1fd6c3a8.mp4
I've updated the old deprecated slot syntax to the new one.
Hey, thanks for the detailed report. On first sight this might rather be a bug with a special combination of slot usage. We'll investigate.
Online Reproduction link: https://jsbin.com/sakiwam/edit?html,output
Hey, thanks for the detailed report. On first sight this might rather be a bug with a special combination of slot usage. We'll investigate.
As I investigated, the problem is inside src/compiler/parser/index.js inside processSlotContent method, I did not have enough time to fix it, but rawAttrsMap is doing wrong behaviour. I am new in Vue, so I just looked at it for 1 hour and it was my first time, can you guid me about this variable?
We ran into this recently.
We are using different names and it still doesn't work with the # syntax.