| Name | Type | Default |
|
animationShowDuration
# |
Number
|
350
|
Sets or gets the duration of the show animation.
<template>
<JqxMenu ref="myMenu" :width="400" :animationShowDuration="3000">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
animationHideDuration
# |
Number
|
250
|
Sets or gets the duration of the hide animation.
<template>
<JqxMenu ref="myMenu" :width="400" :animationHideDuration="3000">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
animationHideDelay
# |
Number
|
500
|
Sets or gets the delay before the start of the hide animation.
<template>
<JqxMenu ref="myMenu" :width="400" :animationHideDelay="3000">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
animationShowDelay
# |
Number
|
200
|
Sets or gets the delay before the start of the show animation.
<template>
<JqxMenu ref="myMenu" :width="400" :animationShowDelay="300">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
autoCloseInterval
# |
Number
|
10000
|
Sets or gets the time interval after which all opened items will be closed. When you open a new sub menu, the interval is cleared. If you want to disable this automatic closing behavior of the jqxMenu, you need to set the autoCloseInterval property to 0.
<template>
<JqxMenu ref="myMenu" :width="400" :autoCloseInterval="300">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
autoSizeMainItems
# |
Boolean
|
true
|
Auto-Sizes the jqxMenu's main items when the menu's mode is 'horizontal'.
<template>
<JqxMenu ref="myMenu" :width="400" :autoSizeMainItems="false">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
autoCloseOnClick
# |
Boolean
|
true
|
Automatically closes the opened popups after a click.
<template>
<JqxMenu ref="myMenu" :width="400" :autoCloseOnClick="false">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
Opens the Context Menu when the right-mouse button is pressed. When this property is set to false, the Open and Close functions can be used to open and close the Context Menu.
<template>
<JqxMenu ref="myMenu" :width="400" :autoOpenPopup="false">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
autoOpen
# |
Boolean
|
true
|
Opens the top level menu items when the user hovers them.
<template>
<JqxMenu ref="myMenu" :width="400" :autoOpen="false">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
autoCloseOnMouseLeave
# |
Boolean
|
true
|
<template>
<JqxMenu ref="myMenu" :width="400" :autoCloseOnMouseLeave="false">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
clickToOpen
# |
Boolean
|
false
|
Opens an item after a click by the user.
<template>
<JqxMenu ref="myMenu" :width="400" :clickToOpen="true">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
disabled
# |
Boolean
|
false
|
Enables or disables the jqxMenu.
<template>
<JqxMenu ref="myMenu" :width="400" :disabled="true">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
enableHover
# |
Boolean
|
true
|
Enables or disables the hover state.
<template>
<JqxMenu ref="myMenu" :width="400" :enableHover="false">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
easing
# |
String
|
easeInOutSine
|
Sets or gets the animation's easing to one of the JQuery's supported easings.
<template>
<JqxMenu ref="myMenu" :width="400" :easing="'linear'">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
height
# |
Number | String
|
null
|
Sets or gets the jqxMenu's height.
<template>
<JqxMenu ref="myMenu" :width="400" :height="30">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
keyboardNavigation
# |
Boolean
|
false
|
Enables or disables the jqxMenu's keyboard navigation.
<template>
<JqxMenu ref="myMenu" :width="400" :keyboardNavigation="true">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
minimizeWidth
# |
String | Number
|
'auto'
|
Sets or gets the jqxMenu's minimizeWidth. That width determines the minimum browser window's width when the Menu will switch from normal to minimized mode and the Menu's width is in percentages. Set it to null, if you want to disable that behavior. Note: jqxMenu automatically switches to minimized mode, when it is displayed on a touch device. By setting the property to null, you will disable that behavior, too.
<template>
<JqxMenu ref="myMenu" :width="400" :minimizeWidth="450">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
mode
# |
String
|
horizontal
|
Sets or gets the menu's display mode.
Possible Values:
'horizontal'
'vertical'
'popup'
<template>
<JqxMenu ref="myMenu" :width="400" :mode="'vertical'">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
Sets or gets the popup's z-index.
<template>
<JqxMenu ref="myMenu" :width="400" :popupZIndex="99999">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
rtl
# |
Boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
<template>
<JqxMenu ref="myMenu" :width="400" :rtl="true">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
showTopLevelArrows
# |
Boolean
|
false
|
<template>
<JqxMenu ref="myMenu" :width="400" :showTopLevelArrows="true">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
source
# |
Array | Object
|
null
|
Specifies the jqxMenu's data source. Use this property to populate the jqxMenu.
- label - item's label.
- value - item's value.
- html - item's html. The html to be displayed in the item.
- id - item's id.
- items - array of sub items.
- subMenuWidth - sets the sub menu's width.
- disabled - determines whether the item is enabled/disabled.
<template>
<JqxMenu ref="myMenu" :width="200" :source="source" :mode="'vertical'" />
</template>
<script setup>
import { ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
const source = ref([
{ label: 'Mail', items: [{ label: 'Calendar' }, { label: 'Contacts' }] },
{
label: 'Inbox',
items: [
{ label: 'Admin' },
{ label: 'Corporate' },
{ label: 'Finance' },
{ label: 'Other' }
]
},
{ label: 'Deleted Items' }
]);
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxMenu ref="myMenu" :width="400" :theme="'material'">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
width
# |
Number | String
|
null
|
Sets or gets the jqxMenu's width.
<template>
<JqxMenu ref="myMenu" :width="400">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
</script>
|
|
|
|
closed
# |
Event
|
|
This event is triggered when any of the jqxMenu Sub Menus is closed.
Code examples #
Bind to the closed event of jqxMenu.
<template>
<JqxMenu ref="myMenu" @closed="onClosed($event)" :width="400">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
function onClosed(event) {
alert('do something...');
}
</script>
|
|
itemclick
# |
Event
|
|
This event is triggered when a menu item is clicked.
Code examples #
Bind to the itemclick event of jqxMenu.
<template>
<JqxMenu ref="myMenu" @itemclick="onItemclick($event)" :width="400">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
function onItemclick(event) {
alert('do something...');
}
</script>
|
|
shown
# |
Event
|
|
This event is triggered when any of the jqxMenu Sub Menus is displayed.
Code examples #
Bind to the shown event of jqxMenu.
<template>
<JqxMenu ref="myMenu" @shown="onShown($event)" :width="400">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
function onShown(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
closeItem
# |
itemID
|
None
|
Closes a menu item.
<template>
<div>
<JqxMenu ref="myMenu" :width="400" :autoCloseOnMouseLeave="false">
<ul>
<li>Home</li>
<li>About Us</li>
<li id="products">
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
<JqxButton :width="100" @click="open()">Open Products</JqxButton>
<JqxButton :width="100" @click="close()">Close Products</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myMenu = ref(null);
function open() {
myMenu.value.openItem('products');
}
function close() {
myMenu.value.closeItem('products');
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 50px;
margin-right: 20px;
}
</style>
|
|
close
# |
None
|
None
|
Closes the menu (only in context menu mode).
<template>
<div>
<div
@contextmenu="contextmenuMenu($event)"
style="
vertical-align: middle;
text-align: center;
background: #eee;
height: 400px;
width: 400px;
"
>
<JqxMenu
ref="jqxMenu"
:mode="'popup'"
:autoOpenPopup="false"
:width="120"
:height="140"
>
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
<span
style="font-size: 14px; position: relative; top: 180px; font-family: Verdana Arial"
>
Context Menu will open here
</span>
</div>
<JqxButton @click="open()">Open Menu</JqxButton>
<JqxButton @click="close()">Close Menu</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const jqxMenu = ref(null);
function contextmenuMenu(e) {
e.preventDefault();
}
function open(event) {
jqxMenu.value.open(100, 100);
}
function close(event) {
jqxMenu.value.close();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 15px;
margin-right: 20px;
}
</style>
|
|
disable
# |
itemID, value
|
None
|
Disables or enables a menu item. The method has two parameters - HTML Element ID and a boolean value which determines whether to disable or enable the element.
<template>
<div>
<JqxMenu ref="myMenu" :width="400" :autoCloseOnMouseLeave="false">
<ul>
<li>Home</li>
<li>About Us</li>
<li id="products">
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
<JqxButton :width="100" @click="open()">Disable Products</JqxButton>
<JqxButton :width="100" @click="close()">Enable Products</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myMenu = ref(null);
function open() {
myMenu.value.disable('products', true);
}
function close() {
myMenu.value.disable('products', false);
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 50px;
margin-right: 20px;
}
</style>
|
|
destroy
# |
None
|
None
|
Destroys the widget.
<template>
<JqxMenu ref="myMenu" :width="400">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
const myMenu = ref(null);
onMounted(() => {
myMenu.value.destroy();
});
</script>
|
|
focus
# |
None
|
None
|
Focuses the widget.
<template>
<JqxMenu ref="myMenu" :width="400">
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
const myMenu = ref(null);
onMounted(() => {
myMenu.value.focus();
});
</script>
|
|
minimize
# |
None
|
None
|
Minimizes the widget.
<template>
<div>
<JqxMenu ref="myMenu" :width="400">
<ul>
<li>Home</li>
<li>About Us</li>
<li id="products">
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
<JqxButton :width="100" @click="minimize()">Minimize</JqxButton>
<JqxButton :width="100" @click="restore()">Restore</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myMenu = ref(null);
function minimize() {
myMenu.value.minimize();
}
function restore() {
myMenu.value.restore();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 50px;
margin-right: 20px;
}
</style>
|
|
open
# |
left, top
|
None
|
Opens the menu(only in context menu mode).
<template>
<div>
<div
@contextmenu="contextmenuMenu($event)"
style="
vertical-align: middle;
text-align: center;
background: #eee;
height: 400px;
width: 400px;
"
>
<JqxMenu
ref="jqxMenu"
:mode="'popup'"
:autoOpenPopup="false"
:width="120"
:height="140"
>
<ul>
<li>Home</li>
<li>About Us</li>
<li>
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
<span
style="font-size: 14px; position: relative; top: 180px; font-family: Verdana Arial"
>
Context Menu will open here
</span>
</div>
<JqxButton @click="open()">Open Menu</JqxButton>
<JqxButton @click="close()">Close Menu</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const jqxMenu = ref(null);
function contextmenuMenu(e) {
e.preventDefault();
}
function open(event) {
jqxMenu.value.open(100, 100);
}
function close(event) {
jqxMenu.value.close();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 15px;
margin-right: 20px;
}
</style>
|
|
openItem
# |
itemID
|
None
|
Opens a menu item
<template>
<div>
<JqxMenu ref="myMenu" :width="400" :autoCloseOnMouseLeave="false">
<ul>
<li>Home</li>
<li>About Us</li>
<li id="products">
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
<JqxButton :width="100" @click="open()">Open Products</JqxButton>
<JqxButton :width="100" @click="close()">Close Products</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myMenu = ref(null);
function open() {
myMenu.value.openItem('products');
}
function close() {
myMenu.value.closeItem('products');
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 50px;
margin-right: 20px;
}
</style>
|
|
restore
# |
None
|
None
|
Restores the widget from the "minimized" state.
<template>
<div>
<JqxMenu ref="myMenu" :width="400">
<ul>
<li>Home</li>
<li>About Us</li>
<li id="products">
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
<JqxButton :width="100" @click="minimize()">Minimize</JqxButton>
<JqxButton :width="100" @click="restore()">Restore</JqxButton>
</div>
</template>
<script setup>
import { ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myMenu = ref(null);
function minimize() {
myMenu.value.minimize();
}
function restore() {
myMenu.value.restore();
}
</script>
<style>
.jqx-button {
display: inline-block;
margin-top: 50px;
margin-right: 20px;
}
</style>
|
|
setItemOpenDirection
# |
item, horizontaldirection, verticaldirection
|
None
|
Sets the item's popup open direction
<template>
<JqxMenu style="margin-top: 80px" ref="myMenu" :width="400">
<ul>
<li>Home</li>
<li>About Us</li>
<li id="products">
Products
<ul>
<li>
New
<ul>
<li>Corporate Use</li>
<li>Private Use</li>
</ul>
</li>
<li>Featured</li>
</ul>
</li>
<li>Events</li>
</ul>
</JqxMenu>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxMenu from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxmenu.vue';
const myMenu = ref(null);
onMounted(() => {
myMenu.value.setItemOpenDirection('products', 'left', 'up');
});
</script>
|