Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Commit

Permalink
📝 docs(vuepress): update interpolation
Browse files Browse the repository at this point in the history
closes #727
  • Loading branch information
kazupon committed Oct 15, 2019
1 parent 3217212 commit 3689049
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions vuepress/guide/interpolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@ It's more convenient to use the named slots syntax. For example:
<div id="app">
<!-- ... -->
<i18n path="info" tag="p">
<span slot="limit">{{ changeLimit }}</span>
<a slot="action" :href="changeUrl">{{ $t('change') }}</a>
<template v-slot:limit>
<span>{{ changeLimit }}</span>
</template>
<template v-slot:action>
<a :href="changeUrl">{{ $t('change') }}</a>
</template>
</i18n>
<!-- ... -->
</div>
Expand Down Expand Up @@ -157,8 +161,12 @@ In Vue 2.6 and later, you can can use the following slots syntax in templates:
<div id="app">
<!-- ... -->
<i18n path="info" tag="p">
<span v-slot:limit>{{ changeLimit }}</span>
<a v-slot:action :href="changeUrl">{{ $t('change') }}</a>
<template #limit>
<span>{{ changeLimit }}</span>
</template>
<template #action>
<a :href="changeUrl">{{ $t('change') }}</a>
</template>
</i18n>
<!-- ... -->
</div>
Expand Down

0 comments on commit 3689049

Please sign in to comment.