From 6b1c06ff714863c7a791d8a7ac921e7ec5da8a97 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 14 五月 2024 16:00:59 +0800 Subject: [PATCH] 修改jquery引入 --- src/utils/map/dialog.js | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/utils/map/dialog.js b/src/utils/map/dialog.js index 54292bd..f802c99 100644 --- a/src/utils/map/dialog.js +++ b/src/utils/map/dialog.js @@ -1,6 +1,8 @@ -import { factorName } from '../../constant/factor-name'; -import { factorUnit } from '../../constant/factor-unit'; -import { windDir } from '../../constant/wind-dir'; +import $ from 'jquery'; +import { factorName } from '@/constant/factor-name'; +import { factorUnit } from '@/constant/factor-unit'; +import { windDir } from '@/constant/wind-dir'; +import { map } from './index_old'; export const DialogUtil = { show: true, @@ -152,7 +154,8 @@ // 瀹氫箟椤堕儴鏍囬 var top = document.createElement('div'); // top.className = "info-top"; - top.className = 'ff-content ff-content-top-left ff-content-small-borderless-t info-top'; + top.className = + 'ff-content ff-content-top-left ff-content-small-borderless-t info-top'; var top_b = document.createElement('div'); top_b.className = 'ff-border-bottom'; var top_t = document.createElement('div'); @@ -164,7 +167,6 @@ var closeX = document.createElement('i'); titleD.innerHTML = title; closeX.className = 'fa fa-times'; - // eslint-disable-next-line no-undef $(closeX).attr('aria-hidden', 'true'); closeX.onclick = function () { marker.close(); @@ -185,11 +187,8 @@ refreshV.className = 'refresh-btn'; var refresh = document.createElement('i'); refresh.className = 'fa fa-refresh'; - // eslint-disable-next-line no-undef $(refresh).attr('aria-hidden', 'true'); - // eslint-disable-next-line no-undef $(refresh).css('color', '#ffffffc0'); - // eslint-disable-next-line no-undef $(refresh).css('cursor', 'pointer'); refresh.onclick = function () { // $(this).addClass('fa-spin') @@ -246,13 +245,13 @@ return info; }, - openNewWindow(factorDatas, i, map, position, onClose) { + openNewWindow(factorDatas, i, onClose) { if (!this.show) return; const window = this.createInfoWindow(factorDatas, i, onClose); - window.open(map, position); + window.open(map, factorDatas.lnglats_GD[i]); }, - openNewWindow2(factorData, map, position, onClose) { + openNewWindow2(factorData, position, onClose) { if (!this.show) return; const window = this.createInfoWindow2(factorData, onClose); window.open(map, position); -- Gitblit v1.9.3