`mounted` update for BaseDirective

pull/5161/head
tugcekucukoglu 2024-01-24 18:05:29 +03:00
parent 854c3362a2
commit 7659669d0c
1 changed files with 4 additions and 0 deletions

View File

@ -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) => {