CN-572 fix: 修复图表和地图内存泄漏问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import _ from 'lodash'
|
||||
import { storageKey } from '@/utils/constants'
|
||||
// 获取初始化时间,默认最近一周
|
||||
Date.prototype.setStart = function () {
|
||||
// 获取初始化时间
|
||||
/* Date.prototype.setStart = function () {
|
||||
this.setHours(0)
|
||||
this.setMinutes(0)
|
||||
this.setSeconds(0)
|
||||
@@ -10,7 +10,7 @@ Date.prototype.setEnd = function () {
|
||||
this.setHours(23)
|
||||
this.setMinutes(59)
|
||||
this.setSeconds(59)
|
||||
}
|
||||
} */
|
||||
// 将时间转化为秒
|
||||
export function getSecond (time) {
|
||||
const ms = getMillisecond(time)
|
||||
|
||||
@@ -122,7 +122,7 @@ export function put (url, params, headers) {
|
||||
}).catch(err => {
|
||||
if (err.response) {
|
||||
resolve(err.response.data)
|
||||
console.log(err)
|
||||
console.error(err)
|
||||
} else if (err.message) {
|
||||
resolve(err.message)
|
||||
}
|
||||
|
||||
@@ -803,7 +803,6 @@ export function scrollToTop (dom, toTop, duration, direction) {
|
||||
if (oldTimestamp !== null) {
|
||||
if (direction === 'up') {
|
||||
scrollY -= totalScrollDistance * (newTimestamp - oldTimestamp) / duration
|
||||
console.info(scrollY)
|
||||
if (scrollY < 0) {
|
||||
dom.scrollTop = 0
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user