Replies: 1 comment
-
|
Hi Anniken! As mentioned in the docs, The element of the client script will always come right after the rendered Vue component, so you can usually access with import type { OnLoadFn } from 'iles'
export const onLoad: OnLoadFn = (el) => {
const animatableEl = el.previousElementSibling
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there! I'm trying to create a "Fade In component". I'm doing this by having a Template which contains a div and a script
and a setup script that takes a
keypropAnd a client script that adds the
.visibleclass to the divHowever, I don't know how I get the
keyprop within the client script. Anyone got ideas? I thought of having a <script> tag within the template which then declares a variable, but that didn't seem very scalable either, and AFAIK Vue ignores scripts in the template.Any help is appreciated. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions