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

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block title="基础用法"> <demo-block title="基础用法">
<demo-button type="primary" style="margin-left: 15px;">按钮</demo-button> <demo-button type="primary" style="margin-left: 15px;">按钮</demo-button>
</demo-block> </demo-block>
@ -7,5 +6,4 @@
<demo-block title="自定义颜色"> <demo-block title="自定义颜色">
<demo-button color="#03a9f4" style="margin-left: 15px;">按钮</demo-button> <demo-button color="#03a9f4" style="margin-left: 15px;">按钮</demo-button>
</demo-block> </demo-block>
</demo-section>
</template> </template>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-action-bar> <van-action-bar>
<van-action-bar-icon <van-action-bar-icon
@ -39,11 +38,7 @@
<van-action-bar> <van-action-bar>
<van-action-bar-icon icon="chat-o" :text="t('icon1')" color="#07c160" /> <van-action-bar-icon icon="chat-o" :text="t('icon1')" color="#07c160" />
<van-action-bar-icon icon="cart-o" :text="t('icon2')" /> <van-action-bar-icon icon="cart-o" :text="t('icon2')" />
<van-action-bar-icon <van-action-bar-icon icon="star" :text="t('collected')" color="#ff5000" />
icon="star"
:text="t('collected')"
color="#ff5000"
/>
<van-action-bar-button type="warning" :text="t('button1')" /> <van-action-bar-button type="warning" :text="t('button1')" />
<van-action-bar-button type="danger" :text="t('button2')" /> <van-action-bar-button type="danger" :text="t('button2')" />
</van-action-bar> </van-action-bar>
@ -65,7 +60,6 @@
/> />
</van-action-bar> </van-action-bar>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-cell is-link :title="t('basicUsage')" @click="show.basic = true" /> <van-cell is-link :title="t('basicUsage')" @click="show.basic = true" />
<van-cell is-link :title="t('showCancel')" @click="show.cancel = true" /> <van-cell is-link :title="t('showCancel')" @click="show.cancel = true" />
@ -11,11 +10,7 @@
</demo-block> </demo-block>
<demo-block card :title="t('optionStatus')"> <demo-block card :title="t('optionStatus')">
<van-cell <van-cell is-link :title="t('optionStatus')" @click="show.status = true" />
is-link
:title="t('optionStatus')"
@click="show.status = true"
/>
</demo-block> </demo-block>
<demo-block card :title="t('customPanel')"> <demo-block card :title="t('customPanel')">
@ -54,7 +49,6 @@
<van-action-sheet v-model:show="show.title" :title="t('title')"> <van-action-sheet v-model:show="show.title" :title="t('title')">
<div class="demo-action-sheet-content">{{ t('content') }}</div> <div class="demo-action-sheet-content">{{ t('content') }}</div>
</van-action-sheet> </van-action-sheet>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-address-edit <van-address-edit
:area-list="areaList" :area-list="areaList"
@ -14,7 +13,6 @@
@change-detail="onChangeDetail" @change-detail="onChangeDetail"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-address-list <van-address-list
v-model="chosenAddressId" v-model="chosenAddressId"
@ -11,7 +10,6 @@
@edit="onEdit" @edit="onEdit"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-area :title="t('title')" :area-list="t('areaList')" /> <van-area :title="t('title')" :area-list="t('areaList')" />
</demo-block> </demo-block>
@ -9,11 +8,7 @@
</demo-block> </demo-block>
<demo-block card :title="t('title3')"> <demo-block card :title="t('title3')">
<van-area <van-area :title="t('title')" :area-list="t('areaList')" :columns-num="2" />
:title="t('title')"
:area-list="t('areaList')"
:columns-num="2"
/>
</demo-block> </demo-block>
<demo-block card :title="t('title4')"> <demo-block card :title="t('title4')">
@ -23,7 +18,6 @@
:columns-placeholder="t('columnsPlaceholder')" :columns-placeholder="t('columnsPlaceholder')"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-badge content="5"> <van-badge content="5">
<div class="child" /> <div class="child" />
@ -30,7 +29,6 @@
<demo-block :title="t('standalone')"> <demo-block :title="t('standalone')">
<van-badge content="200" max="99" style="margin-left: 16px;" /> <van-badge content="200" max="99" style="margin-left: 16px;" />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('type')"> <demo-block :title="t('type')">
<div class="demo-button-row"> <div class="demo-button-row">
<van-button type="primary">{{ t('primary') }}</van-button> <van-button type="primary">{{ t('primary') }}</van-button>
@ -59,11 +58,7 @@
</demo-block> </demo-block>
<demo-block v-if="!isWeapp" :title="t('router')"> <demo-block v-if="!isWeapp" :title="t('router')">
<van-button <van-button :text="t('urlRoute')" type="primary" url="/vant/mobile.html" />
:text="t('urlRoute')"
type="primary"
url="/vant/mobile.html"
/>
<van-button :text="t('vueRoute')" type="primary" to="index" /> <van-button :text="t('vueRoute')" type="primary" to="index" />
</demo-block> </demo-block>
@ -75,7 +70,6 @@
:text="t('gradient')" :text="t('gradient')"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-cell <van-cell
is-link is-link
@ -117,7 +116,6 @@
:first-day-of-week="firstDayOfWeek" :first-day-of-week="firstDayOfWeek"
@confirm="onConfirm" @confirm="onConfirm"
/> />
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-card <van-card
num="2" num="2"
@ -53,7 +52,6 @@
</template> </template>
</van-card> </van-card>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-cell-group> <van-cell-group>
<van-cell :title="t('cell')" :value="t('content')" /> <van-cell :title="t('cell')" :value="t('content')" />
@ -73,7 +72,6 @@
:label="t('desc')" :label="t('desc')"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-checkbox v-model="checkbox1">{{ t('checkbox') }}</van-checkbox> <van-checkbox v-model="checkbox1">{{ t('checkbox') }}</van-checkbox>
</demo-block> </demo-block>
@ -102,7 +101,6 @@
</van-cell-group> </van-cell-group>
</van-checkbox-group> </van-checkbox-group>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-circle <van-circle
v-model:current-rate="currentRate1" v-model:current-rate="currentRate1"
@ -66,7 +65,6 @@
@click="reduce" @click="reduce"
/> />
</div> </div>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-row> <van-row>
<van-col span="8">span: 8</van-col> <van-col span="8">span: 8</van-col>
@ -54,7 +53,6 @@
<van-col span="6">span: 6</van-col> <van-col span="6">span: 6</van-col>
</van-row> </van-row>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-collapse v-model="active1"> <van-collapse v-model="active1">
<van-collapse-item :title="t('title') + 1"> <van-collapse-item :title="t('title') + 1">
@ -59,7 +58,6 @@
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-contact-card <van-contact-card
:type="cardType" :type="cardType"
@ -39,7 +38,6 @@
:editable="false" :editable="false"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-count-down :time="time" /> <van-count-down :time="time" />
</demo-block> </demo-block>
@ -35,15 +34,10 @@
/> />
<van-grid clickable :column-num="3"> <van-grid clickable :column-num="3">
<van-grid-item icon="play-circle-o" :text="t('start')" @click="start" /> <van-grid-item icon="play-circle-o" :text="t('start')" @click="start" />
<van-grid-item <van-grid-item icon="pause-circle-o" :text="t('pause')" @click="pause" />
icon="pause-circle-o"
:text="t('pause')"
@click="pause"
/>
<van-grid-item icon="replay" :text="t('reset')" @click="reset" /> <van-grid-item icon="replay" :text="t('reset')" @click="reset" />
</van-grid> </van-grid>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-coupon-cell <van-coupon-cell
:coupons="coupons" :coupons="coupons"
@ -22,7 +21,6 @@
/> />
</van-popup> </van-popup>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('dateType')"> <demo-block card :title="t('dateType')">
<van-datetime-picker <van-datetime-picker
v-model="value.date" v-model="value.date"
@ -82,7 +81,6 @@
:formatter="formatter" :formatter="formatter"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-cell is-link :title="t('alert1')" @click="onClickAlert" /> <van-cell is-link :title="t('alert1')" @click="onClickAlert" />
<van-cell is-link :title="t('alert2')" @click="onClickAlert2" /> <van-cell is-link :title="t('alert2')" @click="onClickAlert2" />
@ -26,7 +25,6 @@
<img :src="image" /> <img :src="image" />
</van-dialog> </van-dialog>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-divider /> <van-divider />
</demo-block> </demo-block>
@ -27,13 +26,10 @@
</demo-block> </demo-block>
<demo-block :title="t('customStyle')"> <demo-block :title="t('customStyle')">
<van-divider <van-divider :style="{ borderColor: BLUE, color: BLUE, padding: '0 16px' }">
:style="{ borderColor: BLUE, color: BLUE, padding: '0 16px' }"
>
{{ t('text') }} {{ t('text') }}
</van-divider> </van-divider>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item v-model="value1" :options="option1" /> <van-dropdown-item v-model="value1" :options="option1" />
@ -56,7 +55,6 @@
<van-dropdown-item v-model="value2" disabled :options="option2" /> <van-dropdown-item v-model="value2" disabled :options="option2" />
</van-dropdown-menu> </van-dropdown-menu>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-empty :description="t('description')" /> <van-empty :description="t('description')" />
</demo-block> </demo-block>
@ -33,7 +32,6 @@
</van-button> </van-button>
</van-empty> </van-empty>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<basic-usage /> <basic-usage />
<custom-type /> <custom-type />
<disabled /> <disabled />
@ -10,7 +9,6 @@
<autosize /> <autosize />
<show-word-limit /> <show-word-limit />
<input-align /> <input-align />
</demo-section>
</template> </template>
<script> <script>

View File

@ -7,14 +7,8 @@
:model-value="value" :model-value="value"
:placeholder="t('placeholder')" :placeholder="t('placeholder')"
@click="showArea = true" @click="showArea = true"
> />
<template #extra> <van-popup v-model:show="showArea" round position="bottom" teleport="body">
<van-popup
v-model:show="showArea"
round
position="bottom"
teleport="body"
>
<van-area <van-area
:area-list="t('areaList')" :area-list="t('areaList')"
@confirm="onConfirm" @confirm="onConfirm"
@ -22,8 +16,6 @@
/> />
</van-popup> </van-popup>
</template> </template>
</van-field>
</template>
<script> <script>
import AreaList from '../../area/demo/area'; import AreaList from '../../area/demo/area';

View File

@ -7,8 +7,7 @@
:model-value="value" :model-value="value"
:placeholder="t('placeholder')" :placeholder="t('placeholder')"
@click="showCalendar = true" @click="showCalendar = true"
> />
<template #extra>
<van-calendar <van-calendar
v-model:show="showCalendar" v-model:show="showCalendar"
round round
@ -16,8 +15,6 @@
@confirm="onConfirm" @confirm="onConfirm"
/> />
</template> </template>
</van-field>
</template>
<script> <script>
export default { export default {

View File

@ -7,23 +7,11 @@
:model-value="value" :model-value="value"
:placeholder="t('placeholder')" :placeholder="t('placeholder')"
@click="showPicker = true" @click="showPicker = true"
>
<template #extra>
<van-popup
v-model:show="showPicker"
round
position="bottom"
teleport="body"
>
<van-datetime-picker
type="time"
@confirm="onConfirm"
@cancel="onCancel"
/> />
<van-popup v-model:show="showPicker" round position="bottom" teleport="body">
<van-datetime-picker type="time" @confirm="onConfirm" @cancel="onCancel" />
</van-popup> </van-popup>
</template> </template>
</van-field>
</template>
<script> <script>
export default { export default {

View File

@ -7,14 +7,8 @@
:model-value="value" :model-value="value"
:placeholder="t('placeholder')" :placeholder="t('placeholder')"
@click="showPicker = true" @click="showPicker = true"
> />
<template #extra> <van-popup v-model:show="showPicker" round position="bottom" teleport="body">
<van-popup
v-model:show="showPicker"
round
position="bottom"
teleport="body"
>
<van-picker <van-picker
:columns="t('textColumns')" :columns="t('textColumns')"
@confirm="onConfirm" @confirm="onConfirm"
@ -22,8 +16,6 @@
/> />
</van-popup> </van-popup>
</template> </template>
</van-field>
</template>
<script> <script>
export default { export default {

View File

@ -1,9 +1,7 @@
<template> <template>
<demo-section>
<basic-usage /> <basic-usage />
<validate-rules /> <validate-rules />
<field-type /> <field-type />
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,69 +1,39 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-grid> <van-grid>
<van-grid-item <van-grid-item v-for="i in 4" :key="i" icon="photo-o" :text="t('text')" />
v-for="i in 4"
:key="i"
icon="photo-o"
:text="t('text')"
/>
</van-grid> </van-grid>
</demo-block> </demo-block>
<demo-block :title="t('columnNum')"> <demo-block :title="t('columnNum')">
<van-grid :column-num="3"> <van-grid :column-num="3">
<van-grid-item <van-grid-item v-for="i in 6" :key="i" icon="photo-o" :text="t('text')" />
v-for="i in 6"
:key="i"
icon="photo-o"
:text="t('text')"
/>
</van-grid> </van-grid>
</demo-block> </demo-block>
<demo-block :title="t('customContent')"> <demo-block :title="t('customContent')">
<van-grid :border="false" :column-num="3"> <van-grid :border="false" :column-num="3">
<van-grid-item> <van-grid-item>
<van-image <van-image fit="contain" src="https://img.yzcdn.cn/vant/apple-1.jpg" />
fit="contain"
src="https://img.yzcdn.cn/vant/apple-1.jpg"
/>
</van-grid-item> </van-grid-item>
<van-grid-item> <van-grid-item>
<van-image <van-image fit="contain" src="https://img.yzcdn.cn/vant/apple-2.jpg" />
fit="contain"
src="https://img.yzcdn.cn/vant/apple-2.jpg"
/>
</van-grid-item> </van-grid-item>
<van-grid-item> <van-grid-item>
<van-image <van-image fit="contain" src="https://img.yzcdn.cn/vant/apple-3.jpg" />
fit="contain"
src="https://img.yzcdn.cn/vant/apple-3.jpg"
/>
</van-grid-item> </van-grid-item>
</van-grid> </van-grid>
</demo-block> </demo-block>
<demo-block :title="t('square')"> <demo-block :title="t('square')">
<van-grid square> <van-grid square>
<van-grid-item <van-grid-item v-for="i in 8" :key="i" icon="photo-o" :text="t('text')" />
v-for="i in 8"
:key="i"
icon="photo-o"
:text="t('text')"
/>
</van-grid> </van-grid>
</demo-block> </demo-block>
<demo-block :title="t('gutter')"> <demo-block :title="t('gutter')">
<van-grid :gutter="10"> <van-grid :gutter="10">
<van-grid-item <van-grid-item v-for="i in 8" :key="i" icon="photo-o" :text="t('text')" />
v-for="i in 8"
:key="i"
icon="photo-o"
:text="t('text')"
/>
</van-grid> </van-grid>
</demo-block> </demo-block>
@ -92,7 +62,6 @@
<van-grid-item icon="search" :text="t('text')" badge="99+" /> <van-grid-item icon="search" :text="t('text')" badge="99+" />
</van-grid> </van-grid>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<van-tabs v-model="tab" sticky> <van-tabs v-model="tab" sticky>
<van-tab :title="t('demo')"> <van-tab :title="t('demo')">
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
@ -92,7 +91,6 @@
</van-row> </van-row>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-cell is-link @click="showImagePreview()"> <van-cell is-link @click="showImagePreview()">
{{ t('showImages') }} {{ t('showImages') }}
@ -28,15 +27,10 @@
<van-cell is-link @click="componentCall"> <van-cell is-link @click="componentCall">
{{ t('componentCall') }} {{ t('componentCall') }}
</van-cell> </van-cell>
<van-image-preview <van-image-preview v-model:show="show" :images="images" @change="onChange">
v-model:show="show"
:images="images"
@change="onChange"
>
<template #index>{{ t('index', index) }}</template> <template #index>{{ t('index', index) }}</template>
</van-image-preview> </van-image-preview>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-row> <van-row>
<van-image width="100" height="100" :src="image" /> <van-image width="100" height="100" :src="image" />
@ -57,7 +56,6 @@
</van-col> </van-col>
</van-row> </van-row>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<van-tabs v-model="activeTab"> <van-tabs v-model="activeTab">
<van-tab :title="t('basicUsage')"> <van-tab :title="t('basicUsage')">
<van-index-bar> <van-index-bar>
@ -25,7 +24,6 @@
</van-index-bar> </van-index-bar>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<img v-for="img in imageList" :key="img" v-lazy="img" /> <img v-for="img in imageList" :key="img" v-lazy="img" />
</demo-block> </demo-block>
@ -17,7 +16,6 @@
<img v-for="img in componentImageList" :key="img" v-lazy="img" /> <img v-for="img in componentImageList" :key="img" v-lazy="img" />
</lazy-component> </lazy-component>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<van-tabs> <van-tabs>
<van-tab :title="t('basicUsage')"> <van-tab :title="t('basicUsage')">
<van-list <van-list
@ -37,7 +36,6 @@
</van-pull-refresh> </van-pull-refresh>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('type')"> <demo-block :title="t('type')">
<van-loading /> <van-loading />
<van-loading type="spinner" /> <van-loading type="spinner" />
@ -26,7 +25,6 @@
{{ t('loading') }} {{ t('loading') }}
</van-loading> </van-loading>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-nav-bar <van-nav-bar
:title="t('title')" :title="t('title')"
@ -18,7 +17,6 @@
</template> </template>
</van-nav-bar> </van-nav-bar>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-notice-bar :text="t('text')" scrollable left-icon="volume-o" /> <van-notice-bar :text="t('text')" scrollable left-icon="volume-o" />
</demo-block> </demo-block>
@ -41,7 +40,6 @@
</van-swipe> </van-swipe>
</van-notice-bar> </van-notice-bar>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-cell is-link :title="t('basicUsage')" @click="showNotify" /> <van-cell is-link :title="t('basicUsage')" @click="showNotify" />
</demo-block> </demo-block>
@ -21,18 +20,13 @@
</demo-block> </demo-block>
<demo-block card :title="t('componentCall')"> <demo-block card :title="t('componentCall')">
<van-cell <van-cell is-link :title="t('componentCall')" @click="showComponentCall" />
is-link
:title="t('componentCall')"
@click="showComponentCall"
/>
<van-notify v-model:show="show" type="success"> <van-notify v-model:show="show" type="success">
<van-icon name="bell" style="margin-right: 4px;" /> <van-icon name="bell" style="margin-right: 4px;" />
<span>{{ t('content') }}</span> <span>{{ t('content') }}</span>
</van-notify> </van-notify>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<van-cell is-link @touchstart.stop="keyboard = 'default'"> <van-cell is-link @touchstart.stop="keyboard = 'default'">
{{ t('button1') }} {{ t('button1') }}
</van-cell> </van-cell>
@ -76,7 +75,6 @@
maxlength="6" maxlength="6"
@blur="keyboard = ''" @blur="keyboard = ''"
/> />
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-button <van-button
type="primary" type="primary"
@ -7,7 +6,6 @@
style="margin-left: 16px;" style="margin-left: 16px;"
@click="show = true" @click="show = true"
/> />
<van-overlay :show="show" @click="show = false" /> <van-overlay :show="show" @click="show = false" />
</demo-block> </demo-block>
@ -18,14 +16,12 @@
style="margin-left: 16px;" style="margin-left: 16px;"
@click="showEmbedded = true" @click="showEmbedded = true"
/> />
<van-overlay :show="showEmbedded" @click="showEmbedded = false"> <van-overlay :show="showEmbedded" @click="showEmbedded = false">
<div class="wrapper"> <div class="wrapper">
<div class="block" /> <div class="block" />
</div> </div>
</van-overlay> </van-overlay>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-pagination <van-pagination
v-model="currentPage1" v-model="currentPage1"
@ -47,7 +46,6 @@
<template #page="{ text }">{{ text }}</template> <template #page="{ text }">{{ text }}</template>
</van-pagination> </van-pagination>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block ref="basicUsage" :title="t('basicUsage')"> <demo-block ref="basicUsage" :title="t('basicUsage')">
<van-password-input <van-password-input
:value="value.basicUsage" :value="value.basicUsage"
@ -51,7 +50,6 @@
@input="onInput" @input="onInput"
@delete="onDelete" @delete="onDelete"
/> />
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-picker <van-picker
:title="t('title')" :title="t('title')"
@ -65,7 +64,6 @@
/> />
</van-popup> </van-popup>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-cell :title="t('buttonBasic')" is-link @click="showBasic = true" /> <van-cell :title="t('buttonBasic')" is-link @click="showBasic = true" />
<van-popup v-model:show="showBasic" :style="{ padding: '30px 50px' }"> <van-popup v-model:show="showBasic" :style="{ padding: '30px 50px' }">
@ -85,18 +84,13 @@
</demo-block> </demo-block>
<demo-block card v-if="!isWeapp" :title="t('teleport')"> <demo-block card v-if="!isWeapp" :title="t('teleport')">
<van-cell <van-cell :title="t('teleport')" is-link @click="showGetContainer = true" />
:title="t('teleport')"
is-link
@click="showGetContainer = true"
/>
<van-popup <van-popup
v-model:show="showGetContainer" v-model:show="showGetContainer"
teleport="body" teleport="body"
:style="{ padding: '30px 50px' }" :style="{ padding: '30px 50px' }"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-progress :percentage="50" /> <van-progress :percentage="50" />
</demo-block> </demo-block>
@ -13,11 +12,7 @@
</demo-block> </demo-block>
<demo-block :title="t('title3')"> <demo-block :title="t('title3')">
<van-progress <van-progress color="#f2826a" :percentage="25" :pivot-text="t('orange')" />
color="#f2826a"
:percentage="25"
:pivot-text="t('orange')"
/>
<van-progress color="#ee0a24" :percentage="50" :pivot-text="t('red')" /> <van-progress color="#ee0a24" :percentage="50" :pivot-text="t('red')" />
<van-progress <van-progress
:percentage="75" :percentage="75"
@ -26,7 +21,6 @@
color="linear-gradient(to right, #be99ff, #7232dd)" color="linear-gradient(to right, #be99ff, #7232dd)"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section name="pull-refresh">
<van-tabs> <van-tabs>
<van-tab :title="t('basicUsage')"> <van-tab :title="t('basicUsage')">
<van-pull-refresh v-model="isLoading" @refresh="onRefresh(true)"> <van-pull-refresh v-model="isLoading" @refresh="onRefresh(true)">
@ -40,7 +39,6 @@
</van-pull-refresh> </van-pull-refresh>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-radio-group v-model="radio1" class="demo-radio-group"> <van-radio-group v-model="radio1" class="demo-radio-group">
<van-radio name="1">{{ t('radio') }} 1</van-radio> <van-radio name="1">{{ t('radio') }} 1</van-radio>
@ -94,7 +93,6 @@
</van-cell-group> </van-cell-group>
</van-radio-group> </van-radio-group>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-rate v-model="value1" /> <van-rate v-model="value1" />
</demo-block> </demo-block>
@ -43,7 +42,6 @@
<demo-block v-if="!isWeapp" :title="t('changeEvent')"> <demo-block v-if="!isWeapp" :title="t('changeEvent')">
<van-rate v-model="value7" @change="onChange" /> <van-rate v-model="value7" @change="onChange" />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-search v-model="value1" :placeholder="t('placeholder')" /> <van-search v-model="value1" :placeholder="t('placeholder')" />
</demo-block> </demo-block>
@ -50,7 +49,6 @@
</template> </template>
</van-search> </van-search>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-cell is-link :title="t('showSheet')" @click="show.basic = true" /> <van-cell is-link :title="t('showSheet')" @click="show.basic = true" />
<van-share-sheet <van-share-sheet
@ -11,11 +10,7 @@
</demo-block> </demo-block>
<demo-block card :title="t('multiLine')"> <demo-block card :title="t('multiLine')">
<van-cell <van-cell is-link :title="t('showSheet')" @click="show.multiLine = true" />
is-link
:title="t('showSheet')"
@click="show.multiLine = true"
/>
<van-share-sheet <van-share-sheet
v-model:show="show.multiLine" v-model:show="show.multiLine"
:title="t('title')" :title="t('title')"
@ -25,11 +20,7 @@
</demo-block> </demo-block>
<demo-block card :title="t('customIcon')"> <demo-block card :title="t('customIcon')">
<van-cell <van-cell is-link :title="t('showSheet')" @click="show.customIcon = true" />
is-link
:title="t('showSheet')"
@click="show.customIcon = true"
/>
<van-share-sheet <van-share-sheet
v-model:show="show.customIcon" v-model:show="show.customIcon"
:options="customIconOptions" :options="customIconOptions"
@ -47,7 +38,6 @@
@select="onSelect" @select="onSelect"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<van-grid :column-num="2" :border="false"> <van-grid :column-num="2" :border="false">
<van-grid-item> <van-grid-item>
<h3 class="demo-sidebar-title">{{ t('basicUsage') }}</h3> <h3 class="demo-sidebar-title">{{ t('basicUsage') }}</h3>
@ -37,7 +36,6 @@
</van-sidebar> </van-sidebar>
</van-grid-item> </van-grid-item>
</van-grid> </van-grid>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-skeleton title :row="3" /> <van-skeleton title :row="3" />
</demo-block> </demo-block>
@ -20,7 +19,6 @@
</div> </div>
</van-skeleton> </van-skeleton>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('title1')"> <demo-block :title="t('title1')">
<van-slider v-model="value1" @change="onChange" /> <van-slider v-model="value1" @change="onChange" />
</demo-block> </demo-block>
@ -49,7 +48,6 @@
/> />
</div> </div>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<van-cell center :title="t('basicUsage')"> <van-cell center :title="t('basicUsage')">
<van-stepper v-model="stepper1" /> <van-stepper v-model="stepper1" />
</van-cell> </van-cell>
@ -44,7 +43,6 @@
disable-input disable-input
/> />
</van-cell> </van-cell>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-steps :active="active"> <van-steps :active="active">
<van-step>{{ t('step1') }}</van-step> <van-step>{{ t('step1') }}</van-step>
@ -41,7 +40,6 @@
</van-step> </van-step>
</van-steps> </van-steps>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-sticky> <van-sticky>
<van-button type="primary" style="margin-left: 15px;"> <van-button type="primary" style="margin-left: 15px;">
@ -25,7 +24,6 @@
</van-sticky> </van-sticky>
</div> </div>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('ellipsis')"> <demo-block :title="t('ellipsis')">
<div class="van-ellipsis">{{ t('text1') }}</div> <div class="van-ellipsis">{{ t('text1') }}</div>
<div class="van-multi-ellipsis--l2">{{ t('text2') }}</div> <div class="van-multi-ellipsis--l2">{{ t('text2') }}</div>
@ -14,17 +13,12 @@
<van-cell is-link title="Slide Up" @click="animate('van-slide-up')" /> <van-cell is-link title="Slide Up" @click="animate('van-slide-up')" />
<van-cell is-link title="Slide Down" @click="animate('van-slide-down')" /> <van-cell is-link title="Slide Down" @click="animate('van-slide-down')" />
<van-cell is-link title="Slide Left" @click="animate('van-slide-left')" /> <van-cell is-link title="Slide Left" @click="animate('van-slide-left')" />
<van-cell <van-cell is-link title="Slide Right" @click="animate('van-slide-right')" />
is-link
title="Slide Right"
@click="animate('van-slide-right')"
/>
</demo-block> </demo-block>
<transition :name="transitionName"> <transition :name="transitionName">
<div v-show="show" class="demo-animate-block" /> <div v-show="show" class="demo-animate-block" />
</transition> </transition>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-submit-bar <van-submit-bar
:price="3050" :price="3050"
@ -43,7 +42,6 @@
</template> </template>
</van-submit-bar> </van-submit-bar>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,6 +1,4 @@
<template> <template>
<div>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-swipe-cell> <van-swipe-cell>
<template #left> <template #left>
@ -45,8 +43,6 @@
</template> </template>
</van-swipe-cell> </van-swipe-cell>
</demo-block> </demo-block>
</demo-section>
</div>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-swipe :autoplay="3000" indicator-color="white"> <van-swipe :autoplay="3000" indicator-color="white">
<van-swipe-item>1</van-swipe-item> <van-swipe-item>1</van-swipe-item>
@ -64,7 +63,6 @@
</template> </template>
</van-swipe> </van-swipe>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-switch v-model="checked" /> <van-switch v-model="checked" />
</demo-block> </demo-block>
@ -35,7 +34,6 @@
</template> </template>
</van-cell> </van-cell>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-tabs v-model:active="active"> <van-tabs v-model:active="active">
<van-tab :title="t('tab') + index" v-for="index in tabs" :key="index"> <van-tab :title="t('tab') + index" v-for="index in tabs" :key="index">
@ -101,7 +100,6 @@
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-tabbar v-model="active"> <van-tabbar v-model="active">
<van-tabbar-item icon="home-o">{{ t('tab') }}</van-tabbar-item> <van-tabbar-item icon="home-o">{{ t('tab') }}</van-tabbar-item>
@ -53,11 +52,7 @@
</demo-block> </demo-block>
<demo-block :title="t('customColor')"> <demo-block :title="t('customColor')">
<van-tabbar <van-tabbar v-model="active4" active-color="#07c160" inactive-color="#000">
v-model="active4"
active-color="#07c160"
inactive-color="#000"
>
<van-tabbar-item icon="home-o">{{ t('tab') }}</van-tabbar-item> <van-tabbar-item icon="home-o">{{ t('tab') }}</van-tabbar-item>
<van-tabbar-item icon="search">{{ t('tab') }}</van-tabbar-item> <van-tabbar-item icon="search">{{ t('tab') }}</van-tabbar-item>
<van-tabbar-item icon="friends-o">{{ t('tab') }}</van-tabbar-item> <van-tabbar-item icon="friends-o">{{ t('tab') }}</van-tabbar-item>
@ -73,7 +68,6 @@
<van-tabbar-item icon="setting-o">{{ t('tab') + 4 }}</van-tabbar-item> <van-tabbar-item icon="setting-o">{{ t('tab') + 4 }}</van-tabbar-item>
</van-tabbar> </van-tabbar>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-cell :title="`primary ${t('type')}`"> <van-cell :title="`primary ${t('type')}`">
<van-tag type="primary">{{ t('tag') }}</van-tag> <van-tag type="primary">{{ t('tag') }}</van-tag>
@ -61,7 +60,6 @@
<van-tag color="#7232dd" plain>{{ t('tag') }}</van-tag> <van-tag color="#7232dd" plain>{{ t('tag') }}</van-tag>
</van-cell> </van-cell>
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block card :title="t('basicUsage')"> <demo-block card :title="t('basicUsage')">
<van-cell is-link :title="t('title1')" @click="$toast(t('text'))" /> <van-cell is-link :title="t('title1')" @click="$toast(t('text'))" />
<van-cell is-link :title="t('title2')" @click="showLoadingToast()" /> <van-cell is-link :title="t('title2')" @click="showLoadingToast()" />
@ -29,7 +28,6 @@
@click="showCustomizedToast" @click="showCustomizedToast"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('radioMode')"> <demo-block :title="t('radioMode')">
<van-tree-select <van-tree-select
v-model:active-id="activeId" v-model:active-id="activeId"
@ -45,7 +44,6 @@
:items="badgeItems" :items="badgeItems"
/> />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>

View File

@ -1,5 +1,4 @@
<template> <template>
<demo-section>
<demo-block :title="t('basicUsage')"> <demo-block :title="t('basicUsage')">
<van-uploader :after-read="afterRead" /> <van-uploader :after-read="afterRead" />
</demo-block> </demo-block>
@ -48,7 +47,6 @@
<demo-block :title="t('disabled')"> <demo-block :title="t('disabled')">
<van-uploader :after-read="afterRead" disabled /> <van-uploader :after-read="afterRead" disabled />
</demo-block> </demo-block>
</demo-section>
</template> </template>
<script> <script>