Added a note about v-slot directive

This commit is contained in:
Natalia Tepluhina 2019-05-28 14:03:27 +00:00 committed by Phil Hughes
parent fe09079707
commit ac02e49631
1 changed files with 12 additions and 2 deletions

View File

@ -544,14 +544,24 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
<component @click="eventHandler"/>
```
1. Shorthand `:` is preferable over `v-bind`
2. Shorthand `:` is preferable over `v-bind`
```javascript
// bad
<component v-bind:class="btn"/>
// 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