diff --git a/src/style.scss b/src/style.scss index 799f0fb..b60ab5d 100644 --- a/src/style.scss +++ b/src/style.scss @@ -175,3 +175,7 @@ body { stroke-dashoffset: calc(480 * (1 - var(--progress))); stroke-dasharray: 480; } + +.ignore-min-width { + min-width: 1280px; +} diff --git a/src/views/Index/components/HeaderSwiper/index.vue b/src/views/Index/components/HeaderSwiper/index.vue index 82a7398..c22f8dc 100644 --- a/src/views/Index/components/HeaderSwiper/index.vue +++ b/src/views/Index/components/HeaderSwiper/index.vue @@ -18,7 +18,7 @@ pageUpDown: true, }" @autoplayTimeLeft="onAutoplayTimeLeft" - class="header_swiper" + class="header_swiper ignore-min-width" > diff --git a/src/views/Index/index.vue b/src/views/Index/index.vue index 8189558..4738b57 100644 --- a/src/views/Index/index.vue +++ b/src/views/Index/index.vue @@ -16,7 +16,7 @@ @swiper="onSwiper" @slideChange="onSlideChange" :modules="modules" - class="home_swiper" + class="home_swiper ignore-min-width" > diff --git a/vite.config.js b/vite.config.js index 481a1ca..d5bcd33 100644 --- a/vite.config.js +++ b/vite.config.js @@ -22,33 +22,33 @@ export default defineConfig({ plugins: [ vue(), chunkSplitPlugin(), - // viteImagemin({ - // gifsicle: { - // optimizationLevel: 7, - // interlaced: false, - // }, - // optipng: { - // optimizationLevel: 7, - // }, - // mozjpeg: { - // quality: 20, - // }, - // pngquant: { - // quality: [0.8, 0.9], - // speed: 4, - // }, - // svgo: { - // plugins: [ - // { - // name: 'removeViewBox', - // }, - // { - // name: 'removeEmptyAttrs', - // active: false, - // }, - // ], - // }, - // }), + viteImagemin({ + gifsicle: { + optimizationLevel: 7, + interlaced: false, + }, + optipng: { + optimizationLevel: 7, + }, + mozjpeg: { + quality: 20, + }, + pngquant: { + quality: [0.8, 0.9], + speed: 4, + }, + svgo: { + plugins: [ + { + name: 'removeViewBox', + }, + { + name: 'removeEmptyAttrs', + active: false, + }, + ], + }, + }), ], //配置sass css: {