Vue Panel Component

The Panel component for Vue represents a panel widget. This widget is a container for other widgets or elements. It automatically adds horizontal and vertical scrollbars, if the content is not fully visible.

Prerequisites

Refer to Vue Getting Started before you start with this help topic.

Configuration

After you have created your App.vue file, here is how you should structure it:

The Panel component for Vue requires the following import:


Add the jqxPanel component to the components section of the the Vue class:


Template

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 - <JqxPanel/>


Properties

The properties of the <JqxPanel/> component are defined in the data member of the Vue class. We should put them in the return object of the data function:


Methods

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:

<JqxPanel ref="panel"></JqxPanel>

Here how you can use a component's method:

this.$refs.panel.focus();

If we want to add additional methods we should also implement them in the methods member.

In case we need to do some precalculation or something else before the components are rendered, we should use the beforeCreate member. It depends on the case.

If you have followed the above steps, you App.vue file would look like this:

App.vue: