From 65f03685d0e6e5fd29783faef98d0f03f64d83af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=AE=8F=E6=9D=B0?= <1943105267@qq.com> Date: Tue, 12 Nov 2024 14:55:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- postcss.config.js | 6 +++--- src/views/car.vue | 1 + src/views/nationwide.vue | 6 +++++- vue.config.js | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index 95686f0..c56ba55 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,10 +1,10 @@ module.exports = { plugins: { "postcss-px-to-viewport": { - // viewportWidth: 1920, + viewportWidth: 1920, - viewportWidth: 6656, - viewportHeight: 1792, + // viewportWidth: 6656, + // viewportHeight: 1792, }, }, }; diff --git a/src/views/car.vue b/src/views/car.vue index 766d6b3..64ab445 100644 --- a/src/views/car.vue +++ b/src/views/car.vue @@ -478,6 +478,7 @@ export default { if (this.timer) clearInterval(this.timer); const result = await getCarByCarplate(this.searchQuery); if (result.list) { + this.searchText = ""; if (result.list[0].stateCn.includes("离线")) { this.$modal.msgError(`该车${result.list[0].stateCn}!`); return; diff --git a/src/views/nationwide.vue b/src/views/nationwide.vue index 5bcf8ae..34109e8 100644 --- a/src/views/nationwide.vue +++ b/src/views/nationwide.vue @@ -163,12 +163,16 @@ export default { }); }, + removeProvinceLevelWords(str) { + return str.replace(/省|市|自治区/g, ""); + }, + async getEchartsOption() { let res = await getProvince(); let items = []; res.data.forEach((item) => { - const label = item.city.replace("省", ""); + const label = this.removeProvinceLevelWords(item.city); const centreItem = provinceCentre.china[label]; if (item.city == "江苏省") { items.push({ diff --git a/vue.config.js b/vue.config.js index ef0aef4..c673b7e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -19,8 +19,8 @@ module.exports = { // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // publicPath: process.env.NODE_ENV === "production" ? "/demo/yunkunPc" : "/", - // publicPath: process.env.NODE_ENV === "production" ? "/yunkunPc" : "/", - publicPath: process.env.NODE_ENV === "production" ? "/yunkunPc-big" : "/", + publicPath: process.env.NODE_ENV === "production" ? "/yunkunPc" : "/", + // publicPath: process.env.NODE_ENV === "production" ? "/yunkunPc-big" : "/", // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和 baseUrl 的生产环境路径一致)(默认dist) outputDir: "dist", // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)