From 78fef4be6b638208e61c77156932a203e2625330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 2 Jun 2023 17:28:59 +0300 Subject: [PATCH] Refactor #3965 - Update Base components --- components/lib/avatargroup/BaseAvatarGroup.vue | 14 ++++++-------- components/lib/inlinemessage/BaseInlineMessage.vue | 14 ++++++-------- components/lib/message/BaseMessage.vue | 14 ++++++-------- components/lib/rating/BaseRating.vue | 14 ++++++-------- components/lib/toolbar/BaseToolbar.vue | 14 ++++++-------- 5 files changed, 30 insertions(+), 40 deletions(-) diff --git a/components/lib/avatargroup/BaseAvatarGroup.vue b/components/lib/avatargroup/BaseAvatarGroup.vue index 9120319d3..86d3e239a 100644 --- a/components/lib/avatargroup/BaseAvatarGroup.vue +++ b/components/lib/avatargroup/BaseAvatarGroup.vue @@ -23,15 +23,13 @@ export default { name: 'BaseAvatarGroup', extends: BaseComponent, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/inlinemessage/BaseInlineMessage.vue b/components/lib/inlinemessage/BaseInlineMessage.vue index b5e77b59c..d6d34bb52 100644 --- a/components/lib/inlinemessage/BaseInlineMessage.vue +++ b/components/lib/inlinemessage/BaseInlineMessage.vue @@ -42,15 +42,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/message/BaseMessage.vue b/components/lib/message/BaseMessage.vue index 43ed4e080..3112880de 100644 --- a/components/lib/message/BaseMessage.vue +++ b/components/lib/message/BaseMessage.vue @@ -93,15 +93,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/rating/BaseRating.vue b/components/lib/rating/BaseRating.vue index 04d298f43..d7b5ee8af 100644 --- a/components/lib/rating/BaseRating.vue +++ b/components/lib/rating/BaseRating.vue @@ -88,15 +88,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } }; diff --git a/components/lib/toolbar/BaseToolbar.vue b/components/lib/toolbar/BaseToolbar.vue index ccee98a41..ff49fcada 100644 --- a/components/lib/toolbar/BaseToolbar.vue +++ b/components/lib/toolbar/BaseToolbar.vue @@ -43,15 +43,13 @@ export default { } }, css: { - classes + classes, + loadStyle }, - watch: { - isUnstyled: { - immediate: true, - handler(newValue) { - !newValue && loadStyle(); - } - } + provide() { + return { + $parentInstance: this + }; } };