ts 报错 Type ‘string’ is not assignable to type ‘never’.Vetur(2322)
- Type ‘string’ is not assignable to type ‘never’.Vetur(2322)
在这里插入代码片
date = []
...
this.date = [moment(new Date().getTime() - 3600 * 1000 * 24 * 30).format('YYYY-MM-DD'), moment(new Date().getTime()).format('YYYY-MM-DD')]
解决方案
date =[] as any[],