diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-10-03 19:07:41 -0500 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-10-03 19:12:53 -0500 |
commit | b88f70606d2fd5b0a116f08f7925143ff40214fa (patch) | |
tree | 3c3a150f348665340cb15cfa05f75bc5347567bf /doc | |
parent | aec1586c05f30c1a81928b441cd63e422752e56c (diff) | |
download | gitlab-ce-b88f70606d2fd5b0a116f08f7925143ff40214fa.tar.gz |
Re-arrange <script> tags before <template> tags in .vue files3612-update-script-template-order-in-vue-files
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/38743
Diffstat (limited to 'doc')
-rw-r--r-- | doc/development/fe_guide/style_guide_js.md | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/development/fe_guide/style_guide_js.md b/doc/development/fe_guide/style_guide_js.md index c8d23609280..77ae6d2a0ea 100644 --- a/doc/development/fe_guide/style_guide_js.md +++ b/doc/development/fe_guide/style_guide_js.md @@ -470,7 +470,25 @@ On those a default key should not be provided. ``` #### Ordering -1. Order for a Vue Component: + +1. Tag order in `.vue` file + + ``` + <script> + // ... + </script> + + <template> + // ... + </template> + + // We don't use scoped styles but there are few instances of this + <style> + // ... + </style> + ``` + +1. Properties in a Vue Component: 1. `name` 1. `props` 1. `mixins` @@ -490,6 +508,7 @@ On those a default key should not be provided. 1. `beforeDestroy` 1. `destroyed` + #### Vue and Bootstrap 1. Tooltips: Do not rely on `has-tooltip` class name for Vue components |