vue-tilt.js icon indicating copy to clipboard operation
vue-tilt.js copied to clipboard

bug if set custom mouse-event-element

Open reslear opened this issue 5 years ago • 1 comments
trafficstars

Снимок экрана 2020-03-16 в 15 18 36 this default solution working and if change custom id don't working: Снимок экрана 2020-03-16 в 15 19 24 Снимок экрана 2020-03-16 в 15 19 16

Solution around:

bind id param to component <component :id="'article_last'" />

in component:

<picture v-tilt="{'mouse-event-element': '#'+ id}">
        <img :src="img" alt="">
</picture>

reslear avatar Mar 16 '20 12:03 reslear

Hi @reslear, thanks for report.

Sorry, I can not reproduce this. In my test sandbox it works fine.

Am I missing something?

Maybe you can try to build the ID as computed-property. This should prevent loading-errors between template and data-loading which are sometimes thrown by vue.

computed: {
    unicId: () => `article_${Date.now()}`
}

Can you confirm it will working with computed or I am missing something? Thanks.

vanderb avatar Apr 07 '20 15:04 vanderb