E
E
exhang2019-10-29 23:31:19
JavaScript
exhang, 2019-10-29 23:31:19

How to catch events from Element UI?

Element UI, Popover component. ElPopover sends events on click 5db8a0b5164d9952461297.png
5db8a0f30369f678049839.png
Can't figure out how to subscribe to this event?

<code lang="html">
  <div id="content" v-on:hide="alert('ff')" >
</code>
Не отрабатывает. Как работать с этими событиями?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-10-29
@0xD34F

v-on:hide="alert('ff')"

Let me guess - you don't have an alert method in your component, you're waiting for window.alert to execute. No, it won't. Make a separate method and call it there:
methods: {
  onHide() {
    alert('ff');
  },
},

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question