Vue style

necessary:

1. component called multiple words, to avoid conflict

2.Prop defined semantics

3.v-for setting the key value

4. Private property use $ _ to avoid conflict

5. Use only a prefix of the components to The basic component name should begin with a specific prefix

6. subassemblies should be the parent component name as a prefix

7. Place each component into a file, easy to find, reuse, component name PascalCase

8. The assembly name should be complete word

9.props key is always camelCase

10. The multiple property elements write multiple lines

11. The single-file start with a capital component

12. The non-null values ​​quoted HTML attributes

13. The elements of the characteristic sequence, is v-for v-if v-show v-pre v-once id ref key slot v-model

14.Vue.use, $mount , $el

Guess you like

Origin www.cnblogs.com/QQPrincekin/p/11302150.html