# OMCalendar 运维日历 ued
此组件为运维日历
# 基本使用
- 通过
theme
参数控制适老化。 - 通过
v-model
参数为当前选中的日期YYYY-MM-DD
字符串。
<template>
<u-om-calendar
:theme="theme"
v-model="time"
ref="calendarRef"
@change-day="changeDay"
/>
</template>
<script>
export default {
name: "omCalendar",
data() {
return {
time: "2022-09-23",
theme: "normal"
};
},
methods: {
changeDay(time) {
uni.showToast({
title: time,
icon: "none"
});
}
}
}
</script>
# API
# Props
参数 | 说明 | 类型 | 默认值 | 可选值 |
---|---|---|---|---|
theme | 主题模式,普通模式normal ,关怀模式care | String | normal | care |
v-model | 选中的日期,YYYY-MM-DD 的字符串格式 | String | "" | YYYY-MM-DD |
# Event
事件名 | 说明 | 回调参数 |
---|---|---|
change-day | 点击日期 | 返回 YYYY-MM-DD 格式的字符串 |
# Methods
事件名 | 说明 | 可选值 |
---|---|---|
updateDate | 更新日期 | 时间戳 |
upperMonth | 月份+1 | - |
lowerMonth | 月份-1 | - |