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/time-picker/demo/12hours.vue

37 lines
734 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: 2
title:
zh-CN: 12 小时制
en-US: 12 hours
---
## zh-CN
12 小时制的时间选择器默认的 format `h:mm:ss a`
## en-US
TimePicker of 12 hours format, with default format `h:mm:ss a`.
</docs>
<template>
<a-space direction="vertical">
<a-time-picker v-model:value="value" use12-hours />
<a-time-picker v-model:value="value" use12-hours format="h:mm:ss A" style="width: 140px" />
<a-time-picker v-model:value="value" use12-hours format="h:mm a" />
</a-space>
</template>
<script lang="ts">
import { Dayjs } from 'dayjs';
import { defineComponent, ref } from 'vue';
export default defineComponent({
setup() {
return {
value: ref<Dayjs>(),
};
},
});
</script>