docs: remove demo-section

This commit is contained in:
chenjiahan
2020-10-22 16:44:19 +08:00
parent 862c3ec1a4
commit e8244c44e1
69 changed files with 2732 additions and 2980 deletions
+35 -41
View File
@@ -1,49 +1,43 @@
<template>
<demo-section>
<demo-block :title="t('basicUsage')">
<van-count-down :time="time" />
</demo-block>
<demo-block :title="t('basicUsage')">
<van-count-down :time="time" />
</demo-block>
<demo-block :title="t('customFormat')">
<van-count-down :time="time" :format="t('formatWithDay')" />
</demo-block>
<demo-block :title="t('customFormat')">
<van-count-down :time="time" :format="t('formatWithDay')" />
</demo-block>
<demo-block :title="t('millisecond')">
<van-count-down millisecond :time="time" format="HH:mm:ss:SS" />
</demo-block>
<demo-block :title="t('millisecond')">
<van-count-down millisecond :time="time" format="HH:mm:ss:SS" />
</demo-block>
<demo-block :title="t('customStyle')">
<van-count-down :time="time">
<template #default="currentTime">
<span class="block">{{ currentTime.hours }}</span>
<span class="colon">:</span>
<span class="block">{{ currentTime.minutes }}</span>
<span class="colon">:</span>
<span class="block">{{ currentTime.seconds }}</span>
</template>
</van-count-down>
</demo-block>
<demo-block :title="t('customStyle')">
<van-count-down :time="time">
<template #default="currentTime">
<span class="block">{{ currentTime.hours }}</span>
<span class="colon">:</span>
<span class="block">{{ currentTime.minutes }}</span>
<span class="colon">:</span>
<span class="block">{{ currentTime.seconds }}</span>
</template>
</van-count-down>
</demo-block>
<demo-block :title="t('manualControl')">
<van-count-down
ref="countDown"
millisecond
:time="3000"
:auto-start="false"
format="ss:SSS"
@finish="$toast(t('finished'))"
/>
<van-grid clickable :column-num="3">
<van-grid-item icon="play-circle-o" :text="t('start')" @click="start" />
<van-grid-item
icon="pause-circle-o"
:text="t('pause')"
@click="pause"
/>
<van-grid-item icon="replay" :text="t('reset')" @click="reset" />
</van-grid>
</demo-block>
</demo-section>
<demo-block :title="t('manualControl')">
<van-count-down
ref="countDown"
millisecond
:time="3000"
:auto-start="false"
format="ss:SSS"
@finish="$toast(t('finished'))"
/>
<van-grid clickable :column-num="3">
<van-grid-item icon="play-circle-o" :text="t('start')" @click="start" />
<van-grid-item icon="pause-circle-o" :text="t('pause')" @click="pause" />
<van-grid-item icon="replay" :text="t('reset')" @click="reset" />
</van-grid>
</demo-block>
</template>
<script>