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: {