You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/date-picker/demo/range-picker.vue

38 lines
877 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<docs>
---
order: 1
title:
zh-CN: 范围选择器
en-US: Range Picker
---
## zh-CN
通过设置 `picker` 属性指定范围选择器类型
## en-US
Set range picker type by `picker` prop.
</docs>
<template>
<a-space direction="vertical" :size="12">
<a-range-picker v-model:value="value1" />
<a-range-picker v-model:value="value2" show-time />
<a-range-picker v-model:value="value3" picker="week" />
<a-range-picker v-model:value="value4" picker="month" />
<a-range-picker v-model:value="value5" picker="year" />
</a-space>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import type { Dayjs } from 'dayjs';
type RangeValue = [Dayjs, Dayjs];
const value1 = ref<RangeValue>();
const value2 = ref<RangeValue>();
const value3 = ref<RangeValue>();
const value4 = ref<RangeValue>();
const value5 = ref<RangeValue>();
</script>