mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
docs: remove demo-section
This commit is contained in:
@@ -1,62 +1,60 @@
|
||||
<template>
|
||||
<demo-section>
|
||||
<demo-block :title="t('basicUsage')">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item v-model="value2" :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
<demo-block :title="t('basicUsage')">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item v-model="value2" :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('customContent')">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item :title="t('itemTitle')" ref="item">
|
||||
<van-cell center :title="t('switchTitle1')">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="switch1" size="24" :active-color="RED" />
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell center :title="t('switchTitle2')">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="switch2" size="24" :active-color="RED" />
|
||||
</template>
|
||||
</van-cell>
|
||||
<div style="padding: 5px 16px;">
|
||||
<van-button
|
||||
type="danger"
|
||||
block
|
||||
round
|
||||
style="height: 40px;"
|
||||
@click="onConfirm"
|
||||
>
|
||||
{{ t('confirm') }}
|
||||
</van-button>
|
||||
</div>
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
<demo-block :title="t('customContent')">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item :title="t('itemTitle')" ref="item">
|
||||
<van-cell center :title="t('switchTitle1')">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="switch1" size="24" :active-color="RED" />
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell center :title="t('switchTitle2')">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="switch2" size="24" :active-color="RED" />
|
||||
</template>
|
||||
</van-cell>
|
||||
<div style="padding: 5px 16px;">
|
||||
<van-button
|
||||
type="danger"
|
||||
block
|
||||
round
|
||||
style="height: 40px;"
|
||||
@click="onConfirm"
|
||||
>
|
||||
{{ t('confirm') }}
|
||||
</van-button>
|
||||
</div>
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('customActiveColor')">
|
||||
<van-dropdown-menu :active-color="BLUE">
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item v-model="value2" :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
<demo-block :title="t('customActiveColor')">
|
||||
<van-dropdown-menu :active-color="BLUE">
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item v-model="value2" :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('expandDirection')">
|
||||
<van-dropdown-menu direction="up">
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item v-model="value2" :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
<demo-block :title="t('expandDirection')">
|
||||
<van-dropdown-menu direction="up">
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item v-model="value2" :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('disableMenu')">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="value1" disabled :options="option1" />
|
||||
<van-dropdown-item v-model="value2" disabled :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
</demo-section>
|
||||
<demo-block :title="t('disableMenu')">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="value1" disabled :options="option1" />
|
||||
<van-dropdown-item v-model="value2" disabled :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
Reference in New Issue
Block a user