Vue style guide: Multi-attribute elements


#1

The syle guide is awesome and quite clear. I strive to follow its advices as much as I can.

Regarding Multi-attribute elements, may I suggest to complete the exemple with where one should place directives (condition, loop…).

I find it quite useful to make directives stand out so that they aren’t lost among numerous attributes and are visible at the blink of an eye:

// directive on opening line
<MyComponent v-if="MyComponentVisible"
  foo="a"
  bar="b"
  baz="c"
/>

// or grouped directives (maybe more multi-directive friendly)
<MyComponent 
  v-if="MyComponentVisible"
  @event="doSomething"

  foo="a"
  bar="b"
  baz="c"
/>

What’s your take on this?


#2

As your feedback is directly related to vuejs.org you’d be better off lodging an issue with your recommendation. You could even file a pull request with your change/suggestion. https://github.com/vuejs/vuejs.org/issues


#3

You’re right. I’m going to submit a PR.

Thanks.