From 7659669d0c17f7d77866b0da81e29d35834855a9 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Wed, 24 Jan 2024 18:05:29 +0300 Subject: [PATCH] `mounted` update for BaseDirective --- components/lib/basedirective/BaseDirective.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/lib/basedirective/BaseDirective.js b/components/lib/basedirective/BaseDirective.js index 774a3e496..43dbbf0b4 100644 --- a/components/lib/basedirective/BaseDirective.js +++ b/components/lib/basedirective/BaseDirective.js @@ -128,6 +128,10 @@ const BaseDirective = { handleHook('beforeMount', el, binding, vnode, prevVnode); }, mounted: (el, binding, vnode, prevVnode) => { + const config = BaseDirective._getConfig(binding, vnode); + + BaseStyle.loadStyle({ nonce: config?.csp?.nonce }); + !el.$instance?.isUnstyled() && el.$instance?.$style?.loadStyle({ nonce: config?.csp?.nonce }); handleHook('mounted', el, binding, vnode, prevVnode); }, beforeUpdate: (el, binding, vnode, prevVnode) => {