diff --git a/src/views/MarketingComparison/mcChooseModel/index.vue b/src/views/MarketingComparison/mcChooseModel/index.vue index c222eff..464cbb6 100644 --- a/src/views/MarketingComparison/mcChooseModel/index.vue +++ b/src/views/MarketingComparison/mcChooseModel/index.vue @@ -225,7 +225,7 @@ export default { // 获取切换车型的数据 handlerBrand(arr) { let row = this.list[this.chooseIndex]; - row.brand = arr[0].brandname; + row.brand = arr[1].brandname; row.model = arr[1].name; row.isDel = true; }, diff --git a/src/views/ModelComparison/brandCompateHeader/index.vue b/src/views/ModelComparison/brandCompateHeader/index.vue index a016735..e81cac1 100644 --- a/src/views/ModelComparison/brandCompateHeader/index.vue +++ b/src/views/ModelComparison/brandCompateHeader/index.vue @@ -159,7 +159,7 @@ export default { let n = this.list.findIndex((ele) => ele.model === arr[1].name); if (n != -1) return; let row = this.list[this.chooseIndex]; - row.brand = arr[0].brandname; + row.brand = arr[1].brandname; row.model = arr[1].name; row.isDel = true; let filterArr = this.list.filter((ele) => { diff --git a/vue.config.js b/vue.config.js index 9403680..1c5306f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,7 +7,7 @@ * @FilePath: /data-show/vue.config.js */ const CompressionWebpackPlugin = require('compression-webpack-plugin') -const productionGzipExtensions = ['js', 'css', 'svg'] +const productionGzipExtensions = /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i // 1. 引入等比适配插件 const px2rem = require('postcss-px2rem') // 2. 配置基本大小 @@ -37,9 +37,10 @@ module.exports = { new CompressionWebpackPlugin({ filename: '[path].gz[query]', algorithm: 'gzip', - test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'), + test: productionGzipExtensions, threshold: 10240, - minRatio: 0.8 + minRatio: 0.8, + deleteOriginalAssets: false }) ) } else {