From 8f7ee3ac331e25245cac16af6b519066c3a25a41 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Tue, 23 Jan 2024 18:06:31 +0000 Subject: [PATCH] Reverted #4953 --- components/lib/accordion/Accordion.vue | 2 +- components/lib/autocomplete/AutoComplete.vue | 4 +--- components/lib/cascadeselect/CascadeSelect.vue | 4 +--- components/lib/contextmenu/ContextMenu.vue | 5 ++--- components/lib/dock/DockSub.vue | 2 +- components/lib/dropdown/Dropdown.vue | 4 +--- components/lib/listbox/Listbox.vue | 4 +--- components/lib/megamenu/MegaMenu.vue | 4 +--- components/lib/menu/Menu.vue | 5 ++--- components/lib/menubar/Menubar.vue | 4 +--- components/lib/multiselect/MultiSelect.vue | 4 +--- components/lib/orderlist/OrderList.vue | 5 ++--- components/lib/panelmenu/PanelMenu.vue | 2 +- components/lib/picklist/PickList.vue | 1 - components/lib/speeddial/SpeedDial.vue | 7 +++---- components/lib/tabview/TabView.vue | 4 +--- components/lib/tieredmenu/TieredMenu.vue | 2 +- 17 files changed, 21 insertions(+), 42 deletions(-) diff --git a/components/lib/accordion/Accordion.vue b/components/lib/accordion/Accordion.vue index 303b85dd5..dfd54e2b5 100755 --- a/components/lib/accordion/Accordion.vue +++ b/components/lib/accordion/Accordion.vue @@ -79,7 +79,7 @@ export default { this.d_activeIndex = newValue; } }, - beforeMount() { + mounted() { this.id = this.id || UniqueComponentId(); }, methods: { diff --git a/components/lib/autocomplete/AutoComplete.vue b/components/lib/autocomplete/AutoComplete.vue index f038bedc4..7c6e80d52 100755 --- a/components/lib/autocomplete/AutoComplete.vue +++ b/components/lib/autocomplete/AutoComplete.vue @@ -223,10 +223,8 @@ export default { this.autoUpdateModel(); } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); this.autoUpdateModel(); }, updated() { diff --git a/components/lib/cascadeselect/CascadeSelect.vue b/components/lib/cascadeselect/CascadeSelect.vue index 6126c5435..8992fd0b4 100644 --- a/components/lib/cascadeselect/CascadeSelect.vue +++ b/components/lib/cascadeselect/CascadeSelect.vue @@ -115,10 +115,8 @@ export default { this.autoUpdateModel(); } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); this.autoUpdateModel(); }, beforeUnmount() { diff --git a/components/lib/contextmenu/ContextMenu.vue b/components/lib/contextmenu/ContextMenu.vue index ac548b63d..7ed03f0a3 100755 --- a/components/lib/contextmenu/ContextMenu.vue +++ b/components/lib/contextmenu/ContextMenu.vue @@ -76,10 +76,9 @@ export default { } } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); + if (this.global) { this.bindDocumentContextMenuListener(); } diff --git a/components/lib/dock/DockSub.vue b/components/lib/dock/DockSub.vue index e57bb9579..ad1732f39 100644 --- a/components/lib/dock/DockSub.vue +++ b/components/lib/dock/DockSub.vue @@ -110,7 +110,7 @@ export default { this.id = newValue || UniqueComponentId(); } }, - beforeMount() { + mounted() { this.id = this.id || UniqueComponentId(); }, methods: { diff --git a/components/lib/dropdown/Dropdown.vue b/components/lib/dropdown/Dropdown.vue index 8ac476725..a22956844 100755 --- a/components/lib/dropdown/Dropdown.vue +++ b/components/lib/dropdown/Dropdown.vue @@ -215,10 +215,8 @@ export default { this.autoUpdateModel(); } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); this.autoUpdateModel(); this.bindLabelClickListener(); }, diff --git a/components/lib/listbox/Listbox.vue b/components/lib/listbox/Listbox.vue index ee62c366b..81de9724e 100755 --- a/components/lib/listbox/Listbox.vue +++ b/components/lib/listbox/Listbox.vue @@ -155,10 +155,8 @@ export default { this.autoUpdateModel(); } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); this.autoUpdateModel(); }, methods: { diff --git a/components/lib/megamenu/MegaMenu.vue b/components/lib/megamenu/MegaMenu.vue index d459c2a7e..ce3c8f31b 100755 --- a/components/lib/megamenu/MegaMenu.vue +++ b/components/lib/megamenu/MegaMenu.vue @@ -98,10 +98,8 @@ export default { } } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); this.bindMatchMediaListener(); }, beforeUnmount() { diff --git a/components/lib/menu/Menu.vue b/components/lib/menu/Menu.vue index b80828e54..4bb75c1c8 100644 --- a/components/lib/menu/Menu.vue +++ b/components/lib/menu/Menu.vue @@ -73,10 +73,9 @@ export default { resizeListener: null, container: null, list: null, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); + if (!this.popup) { this.bindResizeListener(); this.bindOutsideClickListener(); diff --git a/components/lib/menubar/Menubar.vue b/components/lib/menubar/Menubar.vue index 8729ca411..e397c176f 100755 --- a/components/lib/menubar/Menubar.vue +++ b/components/lib/menubar/Menubar.vue @@ -93,10 +93,8 @@ export default { outsideClickListener: null, container: null, menubar: null, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); this.bindMatchMediaListener(); }, beforeUnmount() { diff --git a/components/lib/multiselect/MultiSelect.vue b/components/lib/multiselect/MultiSelect.vue index e93db6d63..33f09d784 100755 --- a/components/lib/multiselect/MultiSelect.vue +++ b/components/lib/multiselect/MultiSelect.vue @@ -241,10 +241,8 @@ export default { this.autoUpdateModel(); } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); this.autoUpdateModel(); }, beforeUnmount() { diff --git a/components/lib/orderlist/OrderList.vue b/components/lib/orderlist/OrderList.vue index 0bc7e67aa..c79c6ddd6 100755 --- a/components/lib/orderlist/OrderList.vue +++ b/components/lib/orderlist/OrderList.vue @@ -116,10 +116,9 @@ export default { this.reorderDirection = null; } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); + if (this.responsive) { this.createStyle(); } diff --git a/components/lib/panelmenu/PanelMenu.vue b/components/lib/panelmenu/PanelMenu.vue index 0a7aaa72f..8abec3f03 100644 --- a/components/lib/panelmenu/PanelMenu.vue +++ b/components/lib/panelmenu/PanelMenu.vue @@ -76,7 +76,7 @@ export default { this.id = newValue || UniqueComponentId(); } }, - beforeMount() { + mounted() { this.id = this.id || UniqueComponentId(); }, methods: { diff --git a/components/lib/picklist/PickList.vue b/components/lib/picklist/PickList.vue index 63f709cc7..883af4b13 100755 --- a/components/lib/picklist/PickList.vue +++ b/components/lib/picklist/PickList.vue @@ -276,7 +276,6 @@ export default { this.destroyStyle(); this.destroyMedia(); }, - beforeMount() {}, mounted() { this.id = this.id || UniqueComponentId(); diff --git a/components/lib/speeddial/SpeedDial.vue b/components/lib/speeddial/SpeedDial.vue index 603fcfd72..e2ca2aded 100644 --- a/components/lib/speeddial/SpeedDial.vue +++ b/components/lib/speeddial/SpeedDial.vue @@ -84,10 +84,9 @@ export default { this.d_visible = newValue; } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); + if (this.type !== 'linear') { const button = DomHandler.findSingle(this.container, '[data-pc-name="button"]'); const firstItem = DomHandler.findSingle(this.list, '[data-pc-section="menuitem"]'); @@ -105,7 +104,7 @@ export default { this.bindDocumentClickListener(); } }, - beforeMount() { + beforeUnmount() { this.unbindDocumentClickListener(); }, methods: { diff --git a/components/lib/tabview/TabView.vue b/components/lib/tabview/TabView.vue index e5ce2b3b0..f2470065a 100755 --- a/components/lib/tabview/TabView.vue +++ b/components/lib/tabview/TabView.vue @@ -121,10 +121,8 @@ export default { this.scrollInView({ index: newValue }); } }, - beforeMount() { - this.id = this.id || UniqueComponentId(); - }, mounted() { + this.id = this.id || UniqueComponentId(); this.updateInkBar(); this.scrollable && this.updateButtonState(); }, diff --git a/components/lib/tieredmenu/TieredMenu.vue b/components/lib/tieredmenu/TieredMenu.vue index 9064b38ec..78b9660f0 100755 --- a/components/lib/tieredmenu/TieredMenu.vue +++ b/components/lib/tieredmenu/TieredMenu.vue @@ -85,7 +85,7 @@ export default { } } }, - beforeMount() { + mounted() { this.id = this.id || UniqueComponentId(); }, beforeUnmount() {