diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 62f74ca5..e8db216c 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -141,12 +141,13 @@ export const addEventListener = ( target: HTMLElement | Document, type: K, listener: any, + delay?: number, options?: boolean | AddEventListenerOptions | undefined ) => { if (!target) return target.addEventListener( type, - throttle(listener, 300, { + throttle(listener, delay || 300, { leading: true, trailing: false, }), @@ -167,7 +168,7 @@ export const removeEventListener = ( } /** - * * 截取画面为图片 + * * 截取画面为图片并下载 * @param html 需要截取的 DOM */ export const canvasCut = (html: HTMLElement | null, callback?: Function) => { diff --git a/src/views/chart/HeaderRightBtn/index.vue b/src/views/chart/HeaderRightBtn/index.vue index 15928c9c..db13dd65 100644 --- a/src/views/chart/HeaderRightBtn/index.vue +++ b/src/views/chart/HeaderRightBtn/index.vue @@ -54,6 +54,9 @@ const previewHandle = () => { routerTurnByPath(path, [previewId], undefined, true) } +// 导入 +const importHandle = () => {} + // 导出 const exportHandle = () => { // 导出数据 @@ -115,6 +118,7 @@ const btnList = shallowReactive([ event: sendHandle } ]) +