maochaoying 2 years ago
parent
commit
bdc694bb0a
  1. 12
      src/components/Trumbs/index.vue
  2. 2
      stats.html
  3. 24
      vite.config.js

12
src/components/Trumbs/index.vue

@ -31,7 +31,7 @@
(props.isCase
? case_detail_img_data[industry_id]
: hard_img_data[hardware_id]
)?.length > 7 && sw.activeIndex != 0
)?.length > 7 && sw?.activeIndex != 0
"
></div>
<div
@ -41,7 +41,7 @@
(props.isCase
? case_detail_img_data[industry_id]
: hard_img_data[hardware_id]
)?.length > 7 && !sw.isEnd
)?.length > 7 && !sw?.isEnd
"
></div>
</swiper>
@ -65,15 +65,15 @@ import 'swiper/css/navigation'
// import required modules
import { FreeMode, Navigation } from 'swiper'
const preSwiper = () => {
const { activeIndex } = sw.value
const { activeIndex } = sw.value || {}
if (activeIndex != 0) {
sw.value.slidePrev(500, false)
sw.value?.slidePrev(500, false)
}
}
const nextSwiper = () => {
const { isEnd } = sw.value
const { isEnd } = sw.value || {}
if (!isEnd) {
sw.value.slideNext(500, false)
sw.value?.slideNext(500, false)
}
}
const detailStore = useDetailStore()

2
stats.html
File diff suppressed because it is too large
View File

24
vite.config.js

@ -26,18 +26,18 @@ export default defineConfig({
viteCompression(),
visualizer(),
chunkSplitPlugin(),
// viteImagemin({
// optipng: {
// optimizationLevel: 7,
// },
// mozjpeg: {
// quality: 20,
// },
// pngquant: {
// quality: [0.8, 0.9],
// speed: 4,
// },
// }),
viteImagemin({
optipng: {
optimizationLevel: 7,
},
mozjpeg: {
quality: 20,
},
pngquant: {
quality: [0.8, 0.9],
speed: 4,
},
}),
],
//配置sass
css: {

Loading…
Cancel
Save