v-el
-
Does not expect expression
-
Argument:
id (required)
-
Usage:
Register a reference to a DOM element on its owner Vue instance’s
$els
object for easier access. -
Note:
Because HTML is case-insensitive, camelCase usage like
v-el:someEl
will be converted to all lowercase. You can usev-el:some-el
which properly setsthis.$els.someEl
. -
Example:
12<
span
v-el:msg>hello</
span
>
<
span
v-el:other-msg>world</
span
>
12this
.$els.msg.textContent
// -> "hello"
this
.$els.otherMsg.textContent
// -> "world"
Please login to continue.