diff --git a/src/components/model-carousel/index.vue b/src/components/model-carousel/index.vue index 5bf8e800..931c66f6 100644 --- a/src/components/model-carousel/index.vue +++ b/src/components/model-carousel/index.vue @@ -8,6 +8,7 @@ :effect="interval_types ? 'coverflow': 'slide'" :autoplay="autoplay" :allow-touch-move="false" + :speed="500" slides-per-view="auto" :space-between="0" :initial-slide="4" @@ -177,6 +178,8 @@ const slideChange = (swiper: { realIndex: number }) => { const seat_length = seat_list.value.length; if (seat_length == 2 && swiper.realIndex == 3) { actived_index.value = 1; + } else if (seat_length == 3) { + actived_index.value = 0; } else { actived_index.value = swiper.realIndex - seat_list.value.length; } diff --git a/src/components/model-text-title/index.vue b/src/components/model-text-title/index.vue index ec63fb4f..62c160b2 100644 --- a/src/components/model-text-title/index.vue +++ b/src/components/model-text-title/index.vue @@ -51,7 +51,7 @@ const title_style = computed(() => { }); // 标题是否居中 const title_center = computed(() => { - return form.value.is_title_center ? 'jc-c' : ''; + return form.value.is_title_center == '1' ? 'jc-c' : ''; }); // 关键字设置 const keyword_style = computed(() => { diff --git a/src/views/layout/components/main/default/text-title.ts b/src/views/layout/components/main/default/text-title.ts index 039f153f..b4f6e2a7 100644 --- a/src/views/layout/components/main/default/text-title.ts +++ b/src/views/layout/components/main/default/text-title.ts @@ -11,7 +11,7 @@ interface defaultSearch { content: { title: string; title_link: object; - is_title_center: number; + is_title_center: string; keyword_show: string; keyword_list: carousel_list[]; right_show: string; @@ -33,7 +33,7 @@ const defaultSearch: defaultSearch = { content: { title: '', title_link: {}, - is_title_center: 0, + is_title_center: '0', keyword_show: '1', right_show: '1', right_title: '更多',