ant-design-vue/components/time-picker/demo/12hours.vue

37 lines
705 B
Vue
Raw Blame History

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>
<div>
<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" />
</div>
</template>
<script lang="ts">
import { Dayjs } from 'dayjs';
import { defineComponent, ref } from 'vue';
export default defineComponent({
setup() {
return {
value: ref<Dayjs>(),
};
},
});
</script>