提交 f4250d6f 编写于 作者: M mehaotian

fix: 修改日历示例代码类型警告问题

上级 4f77d055
......@@ -164,7 +164,7 @@ export class Lunar {
// 添加闰月
let leapM = this.leapMonth(year);
if (leapM > 0) monthDays.splice(leapM, 0, leapDays(year));
if (leapM > 0) monthDays.splice(leapM, 0, this.leapDays(year));
this.lunarMonthDaysMap.set(year, monthDays)
return monthDays;
......@@ -265,7 +265,7 @@ export class Lunar {
} else {
// 补偿公历1901年2月的农历信息
if (offset == -23) {
const info : InfoType = {
let info : InfoType = {
lunarY: i,
lunarM: 12,
lunarD: 8,
......
......@@ -141,6 +141,7 @@
drawHeader() {
const refs = this.$refs['draw-header'] as INode
let ctx = refs.getDrawableContext()
if (ctx == null) return
const date_header_map = ['一', '二', '三', '四', '五', '六', '日']
const width = refs.getBoundingClientRect().width
......@@ -168,6 +169,7 @@
const start_time = Date.now()
const refs = this.$refs['draw-weeks'] as INode
let ctx = refs.getDrawableContext()
if (ctx == null) return
const dom = refs.getBoundingClientRect()
const width = dom.width
const height = dom.height
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册