vue-events

VueJS: @click.native.stop = “” possible?

China☆狼群 提交于 2020-01-23 13:10:51
问题 I have several nested components on the page with parents component having @click.native implementation. Therefore when I click on the area occupied by a child component (living inside parent), both click actions executed (parent and all nested children) for example <products> <product-details> <slide-show> <media-manager> <modal-dialog> <product-details> <slide-show> <media-manager> <modal-dialog> </products> So I have a list of multiple products, and when I click on "canvas" belonging to

VueJS: @click.native.stop = “” possible?

隐身守侯 提交于 2020-01-23 13:10:26
问题 I have several nested components on the page with parents component having @click.native implementation. Therefore when I click on the area occupied by a child component (living inside parent), both click actions executed (parent and all nested children) for example <products> <product-details> <slide-show> <media-manager> <modal-dialog> <product-details> <slide-show> <media-manager> <modal-dialog> </products> So I have a list of multiple products, and when I click on "canvas" belonging to

Fire event when changing route before DOM changes and outside the route itself?

烈酒焚心 提交于 2019-12-11 06:59:58
问题 I opened a similar topic a few days ago, where I was suggested to use beforeRouteLeave within the route component definition. However, I'm creating a Vue component and I won't have control over how developers wants to define their route components. Therefore, I need a way to fire an event within my own component and don't rely on external route components. When changing from one route to another, the beforeDestroy gets fired after the DOM structure changes. I've tried using beforeUpdate and

vuejs: @keyup.esc on div element is not working

帅比萌擦擦* 提交于 2019-12-10 01:50:25
问题 I'm expecting that 'close' event is fired when I'm clicking ESC button being on "shadow-modal" div, but it's not happening vue 2.5.13, any ideas why? <template> <div class="shadow-modal" @keyup.esc="$emit('close')"> <transition name="modal"> <div class="modal-mask"> <div class="modal-wrapper"> <div class="modal-container"> <div class="modal-header"> <slot name="header"> default header </slot> </div> <div class="modal-body"> <slot name="body"> default body </slot> </div> <div class="modal

VueJS: @click.native.stop = “” possible?

拈花ヽ惹草 提交于 2019-12-06 05:10:42
I have several nested components on the page with parents component having @click.native implementation. Therefore when I click on the area occupied by a child component (living inside parent), both click actions executed (parent and all nested children) for example <products> <product-details> <slide-show> <media-manager> <modal-dialog> <product-details> <slide-show> <media-manager> <modal-dialog> </products> So I have a list of multiple products, and when I click on "canvas" belonging to modal dialog - I also get @click.native fired on product-details to which modal-dialog belongs. Would be

vuejs: @keyup.esc on div element is not working

霸气de小男生 提交于 2019-12-05 01:32:36
I'm expecting that 'close' event is fired when I'm clicking ESC button being on "shadow-modal" div, but it's not happening vue 2.5.13, any ideas why? <template> <div class="shadow-modal" @keyup.esc="$emit('close')"> <transition name="modal"> <div class="modal-mask"> <div class="modal-wrapper"> <div class="modal-container"> <div class="modal-header"> <slot name="header"> default header </slot> </div> <div class="modal-body"> <slot name="body"> default body </slot> </div> <div class="modal-footer"> <slot name="footer"> <a href="#" class="btn btn--diagonal btn--blue" @click="$emit('close')"