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

563 B

#### 12 小时制 12 小时制的时间选择器,默认的 format 为 `h:mm:ss a`。 #### 12 hours TimePicker of 12 hours format, with default format `h:mm:ss a`.
<template>
  <div>
    <a-time-picker use12Hours @change="onChange" />
    <a-time-picker use12Hours format="h:mm:ss A" @change="onChange" />
    <a-time-picker use12Hours format="h:mm a" @change="onChange" />
  </div>
</template>
<script>
export default {
  methods: {
    onChange(time, timeString){
      console.log(time, timeString);
    }
  },
}
</script>