[Doc] use v-slot in demos (#3573)

This commit is contained in:
neverland
2019-06-20 17:32:00 +08:00
committed by GitHub
parent 729b9dac4b
commit d9f2ad6759
25 changed files with 141 additions and 170 deletions

View File

@@ -4,45 +4,49 @@
<van-notice-bar>{{ $t('tips') }}</van-notice-bar>
<demo-block :title="$t('basicUsage')">
<van-swipe-cell>
<van-button
square
slot="left"
type="danger"
:text="$t('button1')"
/>
<template v-slot:left>
<van-button
square
type="danger"
:text="$t('button1')"
/>
</template>
<van-cell
:border="false"
:title="$t('title')"
:value="$t('content')"
/>
<van-button
square
slot="right"
type="danger"
:text="$t('button2')"
/>
<template v-slot:right>
<van-button
square
type="danger"
:text="$t('button2')"
/>
</template>
</van-swipe-cell>
</demo-block>
<demo-block :title="$t('title2')">
<van-swipe-cell :on-close="onClose">
<van-button
square
slot="left"
type="danger"
:text="$t('button1')"
/>
<template v-slot:left>
<van-button
square
type="danger"
:text="$t('button1')"
/>
</template>
<van-cell
:border="false"
:title="$t('title')"
:value="$t('content')"
/>
<van-button
square
slot="right"
type="danger"
:text="$t('button2')"
/>
<template v-slot:right>
<van-button
square
type="danger"
:text="$t('button2')"
/>
</template>
</van-swipe-cell>
</demo-block>
</demo-section>