From 6b1c06ff714863c7a791d8a7ac921e7ec5da8a97 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 14 五月 2024 16:00:59 +0800 Subject: [PATCH] 修改jquery引入 --- package-lock.json | 11 +++++++++++ src/utils/map/dialog.js | 5 +---- src/api/index.js | 6 +++--- index.html | 2 +- package.json | 1 + src/components.d.ts | 2 -- src/router/index.js | 5 +++-- 7 files changed, 20 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index 630476d..673dfd6 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@ type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.5&key=c55f27799afbfa69dc5a3fad90cafe51&plugin=Map3D,ElasticMarker,AMap.ControlBar,AMap.Geocoder" ></script> - <script src="/src/lib/jquery-3.5.1.min.js"></script> + <!-- <script src="/src/lib/jquery-3.5.1.min.js"></script> --> <script type="module" src="/src/main.js"></script> </body> </html> diff --git a/package-lock.json b/package-lock.json index e21b6be..d551b73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "axios": "^1.6.8", "echarts": "^5.5.0", "element-plus": "^2.6.2", + "jquery": "^3.7.1", "moment": "^2.30.1", "pinia": "^2.1.7", "unplugin-vue-components": "^0.26.0", @@ -2653,6 +2654,11 @@ "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } + }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" }, "node_modules/js-beautify": { "version": "1.15.1", @@ -6334,6 +6340,11 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + }, "js-beautify": { "version": "1.15.1", "resolved": "https://registry.npmmirror.com/js-beautify/-/js-beautify-1.15.1.tgz", diff --git a/package.json b/package.json index b754274..b002e29 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "axios": "^1.6.8", "echarts": "^5.5.0", "element-plus": "^2.6.2", + "jquery": "^3.7.1", "moment": "^2.30.1", "pinia": "^2.1.7", "unplugin-vue-components": "^0.26.0", diff --git a/src/api/index.js b/src/api/index.js index 4c084fe..ed45795 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,10 +1,10 @@ import axios from 'axios'; import { ElMessage } from 'element-plus'; -const debug = true; +const debug = false; -let ip1 = 'http://114.215.109.124:8805/'; -// let ip1 = 'http://47.100.191.150:9029/'; +// let ip1 = 'http://114.215.109.124:8805/'; +let ip1 = 'http://47.100.191.150:9029/'; if (debug) { ip1 = 'http://192.168.0.138:8084/'; diff --git a/src/components.d.ts b/src/components.d.ts index 5d5fb4f..680395f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -11,7 +11,6 @@ BaseMap: typeof import('./components/map/BaseMap.vue')['default'] CardButton: typeof import('./components/CardButton.vue')['default'] CardDialog: typeof import('./components/CardDialog.vue')['default'] - copy: typeof import('./components/search/OptionType copy.vue')['default'] CoreHeader: typeof import('./components/core/CoreHeader.vue')['default'] CoreMenu: typeof import('./components/core/CoreMenu.vue')['default'] DataSummary: typeof import('./components/monitor/DataSummary.vue')['default'] @@ -29,7 +28,6 @@ ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] - ElInput: typeof import('element-plus/es')['ElInput'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopover: typeof import('element-plus/es')['ElPopover'] diff --git a/src/router/index.js b/src/router/index.js index a5d2520..a614390 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,8 @@ -import { createRouter, createWebHistory } from 'vue-router'; +import { createRouter, createWebHashHistory } from 'vue-router'; const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), + // history: createWebHistory(import.meta.env.BASE_URL), + history: createWebHashHistory(), routes: [ { path: '/', diff --git a/src/utils/map/dialog.js b/src/utils/map/dialog.js index 443f87b..f802c99 100644 --- a/src/utils/map/dialog.js +++ b/src/utils/map/dialog.js @@ -1,3 +1,4 @@ +import $ from 'jquery'; import { factorName } from '@/constant/factor-name'; import { factorUnit } from '@/constant/factor-unit'; import { windDir } from '@/constant/wind-dir'; @@ -166,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(); @@ -187,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') -- Gitblit v1.9.3