From c8a0fe4d36e24a056c3e6041595abb3c40760276 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 25 Oct 2021 17:02:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=8E=E5=8F=B0=E5=BC=80=E5=90=AFgzi?= =?UTF-8?q?p=E5=8E=8B=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/application.properties | 6 ++++++ frontend/src/styles/index.scss | 4 ++-- frontend/vue.config.js | 9 +++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index c9076ac69d..4b4a49e919 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -79,6 +79,12 @@ upload.file.path=/opt/dataease/data/kettle/ dataease.sqlinjection.whitelists=/dataset/table/sqlPreview,/dataset/table/update +#开启压缩 提高响应速度 减少带宽压力 +server.compression.enabled=true +server.compression.mime-types=application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain +server.compression.min-response-size=1024 + + diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 15a3c8f7fa..04e9b1cc5a 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -439,10 +439,10 @@ div:focus { } } -.el-pager li { +/* .blackTheme .el-pager li { color: var(--TableColor) !important; background-color: var(--MainBG) !important; -} +} */ /* .blackTheme .el-select-dropdown { background-color: var(--MainBG) !important; diff --git a/frontend/vue.config.js b/frontend/vue.config.js index 4dcd9d89bf..a0b8c6cfdf 100644 --- a/frontend/vue.config.js +++ b/frontend/vue.config.js @@ -3,6 +3,7 @@ const path = require('path') const defaultSettings = require('./src/settings.js') const CopyWebpackPlugin = require('copy-webpack-plugin') +// const CompressionPlugin = require('compression-webpack-plugin') function resolve(dir) { return path.join(__dirname, dir) @@ -79,6 +80,14 @@ module.exports = { .options({ symbolId: 'icon-[name]' }) + if (process.env.NODE_ENV === 'production') { + /* config.plugin('compressionPlugin').use(new CompressionPlugin({ + test: /\.(js|css|less)$/, // 匹配文件名 + threshold: 10240, // 对超过10k的数据压缩 + minRatio: 0.8, + deleteOriginalAssets: true // 删除源文件 + })) */ + } }, css: { loaderOptions: {