[Doc] SwipeCell: update demo

This commit is contained in:
陈嘉涵
2019-05-29 14:59:51 +08:00
parent 764cad3393
commit 3059f5dcc4
4 changed files with 118 additions and 70 deletions

View File

@@ -4,34 +4,52 @@
<van-notice-bar>{{ $t('tips') }}</van-notice-bar>
<demo-block :title="$t('basicUsage')">
<van-swipe-cell
:right-width="65"
:left-width="65"
:right-width="60"
:left-width="60"
>
<span slot="left">{{ $t('button1') }}</span>
<van-cell-group>
<van-cell
:title="$t('title')"
:value="$t('content')"
/>
</van-cell-group>
<span slot="right">{{ $t('button2') }}</span>
<van-button
square
slot="left"
type="danger"
:text="$t('button1')"
/>
<van-cell
:border="false"
:title="$t('title')"
:value="$t('content')"
/>
<van-button
square
slot="right"
type="danger"
:text="$t('button2')"
/>
</van-swipe-cell>
</demo-block>
<demo-block :title="$t('title2')">
<van-swipe-cell
:right-width="65"
:left-width="65"
:right-width="60"
:left-width="60"
:on-close="onClose"
>
<span slot="left">{{ $t('button1') }}</span>
<van-cell-group>
<van-cell
:title="$t('title')"
:value="$t('content')"
/>
</van-cell-group>
<span slot="right">{{ $t('button2') }}</span>
<van-button
square
slot="left"
type="danger"
:text="$t('button1')"
/>
<van-cell
:border="false"
:title="$t('title')"
:value="$t('content')"
/>
<van-button
square
slot="right"
type="danger"
:text="$t('button2')"
/>
</van-swipe-cell>
</demo-block>
</demo-section>
@@ -85,19 +103,5 @@ export default {
.demo-swipe-cell {
user-select: none;
.van-swipe-cell {
&__left,
&__right {
display: inline-block;
width: 65px;
height: 44px;
color: @white;
font-size: 15px;
line-height: 44px;
text-align: center;
background-color: @red;
}
}
}
</style>