$el element in binding directives #1822
Answered
by
alexej-d
Sulaymon-dev
asked this question in
1. Help
-
for binding styles i can access to element with $el <div x-data="accordion({isMultiple:false,defaultExpand:2})" class="accordion">
<div class="accordion-item" x-key="1">
<div class="accordion-header">Header</div>
<div class="accordion-content" :style="getContentStyle($el)">Item</div>
</div>
</div> but in custom directives how can I access in $el ? content: {
[':style']($el) {
console.log($el)
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
alexej-d
Jul 22, 2021
Replies: 1 comment 1 reply
-
Have you tried using |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Sulaymon-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried using
this.$el
?