Merge remote-tracking branch 'origin/dev-yxl' into dev-sws
commit
192daad5a7
|
|
@ -382,6 +382,6 @@ const float_bottom_change = (val: { bottom: string; location: string }, id: stri
|
|||
overflow: hidden;
|
||||
}
|
||||
.tabs-view {
|
||||
z-index: 4;
|
||||
z-index: 2;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -17,9 +17,9 @@
|
|||
</template>
|
||||
<template v-else>
|
||||
<div class="cube-selected-text">
|
||||
{{ Math.round((750 / densityNum) * (item.end.y - item.start.y + 1)) }}
|
||||
x
|
||||
{{ Math.round((750 / densityNum) * (item.end.x - item.start.x + 1)) }}
|
||||
x
|
||||
{{ Math.round((750 / densityNum) * (item.end.y - item.start.y + 1)) }}
|
||||
像素
|
||||
<template v-if="props.type == 'data'">
|
||||
<div>{{ data_title(item) }}</div>
|
||||
|
|
|
|||
|
|
@ -1,68 +1,69 @@
|
|||
<template>
|
||||
<div :style="style_container">
|
||||
<swiper
|
||||
:key="carouselKey"
|
||||
:class="{'swiper-card': interval_types }"
|
||||
direction="horizontal"
|
||||
:loop="true"
|
||||
:effect="interval_types ? 'coverflow': 'slide'"
|
||||
:autoplay="autoplay"
|
||||
:allow-touch-move="false"
|
||||
:speed="500"
|
||||
slides-per-view="auto"
|
||||
:space-between="0"
|
||||
:initial-slide="4"
|
||||
:centered-slides="true"
|
||||
:pause-on-mouse-enter="true"
|
||||
:modules="modules"
|
||||
:coverflow-effect="interval_types ? {
|
||||
rotate: 50,
|
||||
stretch: 0,
|
||||
depth: 100,
|
||||
modifier: 1,
|
||||
slideShadows: true
|
||||
} : undefined"
|
||||
@slide-change="slideChange"
|
||||
>
|
||||
<swiper-slide v-for="(item, index) in form.carousel_list" :key="index">
|
||||
<div class="item-image flex align-c w h re" :style="img_style">
|
||||
<image-empty v-model="item.carousel_img[0]" :style="img_style" :fit="img_fit" error-style="width:5rem;height:5rem"></image-empty>
|
||||
<div v-if="new_style.video_is_show == '1' && item.carousel_video.length > 0" :class="{'x-middle': new_style.video_location == 'center', 'right-0': new_style.video_location == 'flex-end' }" class="z-deep video-class flex-row abs gap-10 align-c oh" :style="video_style">
|
||||
<template v-if="new_style.video_type == 'img'">
|
||||
<image-empty v-model="new_style.video_img[0]" class="video_img" error-img-style="width: 1.4rem;height: 1.4rem;" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-icon :class="`iconfont ${ !isEmpty(new_style.video_icon_class) ? 'icon-' + new_style.video_icon_class : 'icon-bofang' } size-14`" :style="`color:${new_style.video_icon_color};`" />
|
||||
</template>
|
||||
<span v-if="!isEmpty(item.video_title)" :style="`color:${new_style.video_title_color};font-size: ${new_style.video_title_size}px;`">{{ item.video_title }}</span>
|
||||
<div ref="swiperSize" class="swiper-container w h">
|
||||
<swiper
|
||||
:key="carouselKey"
|
||||
:class="[`swiper-right-${swiper_style.slidesPerView}`, {'swiper-card': interval_types}]"
|
||||
direction="horizontal"
|
||||
:loop="true"
|
||||
:effect="interval_types ? 'coverflow': 'slide'"
|
||||
:autoplay="autoplay"
|
||||
:allow-touch-move="false"
|
||||
:speed="500"
|
||||
:slides-per-view="swiper_style.slidesPerView"
|
||||
:space-between="swiper_style.spaceBetween"
|
||||
:centered-slides="swiper_style.centeredSlides"
|
||||
:pause-on-mouse-enter="true"
|
||||
:modules="modules"
|
||||
:coverflow-effect="interval_types ? {
|
||||
rotate: 50,
|
||||
stretch: 0,
|
||||
depth: 100,
|
||||
modifier: 1,
|
||||
slideShadows: true
|
||||
} : undefined"
|
||||
@slide-change="slideChange"
|
||||
>
|
||||
<swiper-slide v-for="(item, index) in form.carousel_list" :key="index">
|
||||
<div class="item-image flex align-c w h re" :style="img_style">
|
||||
<image-empty v-model="item.carousel_img[0]" :style="img_style" :fit="img_fit" error-style="width:5rem;height:5rem"></image-empty>
|
||||
<div v-if="new_style.video_is_show == '1' && item.carousel_video.length > 0" :class="{'x-middle': new_style.video_location == 'center', 'right-0': new_style.video_location == 'flex-end' }" class="z-deep video-class flex-row abs gap-10 align-c oh" :style="video_style">
|
||||
<template v-if="new_style.video_type == 'img'">
|
||||
<image-empty v-model="new_style.video_img[0]" class="video_img" error-img-style="width: 1.4rem;height: 1.4rem;" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-icon :class="`iconfont ${ !isEmpty(new_style.video_icon_class) ? 'icon-' + new_style.video_icon_class : 'icon-bofang' } size-14`" :style="`color:${new_style.video_icon_color};`" />
|
||||
</template>
|
||||
<span v-if="!isEmpty(item.video_title)" :style="`color:${new_style.video_title_color};font-size: ${new_style.video_title_size}px;`">{{ item.video_title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
<swiper-slide v-for="(item, index1) in seat_list" :key="index1">
|
||||
<div class="item-image flex align-c w h re" :style="img_style">
|
||||
<image-empty v-model="item.carousel_img[0]" :style="img_style" :fit="img_fit" error-style="width:5rem;height:5rem"></image-empty>
|
||||
<div v-if="new_style.video_is_show == '1' && item.carousel_video.length > 0" :class="{'x-middle': new_style.video_location == 'center', 'right-0': new_style.video_location == 'flex-end' }" class="z-deep video-class flex-row abs gap-10 align-c oh" :style="video_style">
|
||||
<template v-if="new_style.video_type == 'img'">
|
||||
<image-empty v-model="new_style.video_img[0]" class="video_img" error-img-style="width: 1.4rem;height: 1.4rem;" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-icon :class="`iconfont ${ !isEmpty(new_style.video_icon_class) ? 'icon-' + new_style.video_icon_class : 'icon-bofang' } size-14`" :style="`color:${new_style.video_icon_color};`" />
|
||||
</template>
|
||||
<span v-if="!isEmpty(item.video_title)" :style="`color:${new_style.video_title_color};font-size: ${new_style.video_title_size}px;`">{{ item.video_title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
<div v-if="new_style.is_show == '1'" :class="{'x-middle': new_style.indicator_location == 'center', 'right-0': new_style.indicator_location == 'flex-end' }" class="dot flex abs" :style="`bottom: ${new_style.indicator_bottom}px;`">
|
||||
<template v-if="new_style.indicator_style == 'num'">
|
||||
<div :style="indicator_style" class="dot-item">
|
||||
<span class="num-active">{{ actived_index + 1 }}</span><span>/{{ form.carousel_list.length }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div v-for="(item, index2) in form.carousel_list" :key="index2" :style="indicator_style" :class="{'dot-item': true, 'active': actived_index == index2 }" />
|
||||
</template>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
<swiper-slide v-for="(item, index1) in seat_list" :key="index1">
|
||||
<div class="item-image flex align-c w h re" :style="img_style">
|
||||
<image-empty v-model="item.carousel_img[0]" :style="img_style" :fit="img_fit" error-style="width:5rem;height:5rem"></image-empty>
|
||||
<div v-if="new_style.video_is_show == '1' && item.carousel_video.length > 0" :class="{'x-middle': new_style.video_location == 'center', 'right-0': new_style.video_location == 'flex-end' }" class="z-deep video-class flex-row abs gap-10 align-c oh" :style="video_style">
|
||||
<template v-if="new_style.video_type == 'img'">
|
||||
<image-empty v-model="new_style.video_img[0]" class="video_img" error-img-style="width: 1.4rem;height: 1.4rem;" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-icon :class="`iconfont ${ !isEmpty(new_style.video_icon_class) ? 'icon-' + new_style.video_icon_class : 'icon-bofang' } size-14`" :style="`color:${new_style.video_icon_color};`" />
|
||||
</template>
|
||||
<span v-if="!isEmpty(item.video_title)" :style="`color:${new_style.video_title_color};font-size: ${new_style.video_title_size}px;`">{{ item.video_title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
<div v-if="new_style.is_show == '1'" :class="{'x-middle': new_style.indicator_location == 'center', 'right-0': new_style.indicator_location == 'flex-end' }" class="dot flex abs" :style="`bottom: ${new_style.indicator_bottom}px;`">
|
||||
<template v-if="new_style.indicator_style == 'num'">
|
||||
<div :style="indicator_style" class="dot-item">
|
||||
<span class="num-active">{{ actived_index + 1 }}</span><span>/{{ form.carousel_list.length }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div v-for="(item, index2) in form.carousel_list" :key="index2" :style="indicator_style" :class="{'dot-item': true, 'active': actived_index == index2 }" />
|
||||
</template>
|
||||
</div>
|
||||
</swiper>
|
||||
</swiper>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -153,7 +154,37 @@ const interval_list = ref({
|
|||
length: 0
|
||||
})
|
||||
|
||||
const interval_types = computed(() => interval_type.value == 'card' );
|
||||
const interval_types = computed(() => interval_type.value == 'card');
|
||||
const swiper_Width = ref(390);
|
||||
const swiper_right_2 = computed(() => ((swiper_Width.value - new_style.value.image_spacing) / 2) + 'px');
|
||||
const swiper_right_3 = computed(() => ((swiper_Width.value - (new_style.value.image_spacing * 2)) / 3) + 'px');
|
||||
const negative_swiper_right_2 = computed(() => '-' + swiper_right_2.value);
|
||||
const negative_swiper_right_3 = computed(() => '-' + swiper_right_3.value);
|
||||
const swiperSize = ref<any>(null);
|
||||
onMounted(() => {
|
||||
if (swiperSize.value) {
|
||||
swiper_Width.value = swiperSize.value.clientWidth;
|
||||
}
|
||||
});
|
||||
const swiper_style = computed(() => {
|
||||
let slidesPerView: number | "auto" | undefined = 'auto';
|
||||
let centeredSlides = true;
|
||||
let spaceBetween = 0;
|
||||
if (form.value.carousel_type == 'oneDragOne') {
|
||||
slidesPerView = 2;
|
||||
centeredSlides = false;
|
||||
spaceBetween = new_style.value.image_spacing;
|
||||
} else if (form.value.carousel_type == 'twoDragOne') {
|
||||
slidesPerView = 3;
|
||||
centeredSlides = false
|
||||
spaceBetween = new_style.value.image_spacing;
|
||||
}
|
||||
return {
|
||||
slidesPerView: slidesPerView,
|
||||
centeredSlides: centeredSlides,
|
||||
spaceBetween: spaceBetween
|
||||
}
|
||||
});
|
||||
// 视频播放按钮显示逻辑
|
||||
const video_style = computed(() => {
|
||||
let style = `bottom: ${new_style.value.video_bottom}px;`;
|
||||
|
|
@ -200,6 +231,14 @@ watchEffect(() => {
|
|||
//#endregion
|
||||
});
|
||||
|
||||
watch(() => new_style.value.common_style, () => {
|
||||
nextTick(() => {
|
||||
if (swiperSize.value) {
|
||||
swiper_Width.value = swiperSize.value.clientWidth;
|
||||
}
|
||||
})
|
||||
}, {deep: true});
|
||||
|
||||
const slideChange = (swiper: { realIndex: number }) => {
|
||||
if (swiper.realIndex > form.value.carousel_list.length - 1) {
|
||||
const seat_length = seat_list.value.length;
|
||||
|
|
@ -218,6 +257,8 @@ const slideChange = (swiper: { realIndex: number }) => {
|
|||
<style lang="scss" scoped>
|
||||
.dot {
|
||||
z-index: 1;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
.dot-item {
|
||||
margin: 0 0.3rem;
|
||||
&.active {
|
||||
|
|
@ -242,6 +283,20 @@ const slideChange = (swiper: { realIndex: number }) => {
|
|||
}
|
||||
}
|
||||
|
||||
/* 这里的样式是为了模拟next-margin的效果 */
|
||||
.swiper-container .swiper-right-2 {
|
||||
margin-right: v-bind(negative_swiper_right_2);
|
||||
.dot {
|
||||
padding-right: v-bind(swiper_right_2);
|
||||
}
|
||||
}
|
||||
.swiper-container .swiper-right-3 {
|
||||
margin-right: v-bind(negative_swiper_right_3);
|
||||
.dot {
|
||||
padding-right: v-bind(swiper_right_3);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.swiper-slide) {
|
||||
.item-image {
|
||||
background: #F8FDFF;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
<el-radio-group v-model="form.carousel_type">
|
||||
<el-radio value="inherit">样式一</el-radio>
|
||||
<el-radio value="card">样式二</el-radio>
|
||||
<el-radio value="oneDragOne">样式三</el-radio>
|
||||
<el-radio value="twoDragOne">样式四</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片设置">
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@
|
|||
<el-form-item label="高度设置">
|
||||
<slider v-model="form.height" :max="1000"></slider>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="['oneDragOne', 'twoDragOne'].includes(new_content.carousel_type)" label="图片间距">
|
||||
<slider v-model="form.image_spacing" :max="100"></slider>
|
||||
</el-form-item>
|
||||
</card-container>
|
||||
<div class="divider-line"></div>
|
||||
<card-container>
|
||||
|
|
|
|||
|
|
@ -355,6 +355,8 @@ const style_container = computed(() => common_styles_computer(new_style.value.co
|
|||
right: 0;
|
||||
}
|
||||
.dot {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
z-index: 3;
|
||||
.dot-item {
|
||||
margin: 0 0.3rem;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<image-empty v-model="item.img[0]"></image-empty>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="cube-selected-text">250 x 750 像素</div>
|
||||
<div class="cube-selected-text"> 250 x 750 像素</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -173,6 +173,8 @@ const carousel_change = (index: number) => {
|
|||
width: v-bind(group_width);
|
||||
}
|
||||
.dot {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
.dot-item {
|
||||
margin: 0 0.3rem;
|
||||
&.active {
|
||||
|
|
|
|||
|
|
@ -339,6 +339,9 @@ onBeforeMount(() => {
|
|||
}
|
||||
});
|
||||
});
|
||||
onUnmounted(() => {
|
||||
clearInterval(intervalId.value);
|
||||
})
|
||||
// 商品间距
|
||||
const content_outer_spacing = computed(() => new_style.value.content_outer_spacing);
|
||||
// 圆角设置
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@
|
|||
<card-container>
|
||||
<div class="mb-12">轮播设置</div>
|
||||
<el-form-item label="自动轮播">
|
||||
<el-switch v-model="form.is_roll" />
|
||||
<el-switch v-model="form.is_roll" active-value="1" inactive-value="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="间隔时间">
|
||||
<slider v-model="form.interval_time" :min="1" :max="100"></slider>
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ const text_style = computed(() => `font-weight:${new_style.value.header_backgrou
|
|||
position: v-bind(position);
|
||||
top: 0;
|
||||
left: 50%;
|
||||
z-index: 2;
|
||||
z-index: 3;
|
||||
transform: translateX(-50%);
|
||||
.roll {
|
||||
width: 39rem;
|
||||
|
|
@ -109,7 +109,7 @@ const text_style = computed(() => `font-weight:${new_style.value.header_backgrou
|
|||
// border: 0.2rem solid $cr-main;
|
||||
position: relative;
|
||||
box-shadow: 0px 0 0px 0.2rem $cr-main !important;
|
||||
z-index: 1;
|
||||
z-index: 3;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.logo-outer-style {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ interface defaultSearch {
|
|||
radius_bottom_right: number;
|
||||
is_show: string;
|
||||
height: number,
|
||||
image_spacing: number,
|
||||
indicator_style: string;
|
||||
indicator_location: string;
|
||||
indicator_size: number;
|
||||
|
|
@ -81,6 +82,7 @@ const defaultSearch: defaultSearch = {
|
|||
radius_bottom_right: 0,
|
||||
is_show: '1',
|
||||
height: 300,
|
||||
image_spacing: 10,
|
||||
indicator_style: 'dot',
|
||||
indicator_location: 'center',
|
||||
indicator_size: 5,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
</TransitionGroup>
|
||||
</VueDraggable>
|
||||
</div>
|
||||
</div>34
|
||||
</div>
|
||||
</div>
|
||||
<!-- 视图渲染 -->
|
||||
<div class="main re">
|
||||
|
|
@ -67,12 +67,13 @@
|
|||
<div class="model-wall" :style="content_style">
|
||||
<div class="model-wall-content" :style="`padding-top:${top_padding}px; margin-top: ${top_margin}px;padding-bottom:${bottom_navigation_show ? footer_nav_counter_store.padding_footer : 0}px;`">
|
||||
<div-content :diy-data="tabs_data" :show-model-border="show_model_border" :is-tabs="true" :main-content-style="main_content_style" @on_choose="set_tabs_event(true);" @del="del"></div-content>
|
||||
<div v-if="tabs_data.length > 0" class="seat"></div>
|
||||
<VueDraggable v-model="diy_data" :animation="500" :touch-start-threshold="2" group="people" class="drag-area re" ghost-class="ghost" :on-sort="on_sort" :on-start="on_start" :on-end="on_end">
|
||||
<div-content :diy-data="diy_data" :show-model-border="show_model_border" :main-content-style="main_content_style" @on_choose="on_choose" @del="del" @copy="copy" @move-up="moveUp" @move-down="moveDown"></div-content>
|
||||
</VueDraggable>
|
||||
</div>
|
||||
</div>
|
||||
<div class="seat"></div>
|
||||
<!-- <div class="seat"></div> -->
|
||||
</div>
|
||||
<!-- 底部区域 -->
|
||||
<div v-if="bottom_navigation_show" class="model-bottom">
|
||||
|
|
|
|||
Loading…
Reference in New Issue