CN-572 fix: 修复图表和地图内存泄漏问题

This commit is contained in:
chenjinsong
2022-05-20 16:33:00 +08:00
parent cf401c4c2c
commit e5d0e54320
18 changed files with 143 additions and 438 deletions

View File

@@ -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)

View File

@@ -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)
}

View File

@@ -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