The Popover component for Vue represents a small overlay of content that is used to display secondary information of any element when it is clicked by a user.
Refer to Vue Getting Started before you start with this help topic.
After you have created your App.vue file, here is how you should structure it:
The Popover component for Vue requires the following import:
Add the jqxPopover component to the components section of the the Vue class:
The App.vue has a <template>
structural tag where we determine the application structure.
There we will also set the tags for the new components - <JqxPopover/>
The properties of the <JqxPopover/> component are defined in the data
member of the Vue class.
We should put them in the return object of the data function:
The events in Vue are set as an attribute with @ prefix, for example:
All events that are bound to a component are implemented in the methods
member of the Vue class.
To use a component's method we should have its reference. In Vue we refer to a component by the special $refs
property.
Before that we need to add the desired name reference to that component:
<JqxPopover ref="popover"></JqxPopover>
Here how you can use a component's method:
this.$refs.popover.close();
If we want to add additional methods we should also implement them in the methods
member.
In case we need to do something after the components are rendered, we should use the mounted
member.
In this case:
If you have followed the above steps, you App.vue file would look like this: