ant-design-vue/components/date-picker/demo/switchable.vue
Cherry7 9be58078d2
Refactor(demo): change options to composition api (#6499)
* feat(demo): A-B

* feat(demo): update B-checkbox

* feat(demo): update CheckBox -DatePicker

* feat(demo): update DatePicker - Form

* feat(demo): update Form - List

* feat(demo): update  List-pagination

* feat(demo): update  List - skeleton

* feat(demo): update  skeleton - switch

* feat(demo): update  skeleton - switch

* feat(demo): update   switch - upload

* feat(demo): update  watermark

* fix(demo): del hashId
2023-04-28 14:08:21 +08:00

39 lines
1008 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<docs>
---
order: 1.1
title:
zh-CN: 切换不同的选择器
en-US: Switchable picker
---
## zh-CN
提供选择器自由切换不同类型的日期选择器常用于日期筛选场合
## en-US
Switch in different types of pickers by Select.
</docs>
<template>
<a-space direction="vertical" :size="12">
<a-select v-model:value="type">
<a-select-option value="time">Time</a-select-option>
<a-select-option value="date">Date</a-select-option>
<a-select-option value="week">Week</a-select-option>
<a-select-option value="month">Month</a-select-option>
<a-select-option value="quarter">Quarter</a-select-option>
<a-select-option value="year">Year</a-select-option>
</a-select>
<template v-if="type === 'time'">
<a-time-picker />
</template>
<template v-else>
<a-date-picker :picker="type" />
</template>
</a-space>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const type = ref<any>('time');
</script>