From 38faf56b409bbdca5ae34bc3ecff5f76f5729950 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 2 Aug 2023 14:59:10 +0300 Subject: [PATCH] Refactor #4231 - Update BaseComponent --- components/lib/basecomponent/BaseComponent.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/components/lib/basecomponent/BaseComponent.vue b/components/lib/basecomponent/BaseComponent.vue index 530328763..934cddc9e 100644 --- a/components/lib/basecomponent/BaseComponent.vue +++ b/components/lib/basecomponent/BaseComponent.vue @@ -380,7 +380,10 @@ export default { isUnstyled: { immediate: true, handler(newValue) { - !newValue && this._loadStyle(); + if (!newValue) { + loadStyle(); + this.$options.css && this.$css.loadStyle(); + } } } }, @@ -414,14 +417,10 @@ export default { methods: { _hook(hookName) { const selfHook = this._getOptionValue(this.pt, `hooks.${hookName}`); - const globalHook = this._getOptionValue(this.globalPT, `hooks.${hookName}`); + const defaultHook = this._getOptionValue(this.defaultPT, `hooks.${hookName}`); selfHook?.(); - globalHook?.(); - }, - _loadStyle() { - loadStyle(); - this.$options.css && this.$css.loadStyle(); + defaultHook?.(); }, _loadGlobalStyles() { /*