Appearance
Calendar 日历
采用公历日期字符串,支持单选、范围和多选。选择早于起点的日期会移动起点。
vue
<ll-calendar v-model="date" default-month="2026-11" />Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| model-value | 选择值 | string / string[] | single 为字符串,range 为二元数组,multiple 为日期数组 | — |
| default-month | 初始月份 | string | YYYY-MM | — |
| mode | 选择模式 | string | single、range、multiple | single |
| today | 当前日标记 | string | YYYY-MM-DD | — |
| start-month | 最早月份 | string | YYYY-MM | — |
| end-month | 最晚月份 | string | YYYY-MM | — |
| disabled | 规则对象数组 | CalendarDisabledRule[] | before、after 或 dayOfWeek | 空数组 |
| week-starts-on | 每周起始日 | number | 0 或 1 | 0 |
| show-outside-days | 显示相邻月的日期 | boolean | — | true |
Events
| 事件名称 | 说明 |
|---|---|
| update:modelValue | 用户选择后请求更新;范围中间态是 [起点, 空字符串] |
| monthchange | 切换月份后发出 YYYY-MM |
Slots
| 名称 | 说明 |
|---|---|
| footer | 日历底部内容 |