From d5a8d70bb9def7d935f8710add9a5963737799f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 7 Mar 2025 18:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E5=90=88=E6=90=AD=E9=85=8D=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../img-or-icon-or-text-content.vue | 39 +++ .../model-binding/components/goods-index.vue | 135 ++++++++ src/components/model-binding/index.vue | 153 ++++----- .../model-binding/model-binding-content.vue | 149 +++++---- .../model-binding/model-binding-styles.vue | 182 +++++------ src/components/model-goods-list/index.vue | 2 +- .../model-shop/model-shop-content.vue | 4 - src/config/const/binding.ts | 294 +++++++++++++----- src/config/const/realstore.ts | 10 +- src/config/const/shop.ts | 10 +- 10 files changed, 641 insertions(+), 337 deletions(-) create mode 100644 src/components/common/img-or-icon-or-text/img-or-icon-or-text-content.vue create mode 100644 src/components/model-binding/components/goods-index.vue diff --git a/src/components/common/img-or-icon-or-text/img-or-icon-or-text-content.vue b/src/components/common/img-or-icon-or-text/img-or-icon-or-text-content.vue new file mode 100644 index 00000000..dbc7c5db --- /dev/null +++ b/src/components/common/img-or-icon-or-text/img-or-icon-or-text-content.vue @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/src/components/model-binding/components/goods-index.vue b/src/components/model-binding/components/goods-index.vue new file mode 100644 index 00000000..0ea209d2 --- /dev/null +++ b/src/components/model-binding/components/goods-index.vue @@ -0,0 +1,135 @@ + + + \ No newline at end of file diff --git a/src/components/model-binding/index.vue b/src/components/model-binding/index.vue index 9293f324..cc5e65bf 100644 --- a/src/components/model-binding/index.vue +++ b/src/components/model-binding/index.vue @@ -1,64 +1,67 @@ -
+
{{ item.title }}
diff --git a/src/components/model-shop/model-shop-content.vue b/src/components/model-shop/model-shop-content.vue index 9f4af749..24bd2880 100644 --- a/src/components/model-shop/model-shop-content.vue +++ b/src/components/model-shop/model-shop-content.vue @@ -114,10 +114,6 @@ const base_list = reactive({ { name: '浏览量', value: '1' }, { name: '描述', value: '2' }, ], - field_desc_row: [ - { name: '一行', value: '1' }, - { name: '两行', value: '2' } - ] }); const emits = defineEmits(['theme_change']); diff --git a/src/config/const/binding.ts b/src/config/const/binding.ts index 036c4d15..0008fdea 100644 --- a/src/config/const/binding.ts +++ b/src/config/const/binding.ts @@ -2,46 +2,142 @@ import defaultCommon from "./index"; import commonTop from './common-top'; import { cloneDeep } from "lodash"; +type icon_style = { + color_list: color_list[]; + direction: string; + color: string; + size: number; + img_width: number; + img_height: number; + margin: number; + margin_top: number; + margin_bottom: number; + margin_left: number; + margin_right: number; + padding: number; + padding_top: number; + padding_bottom: number; + padding_left: number; + padding_right: number; + radius: number; + radius_top_left: number; + radius_top_right: number; + radius_bottom_left: number; + radius_bottom_right: number; +} + +const common_icon_style: icon_style = { + color_list: [{ color: '', color_percentage: undefined }], + direction: '90deg', + color: '#ccc', + size: 12, + img_width: 14, + img_height: 14, + margin: 0, + margin_top: 0, + margin_bottom: 0, + margin_left: 0, + margin_right: 0, + padding: 0, + padding_top: 0, + padding_bottom: 0, + padding_left: 0, + padding_right: 0, + radius: 0, + radius_top_left: 0, + radius_top_right: 0, + radius_bottom_left: 0, + radius_bottom_right: 0, +} interface defaultRealstore { content: { content_top: object; + host_graph_theme: string; + is_host_graph_show: string; + list_show_list: string[]; + is_default_show_shop: string; theme: string; carousel_col: number; - shop_desc: string; - shop_desc_row: string; + goods_save_price: string; + goods_save_price_row: string; data_list: string[]; - is_right_show: string; - right_type: string; - right_img: uploadList[]; - right_icon: string; - right_text: string; + is_details_show: string; + details_type: string; + details_img: uploadList[]; + details_icon: string; + details_text: string; + is_data_discounts_show: string, + data_discounts_type: string, + data_discounts_img: uploadList[], + data_discounts_icon: string, + data_discounts_text: string, + is_goods_discounts_show: string, + goods_discounts_type: string, + goods_discounts_img: uploadList[], + goods_discounts_icon: string, + goods_discounts_text: string, }; style: { - shop_color_list: color_list[]; - shop_direction: string; - shop_background_img_style: string; - shop_background_img: uploadList[]; - shop_img_radius: radiusStyle; - shop_margin: marginStyle; - shop_padding: paddingStyle; - shop_radius: radiusStyle; content_img_width: number; content_img_height: number; content_spacing: number; content_outer_spacing: number; content_outer_height: number; - shop_title_img_width: number, - shop_title_img_height: number, - shop_title_img_radius: radiusStyle, - shop_title_img_inner_spacing: number, - shop_title_img_outer_spacing: number, - shop_title_color: string; - shop_title_typeface: string; - shop_title_size: number; - shop_desc_color: string; - shop_desc_typeface: string; - shop_desc_size: number; - right_style: object, + data_color_list: color_list[]; + data_direction: string; + data_background_img_style: string; + data_background_img: uploadList[]; + data_img_radius: radiusStyle; + data_margin: marginStyle; + data_padding: paddingStyle; + data_radius: radiusStyle; + data_title_img_width: number, + data_title_img_height: number, + data_title_img_radius: radiusStyle, + data_title_img_inner_spacing: number, + data_title_img_outer_spacing: number, + data_title_color: string; + data_title_typeface: string; + data_title_size: number; + data_price_symbol_color: string; + data_price_symbol_size: number; + data_price_color: string; + data_price_typeface: string; + data_price_size: number; + data_save_price_symbol_color: string; + data_save_price_symbol_size: number; + data_save_price_color: string; + data_save_price_typeface: string; + data_save_price_size: number; + goods_color_list: color_list[]; + goods_direction: string; + goods_background_img_style: string; + goods_background_img: uploadList[]; + goods_img_radius: radiusStyle; + goods_margin: marginStyle; + goods_padding: paddingStyle; + goods_radius: radiusStyle; + goods_title_img_width: number, + goods_title_img_height: number, + goods_title_img_radius: radiusStyle, + goods_title_img_inner_spacing: number, + goods_title_img_outer_spacing: number, + goods_title_color: string; + goods_title_typeface: string; + goods_title_size: number; + goods_price_symbol_color: string; + goods_price_symbol_size: number; + goods_price_color: string; + goods_price_typeface: string; + goods_price_size: number; + goods_save_price_symbol_color: string; + goods_save_price_symbol_size: number; + goods_save_price_color: string; + goods_save_price_typeface: string; + goods_save_price_size: number; + details_style: object, + data_discounts_style: object, + goods_discounts_style: object, is_roll: string; interval_time: number; rolling_fashion: string; @@ -63,96 +159,154 @@ const defaultRealstore: defaultRealstore = { content_top: { ...commonTop, }, + host_graph_theme: '0', + is_host_graph_show: '1', + list_show_list: ['title', 'goods_img', 'price', 'save_price'], + is_default_show_shop: '1', theme: '0', carousel_col: 1, - shop_desc: '1', - shop_desc_row: '1', + goods_save_price: '1', + goods_save_price_row: '1', data_list: [], - is_right_show: '1', - right_type: 'img-icon', - right_img: [], - right_icon: 'arrow-right', - right_text: '', + is_details_show: '1', + details_type: 'img-icon', + details_img: [], + details_icon: 'arrow-right', + details_text: '', + is_data_discounts_show: '1', + data_discounts_type: 'img-icon', + data_discounts_img: [], + data_discounts_icon: 'arrow-right', + data_discounts_text: '', + is_goods_discounts_show: '1', + goods_discounts_type: 'img-icon', + goods_discounts_img: [], + goods_discounts_icon: 'arrow-right', + goods_discounts_text: '', }, style: { - shop_color_list: [{ color: '#fff', color_percentage: undefined }], - shop_direction: '90deg', - shop_background_img_style: '2', - shop_background_img: [], + content_img_width: 50, + content_img_height: 50, + content_spacing: 10, + content_outer_spacing: 10, + content_outer_height: 204, + data_color_list: [{ color: '#fff', color_percentage: undefined }], + data_direction: '90deg', + data_background_img_style: '2', + data_background_img: [], // 图片圆角 - shop_img_radius: { + data_img_radius: { radius: 0, radius_top_left: 0, radius_top_right: 0, radius_bottom_left: 0, radius_bottom_right: 0, }, - shop_margin: { + data_margin: { margin: 0, margin_top: 0, margin_bottom: 0, margin_left: 0, margin_right: 0, }, - shop_padding: { + data_padding: { padding: 10, padding_top: 10, padding_bottom: 10, padding_left: 10, padding_right: 10, }, - shop_radius: { + data_radius: { radius: 0, radius_top_left: 0, radius_top_right: 0, radius_bottom_left: 0, radius_bottom_right: 0, }, - content_img_width: 50, - content_img_height: 50, - content_spacing: 10, - content_outer_spacing: 10, - content_outer_height: 204, - shop_title_img_width: 12, - shop_title_img_height: 12, - shop_title_img_radius: { + data_title_img_width: 12, + data_title_img_height: 12, + data_title_img_radius: { radius: 0, radius_top_left: 0, radius_top_right: 0, radius_bottom_left: 0, radius_bottom_right: 0, }, - shop_title_img_inner_spacing: 5, - shop_title_img_outer_spacing: 5, - shop_title_color: '#333', - shop_title_typeface: 'bold', - shop_title_size: 14, - shop_desc_color: '#666', - shop_desc_typeface: '400', - shop_desc_size: 12, - right_style: { - color_list: [{ color: '', color_percentage: undefined }], - direction: '90deg', - color: '#ccc', - size: 12, - img_width: 14, - img_height: 14, + data_title_img_inner_spacing: 5, + data_title_img_outer_spacing: 5, + data_title_color: '#333', + data_title_typeface: 'bold', + data_title_size: 14, + data_price_symbol_color: '#666', + data_price_symbol_size: 12, + data_price_color: '#666', + data_price_typeface: '400', + data_price_size: 12, + data_save_price_symbol_color: '#666', + data_save_price_symbol_size: 12, + data_save_price_color: '#666', + data_save_price_typeface: '400', + data_save_price_size: 12, + goods_color_list: [{ color: '#fff', color_percentage: undefined }], + goods_direction: '90deg', + goods_background_img_style: '2', + goods_background_img: [], + // 图片圆角 + goods_img_radius: { + radius: 0, + radius_top_left: 0, + radius_top_right: 0, + radius_bottom_left: 0, + radius_bottom_right: 0, + }, + goods_margin: { margin: 0, margin_top: 0, margin_bottom: 0, margin_left: 0, margin_right: 0, - padding: 0, - padding_top: 0, - padding_bottom: 0, - padding_left: 0, - padding_right: 0, + }, + goods_padding: { + padding: 10, + padding_top: 10, + padding_bottom: 10, + padding_left: 10, + padding_right: 10, + }, + goods_radius: { radius: 0, radius_top_left: 0, radius_top_right: 0, radius_bottom_left: 0, radius_bottom_right: 0, }, + goods_title_img_width: 12, + goods_title_img_height: 12, + goods_title_img_radius: { + radius: 0, + radius_top_left: 0, + radius_top_right: 0, + radius_bottom_left: 0, + radius_bottom_right: 0, + }, + goods_title_img_inner_spacing: 5, + goods_title_img_outer_spacing: 5, + goods_title_color: '#333', + goods_title_typeface: 'bold', + goods_title_size: 14, + goods_price_symbol_color: '#666', + goods_price_symbol_size: 12, + goods_price_color: '#666', + goods_price_typeface: '400', + goods_price_size: 12, + goods_save_price_symbol_color: '#666', + goods_save_price_symbol_size: 12, + goods_save_price_color: '#666', + goods_save_price_typeface: '400', + goods_save_price_size: 12, + details_style: cloneDeep(common_icon_style), + data_discounts_style: cloneDeep(common_icon_style), + goods_discounts_style: cloneDeep(common_icon_style), // 是否滚动 is_roll: '1', interval_time: 3, diff --git a/src/config/const/realstore.ts b/src/config/const/realstore.ts index 5a330653..19445beb 100644 --- a/src/config/const/realstore.ts +++ b/src/config/const/realstore.ts @@ -193,11 +193,11 @@ const defaultRealstore: defaultRealstore = { padding_right: 10, }, realstore_radius: { - radius: 0, - radius_top_left: 0, - radius_top_right: 0, - radius_bottom_left: 0, - radius_bottom_right: 0, + radius: 8, + radius_top_left: 8, + radius_top_right: 8, + radius_bottom_left: 8, + radius_bottom_right: 8, }, content_img_width: 50, content_img_height: 50, diff --git a/src/config/const/shop.ts b/src/config/const/shop.ts index 036c4d15..6f643a0a 100644 --- a/src/config/const/shop.ts +++ b/src/config/const/shop.ts @@ -102,11 +102,11 @@ const defaultRealstore: defaultRealstore = { padding_right: 10, }, shop_radius: { - radius: 0, - radius_top_left: 0, - radius_top_right: 0, - radius_bottom_left: 0, - radius_bottom_right: 0, + radius: 8, + radius_top_left: 8, + radius_top_right: 8, + radius_bottom_left: 8, + radius_bottom_right: 8, }, content_img_width: 50, content_img_height: 50,