uview-pro 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/global.d.ts CHANGED
@@ -80,6 +80,46 @@ export type ButtonOpenType =
80
80
 
81
81
  // calendar 组件 mode
82
82
  export type CalendarMode = 'date' | 'range';
83
+
84
+ // calendar 农历数据类型定义
85
+ export type CalendarLunarItem = {
86
+ dayCn: string;
87
+ weekCn: string;
88
+ monthCn: string;
89
+ day: number;
90
+ week: number;
91
+ month: number;
92
+ year: number;
93
+ };
94
+
95
+ // calendar 事件类型定义,单个日期
96
+ export type CalendarChangeDate = {
97
+ year: number;
98
+ month: number;
99
+ day: number;
100
+ days: number;
101
+ result: string;
102
+ week: string;
103
+ isToday: boolean;
104
+ lunar: CalendarLunarItem | null; // getLunar 返回类型,建议后续补充具体类型
105
+ };
106
+
107
+ // calendar 事件类型定义,范围选择
108
+ export type CalendarChangeRange = {
109
+ startYear: number;
110
+ startMonth: number;
111
+ startDay: number;
112
+ startDate: string;
113
+ startWeek: string;
114
+ endYear: number;
115
+ endMonth: number;
116
+ endDay: number;
117
+ endDate: string;
118
+ endWeek: string;
119
+ startLunar: CalendarLunarItem | null;
120
+ endLunar: CalendarLunarItem | null;
121
+ };
122
+
83
123
  // CellItem 右侧箭头方向,可选值:right|up|down,默认为right
84
124
  export type CellItemArrowDirection = 'right' | 'up' | 'down';
85
125