39 lines
633 B
Vue
39 lines
633 B
Vue
|
<docs>
|
|||
|
---
|
|||
|
order: 0
|
|||
|
title:
|
|||
|
zh-CN: 基本
|
|||
|
en-US: Basic
|
|||
|
---
|
|||
|
|
|||
|
## zh-CN
|
|||
|
|
|||
|
一个通用的日历面板,支持年/月切换。
|
|||
|
|
|||
|
## en-US
|
|||
|
|
|||
|
A basic calendar component with Year/Month switch.
|
|||
|
|
|||
|
</docs>
|
|||
|
<template>
|
|||
|
<a-calendar v-model:value="value" @panelChange="onPanelChange" />
|
|||
|
</template>
|
|||
|
<script lang="ts">
|
|||
|
import { defineComponent, ref } from 'vue';
|
|||
|
import { Dayjs } from 'dayjs';
|
|||
|
|
|||
|
export default defineComponent({
|
|||
|
setup() {
|
|||
|
const value = ref<Dayjs>();
|
|||
|
const onPanelChange = (value: Dayjs, mode: string) => {
|
|||
|
console.log(value, mode);
|
|||
|
};
|
|||
|
|
|||
|
return {
|
|||
|
value,
|
|||
|
onPanelChange,
|
|||
|
};
|
|||
|
},
|
|||
|
});
|
|||
|
</script>
|