You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/order-in-components.md
+19-2Lines changed: 19 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -65,31 +65,48 @@ export default {
65
65
"order": [
66
66
"el",
67
67
"name",
68
+
"key",
68
69
"parent",
69
70
"functional",
70
71
["delimiters", "comments"],
71
72
["components", "directives", "filters"],
72
73
"extends",
73
74
"mixins",
75
+
["provide", "inject"],
76
+
"ROUTER_GUARDS",
77
+
"middleware",
78
+
"validate",
74
79
"inheritAttrs",
75
80
"model",
76
81
["props", "propsData"],
82
+
"emits",
83
+
"setup",
77
84
"fetch",
78
85
"asyncData",
79
86
"data",
80
87
"computed",
81
88
"watch",
89
+
"watchQuery",
82
90
"LIFECYCLE_HOOKS",
83
91
"methods",
84
92
"head",
93
+
"layout",
85
94
["template", "render"],
86
-
"renderError"
95
+
"renderError",
96
+
"transition",
97
+
"loading",
98
+
"scrollToTop"
87
99
]
88
100
}]
89
101
}
90
102
```
91
103
92
-
-`order` (`(string | string[])[]`) ... The order of properties. Elements are the property names or `LIFECYCLE_HOOKS`. If an element is the array of strings, it means any of those can be placed there unordered. Default is above.
104
+
-`order` (`(string | string[])[]`) ... The order of properties. Elements are the property names or one of the following groups:
105
+
106
+
-`LIFECYCLE_HOOKS`: [Vue Lifecycle Events](https://vuejs.org/v2/guide/instance.html#Lifecycle-Diagram), in the order they are called
107
+
-`ROUTER_GUARDS`: [Vue Router Navigation Guards](https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards), in the order they are called
108
+
109
+
If an element is an array of strings, it means any of those can be placed there unordered. Default is above.
0 commit comments