mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
perf: 注释定时同步
This commit is contained in:
parent
f8229a0518
commit
adbdad1e88
@ -20,11 +20,11 @@ const useSyncUpdateHandle = () => {
|
||||
|
||||
// 开启侦听
|
||||
const use = () => {
|
||||
// 1、定时同步数据
|
||||
timer = setInterval(() => {
|
||||
// 窗口激活并且处于工作台
|
||||
document.hasFocus() && syncData()
|
||||
}, editToJsonInterval)
|
||||
// // 1、定时同步数据
|
||||
// timer = setInterval(() => {
|
||||
// // 窗口激活并且处于工作台
|
||||
// document.hasFocus() && syncData()
|
||||
// }, editToJsonInterval)
|
||||
// 2、失焦同步数据
|
||||
addEventListener('blur', syncData)
|
||||
|
||||
@ -34,7 +34,7 @@ const useSyncUpdateHandle = () => {
|
||||
|
||||
// 关闭侦听
|
||||
const unUse = () => {
|
||||
clearInterval(timer)
|
||||
// clearInterval(timer)
|
||||
removeEventListener(SavePageEnum.JSON, updateFn)
|
||||
removeEventListener('blur', syncData)
|
||||
}
|
||||
|
@ -137,7 +137,8 @@ const toolsMouseoutHandle = () => {
|
||||
|
||||
// 编辑处理
|
||||
const editHandle = () => {
|
||||
window['$message'].warning('将开启失焦更新与 5 秒同步更新!')
|
||||
window['$message'].warning('将开启失焦更新!')
|
||||
// window['$message'].warning('将开启失焦更新与 5 秒同步更新!')
|
||||
setTimeout(() => {
|
||||
// 获取id路径
|
||||
const path = fetchPathByName(EditEnum.CHART_EDIT_NAME, 'href')
|
||||
|
Loading…
x
Reference in New Issue
Block a user