vue.jsreact-dom-server

Vue bind without colon or shorthand


Vue has any way to don't use the shorthand or colon? this is not valid html and I have problems implementing it with React-Dom for server rendering in Node.js

error


Solution

  • Vue 2.4.0+ syntax can be used:

    <a v-on="{click:myFunc}" ...
    

    For this syntax passive, once and capture modifiers can be assigned using &, ~ and ! prefixes correspondingly (Event & Key Modifiers).

    Other modifiers aren't implemented yet (see this issue: Extending object syntax of v-on to support modifiers #7846).