mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #4351 - For ContextMenu
This commit is contained in:
parent
55efc21638
commit
3e59aa18b9
2 changed files with 46 additions and 9 deletions
|
@ -22,6 +22,7 @@
|
|||
:level="0"
|
||||
:visible="submenuVisible"
|
||||
:pt="pt"
|
||||
:unstyled="unstyled"
|
||||
@focus="onFocus"
|
||||
@blur="onBlur"
|
||||
@keydown="onKeyDown"
|
||||
|
@ -78,6 +79,18 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
if (!this.$slots.item) {
|
||||
console.warn('In future versions, vue-router support will be removed. Item templating should be used.');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.id || UniqueComponentId();
|
||||
|
||||
if (this.global) {
|
||||
this.bindDocumentContextMenuListener();
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.unbindResizeListener();
|
||||
this.unbindOutsideClickListener();
|
||||
|
@ -90,13 +103,6 @@ export default {
|
|||
this.target = null;
|
||||
this.container = null;
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.id || UniqueComponentId();
|
||||
|
||||
if (this.global) {
|
||||
this.bindDocumentContextMenuListener();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getItemProp(item, name) {
|
||||
return item ? ObjectUtils.getItemValue(item[name]) : undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue