Merge branch 'ntepluhina-master-patch-12194' into 'master'
Added a note about v-slot directive See merge request gitlab-org/gitlab-ce!28826
This commit is contained in:
commit
df7bebd67c
|
@ -544,14 +544,24 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
|
||||||
<component @click="eventHandler"/>
|
<component @click="eventHandler"/>
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Shorthand `:` is preferable over `v-bind`
|
2. Shorthand `:` is preferable over `v-bind`
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// bad
|
// bad
|
||||||
<component v-bind:class="btn"/>
|
<component v-bind:class="btn"/>
|
||||||
|
|
||||||
// good
|
// good
|
||||||
<component :class="btsn"/>
|
<component :class="btn"/>
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Shorthand `#` is preferable over `v-slot`
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// bad
|
||||||
|
<template v-slot:header></template>
|
||||||
|
|
||||||
|
// good
|
||||||
|
<template #header></template>
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Closing tags
|
#### Closing tags
|
||||||
|
|
Loading…
Reference in New Issue