diff --git a/src/components/common/subscript/subscript-content.vue b/src/components/common/subscript/subscript-content.vue new file mode 100644 index 00000000..6079555a --- /dev/null +++ b/src/components/common/subscript/subscript-content.vue @@ -0,0 +1,35 @@ + + \ No newline at end of file diff --git a/src/components/common/subscript/subscript-index.vue b/src/components/common/subscript/subscript-index.vue new file mode 100644 index 00000000..2cdf26cb --- /dev/null +++ b/src/components/common/subscript/subscript-index.vue @@ -0,0 +1,66 @@ + + + + + \ No newline at end of file diff --git a/src/components/common/subscript/subscript-styles.vue b/src/components/common/subscript/subscript-styles.vue new file mode 100644 index 00000000..11bbe1fe --- /dev/null +++ b/src/components/common/subscript/subscript-styles.vue @@ -0,0 +1,126 @@ + + + \ No newline at end of file diff --git a/src/components/model-article-list/index.vue b/src/components/model-article-list/index.vue index 6ad69c5c..fe719735 100644 --- a/src/components/model-article-list/index.vue +++ b/src/components/model-article-list/index.vue @@ -6,10 +6,16 @@
@@ -33,10 +39,16 @@
- - +
+ + + + +
{{ !isEmpty(item.new_title) ? item.new_title : item.data.title }}
@@ -55,13 +67,6 @@
-
diff --git a/src/components/model-article-list/model-article-list-content.vue b/src/components/model-article-list/model-article-list-content.vue index a8b3704c..00a0ad16 100644 --- a/src/components/model-article-list/model-article-list-content.vue +++ b/src/components/model-article-list/model-article-list-content.vue @@ -29,6 +29,12 @@ +
+ +
角标设置
+ + +
diff --git a/src/components/model-article-list/model-article-list-styles.vue b/src/components/model-article-list/model-article-list-styles.vue index e9f17228..02da35b1 100644 --- a/src/components/model-article-list/model-article-list-styles.vue +++ b/src/components/model-article-list/model-article-list-styles.vue @@ -85,6 +85,11 @@ + +
diff --git a/src/components/model-article-tabs/model-article-tabs-content.vue b/src/components/model-article-tabs/model-article-tabs-content.vue index 8746c7dc..62a0814a 100644 --- a/src/components/model-article-tabs/model-article-tabs-content.vue +++ b/src/components/model-article-tabs/model-article-tabs-content.vue @@ -59,6 +59,12 @@ +
+ +
角标设置
+ + +
diff --git a/src/components/model-article-tabs/model-article-tabs-styles.vue b/src/components/model-article-tabs/model-article-tabs-styles.vue index f3999f8c..d7d6b1ca 100644 --- a/src/components/model-article-tabs/model-article-tabs-styles.vue +++ b/src/components/model-article-tabs/model-article-tabs-styles.vue @@ -111,6 +111,11 @@ + +
diff --git a/src/components/model-goods-list/index.vue b/src/components/model-goods-list/index.vue index 8adfd468..4c568185 100644 --- a/src/components/model-goods-list/index.vue +++ b/src/components/model-goods-list/index.vue @@ -17,12 +17,16 @@ + +
购物车按钮
diff --git a/src/components/model-goods-tabs/model-goods-tabs-content.vue b/src/components/model-goods-tabs/model-goods-tabs-content.vue index f5db0fd4..83337896 100644 --- a/src/components/model-goods-tabs/model-goods-tabs-content.vue +++ b/src/components/model-goods-tabs/model-goods-tabs-content.vue @@ -59,6 +59,12 @@
+
+ +
角标设置
+ + +
diff --git a/src/components/model-goods-tabs/model-goods-tabs-styles.vue b/src/components/model-goods-tabs/model-goods-tabs-styles.vue index 7c9945cf..9dbf7a48 100644 --- a/src/components/model-goods-tabs/model-goods-tabs-styles.vue +++ b/src/components/model-goods-tabs/model-goods-tabs-styles.vue @@ -111,6 +111,11 @@
+ +
购物车按钮
diff --git a/src/components/model-nav-group/index.ts b/src/components/model-nav-group/index.ts index b9bad859..ea940f85 100644 --- a/src/components/model-nav-group/index.ts +++ b/src/components/model-nav-group/index.ts @@ -11,6 +11,11 @@ interface nav_group_content { display_style: string; row: number; nav_content_list: nav_group[]; + seckill_subscript_show: string; + subscript_type: string; + subscript_img_src: uploadList[]; + subscript_icon_class: string; + subscript_text: string; } interface nav_group_styles { @@ -34,5 +39,6 @@ interface nav_group_styles { title_color: string; title_size: number; title_space: number; + subscript_style: object; common_style: object; } diff --git a/src/components/model-nav-group/index.vue b/src/components/model-nav-group/index.vue index 5ca0703f..661ce744 100644 --- a/src/components/model-nav-group/index.vue +++ b/src/components/model-nav-group/index.vue @@ -5,8 +5,10 @@
-
+
+ +

{{ item1.title }}

diff --git a/src/components/model-nav-group/model-nav-group-content.vue b/src/components/model-nav-group/model-nav-group-content.vue index 87649abb..69b50f54 100644 --- a/src/components/model-nav-group/model-nav-group-content.vue +++ b/src/components/model-nav-group/model-nav-group-content.vue @@ -53,6 +53,12 @@ +添加 +
+ +
角标设置
+ + +
@@ -95,7 +101,13 @@ const props = withDefaults(defineProps(),{ title: '', link: {}, } - ] + ], + // 角标配置 + seckill_subscript_show: '0', + subscript_type: 'text', + subscript_img_src: [], + subscript_icon_class: '', + subscript_text: '', }) }); diff --git a/src/components/model-nav-group/model-nav-group-styles.vue b/src/components/model-nav-group/model-nav-group-styles.vue index 8ee30d54..cf00713c 100644 --- a/src/components/model-nav-group/model-nav-group-styles.vue +++ b/src/components/model-nav-group/model-nav-group-styles.vue @@ -54,6 +54,11 @@ + +
@@ -93,6 +98,7 @@ const props = withDefaults(defineProps(), { title_color: '#000', title_size: 12, title_space: 10, + subscript_style: {}, common_style: {}, }), }); diff --git a/src/components/model-seckill/index.vue b/src/components/model-seckill/index.vue index 0924d788..d128230d 100644 --- a/src/components/model-seckill/index.vue +++ b/src/components/model-seckill/index.vue @@ -48,9 +48,8 @@ -
- {{ form.subscript_text }} -
+ +
@@ -114,9 +113,8 @@ -
- {{ form.subscript_text }} -
+ +
@@ -192,6 +190,7 @@ const props = defineProps({ const form = computed(() => props.value?.content || {}); const new_style = computed(() => props.value?.style || {}); +//#region 秒杀头部控制 const time_bg = computed(() => { const { countdown_bg_color_list, countdown_direction } = new_style.value; // 渐变 @@ -229,9 +228,10 @@ const seckill_head_img_style = computed(() => { style += background_computer(back) + padding_computer(padding); return style; }); - +//#endregion const style = computed(() => common_styles_computer(props.value.style.common_style)); const style_img_container = computed(() => common_img_computer(props.value.style.common_style)); +//#region 秒杀默认数据 interface plugins_icon_data { name: string; bg_color: string; @@ -288,7 +288,8 @@ const default_list = { }, ], }; -const list = ref([]); +//#endregion +//#region 倒计时和商品数据获取 // 显示时间 const time_config = reactive([ { key: 'hour', value: '00' }, @@ -341,6 +342,7 @@ const updateCountdown = () => { } }); }; +const list = ref([]); // 更新倒计时函数 onBeforeMount(() => { SeckillAPI.getSeckillList({}).then((res: any) => { @@ -372,6 +374,8 @@ onBeforeMount(() => { onUnmounted(() => { clearInterval(intervalId.value); }) +//#endregion +//#region 商品样式 // 商品间距 const content_outer_spacing = computed(() => new_style.value.content_outer_spacing); // 圆角设置 @@ -424,6 +428,8 @@ const layout_img_style = computed(() => { } return padding + background_computer(data); }); +//#endregion +//#region 图片大小控制 const shop_style_type_list= [ { name: '单列', value: '1', width: 110, height: 120 }, { name: '双列', value: '2', width: 180, height: 180 }, @@ -455,6 +461,8 @@ const goods_img_height = computed(() => { } } }); +//#endregion +//#region 通用处理方式,处理文字大小和颜色等 // 根据传递的参数,从对象中取值 const trends_config = (key: string, type?: string) => { return style_config(new_style.value[`shop_${key}_typeface`], new_style.value[`shop_${key}_size`], new_style.value[`shop_${key}_color`], type); @@ -477,6 +485,7 @@ const style_config = (typeface: string, size: number, color: string | object, ty const button_gradient = () => { return gradient_handle(new_style.value.shop_button_color, '180deg'); }; +//#endregion // 不换行显示 const multicolumn_columns_width = computed(() => { const { carousel_col } = toRefs(form.value); @@ -494,6 +503,7 @@ const multicolumn_columns_width = computed(() => { const is_show = (index: string) => { return form.value.is_show.includes(index); }; +//#region 轮播图 // 轮播图key值 const carouselKey = ref('0'); const autoplay = ref(false); @@ -519,23 +529,7 @@ watchEffect(() => { const multicolumn_columns_height = computed(() => new_style.value.content_outer_height + 'px'); // 图片圆角设置 const content_img_radius = computed(() => radius_computer(new_style.value.shop_img_radius)); - -// 左上角,右上角,右下角,左下角 -const corner_marker = computed(() => { - const { seckill_subscript_location, shop_img_radius, seckill_subscript_bg_color, seckill_subscript_text_color } = new_style.value; - let location = `background: ${seckill_subscript_bg_color};color: ${seckill_subscript_text_color};`; - // 圆角根据图片的圆角来计算 对角线是同样的圆角 - if (seckill_subscript_location == 'top-left') { - location += `top: 0;left: 0;border-radius: ${shop_img_radius.radius_top_left}px 0 ${shop_img_radius.radius_top_left}px 0;`; - } else if (seckill_subscript_location == 'top-right') { - location += `top: 0;right: 0;border-radius: 0 ${shop_img_radius.radius_top_right}px 0 ${shop_img_radius.radius_top_right}px;`; - } else if (seckill_subscript_location == 'bottom-left') { - location += `bottom: 0;left: 0;border-radius: 0 ${shop_img_radius.radius_bottom_left}px 0 ${shop_img_radius.radius_bottom_left}px;`; - } else if (seckill_subscript_location == 'bottom-right') { - location += `bottom: 0;right: 0;border-radius: ${shop_img_radius.radius_bottom_right}px 0 ${shop_img_radius.radius_bottom_right}px 0;`; - } - return location; -}); +//#endregion diff --git a/src/components/model-seckill/model-seckill-content.vue b/src/components/model-seckill/model-seckill-content.vue index f54949da..83d7bf68 100644 --- a/src/components/model-seckill/model-seckill-content.vue +++ b/src/components/model-seckill/model-seckill-content.vue @@ -82,14 +82,8 @@ - - - - - - - - + +
diff --git a/src/components/model-seckill/model-seckill-styles.vue b/src/components/model-seckill/model-seckill-styles.vue index 0819cdd5..d57ccb92 100644 --- a/src/components/model-seckill/model-seckill-styles.vue +++ b/src/components/model-seckill/model-seckill-styles.vue @@ -68,19 +68,6 @@ - -
- - {{ item.name }} - - - - - - - -
-
@@ -110,6 +97,11 @@
+ +