vue icon indicating copy to clipboard operation
vue copied to clipboard

New slot syntax doesn't work the same way as old syntax (in some cases)

Open hivokas opened this issue 4 years ago • 4 comments
trafficstars

Version

2.6.14

Reproduction link

https://github.com/hivokas/vue-2-slots-issue

Steps to reproduce

  1. Clone the repo
  2. Run npm run serve
  3. 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.

hivokas avatar Aug 20 '21 12:08 hivokas

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.

LinusBorg avatar Aug 20 '21 12:08 LinusBorg

Online Reproduction link: https://jsbin.com/sakiwam/edit?html,output

JuniorTour avatar Aug 29 '21 14:08 JuniorTour

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?

nimatrengo avatar Nov 03 '21 10:11 nimatrengo

We ran into this recently.

We are using different names and it still doesn't work with the # syntax.

Sporradik avatar Jul 12 '23 23:07 Sporradik