v-el

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 use v-el:some-el which properly sets this.$els.someEl.

  • Example:

    <span v-el:msg>hello</span>
    <span v-el:other-msg>world</span>
    this.$els.msg.textContent // -> "hello"
    this.$els.otherMsg.textContent // -> "world"
doc_VueJS
2016-09-25 05:48:15
Comments
Leave a Comment

Please login to continue.