From c005e9fefda5c39900c600b9706d390af8e921e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Thu, 6 Mar 2025 18:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=9A=E9=97=A8=E5=BA=97?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/div-content/index.vue | 4 + src/components/model-binding/index.vue | 368 ++++++++++++++++++ .../model-binding/model-binding-content.vue | 233 +++++++++++ .../model-binding/model-binding-setting.vue | 33 ++ .../model-binding/model-binding-styles.vue | 165 ++++++++ .../model-realstore-styles.vue | 2 +- src/config/const/binding.ts | 188 +++++++++ src/views/layout/components/main/index.ts | 3 + .../layout/components/settings/index.vue | 4 + 9 files changed, 999 insertions(+), 1 deletion(-) create mode 100644 src/components/model-binding/index.vue create mode 100644 src/components/model-binding/model-binding-content.vue create mode 100644 src/components/model-binding/model-binding-setting.vue create mode 100644 src/components/model-binding/model-binding-styles.vue create mode 100644 src/config/const/binding.ts diff --git a/src/components/common/div-content/index.vue b/src/components/common/div-content/index.vue index e56a41e1..2693a5c3 100644 --- a/src/components/common/div-content/index.vue +++ b/src/components/common/div-content/index.vue @@ -122,6 +122,10 @@ + + + + diff --git a/src/components/model-binding/index.vue b/src/components/model-binding/index.vue new file mode 100644 index 00000000..9293f324 --- /dev/null +++ b/src/components/model-binding/index.vue @@ -0,0 +1,368 @@ + + + + + + + + + + + + + + + + + + + + + + + {{ item.title }} + + {{ item.desc }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ item.title }} + + {{ item.desc }} + + + + + + + + + + + + diff --git a/src/components/model-binding/model-binding-content.vue b/src/components/model-binding/model-binding-content.vue new file mode 100644 index 00000000..9f4af749 --- /dev/null +++ b/src/components/model-binding/model-binding-content.vue @@ -0,0 +1,233 @@ + + + + + + + 展示设置 + + + {{ item.name }} + + + + + 单列展示 + 两列展示 + 三列展示 + 四列展示 + + + + + + + + 一行 + 两行 + + + + + + 商户设置 + + + + + + + 按钮设置 + + + + + + + + 图片/图标 + 文字 + + + + + + + + + + + + + + + + + + diff --git a/src/components/model-binding/model-binding-setting.vue b/src/components/model-binding/model-binding-setting.vue new file mode 100644 index 00000000..bdc4f360 --- /dev/null +++ b/src/components/model-binding/model-binding-setting.vue @@ -0,0 +1,33 @@ + + + + + + + + + + + diff --git a/src/components/model-binding/model-binding-styles.vue b/src/components/model-binding/model-binding-styles.vue new file mode 100644 index 00000000..7ab863ac --- /dev/null +++ b/src/components/model-binding/model-binding-styles.vue @@ -0,0 +1,165 @@ + + + + + 内容样式 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 图标设置 + + + + + + + 轮播设置 + + + + + + + + + + 平移 + 切屏 + + + + + + + + + + + + diff --git a/src/components/model-realstore/model-realstore-styles.vue b/src/components/model-realstore/model-realstore-styles.vue index f8c12b34..c59bfc2a 100644 --- a/src/components/model-realstore/model-realstore-styles.vue +++ b/src/components/model-realstore/model-realstore-styles.vue @@ -51,7 +51,7 @@ - + diff --git a/src/config/const/binding.ts b/src/config/const/binding.ts new file mode 100644 index 00000000..036c4d15 --- /dev/null +++ b/src/config/const/binding.ts @@ -0,0 +1,188 @@ +import defaultCommon from "./index"; +import commonTop from './common-top'; +import { cloneDeep } from "lodash"; + +interface defaultRealstore { + content: { + content_top: object; + theme: string; + carousel_col: number; + shop_desc: string; + shop_desc_row: string; + data_list: string[]; + is_right_show: string; + right_type: string; + right_img: uploadList[]; + right_icon: string; + right_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, + is_roll: string; + interval_time: number; + rolling_fashion: string; + border_is_show: string, + border_color: string, + border_style: string, + border_size: paddingStyle, + // 阴影 + box_shadow_color: string; + box_shadow_x: number; + box_shadow_y: number; + box_shadow_blur: number; + box_shadow_spread: number; + common_style: object; + }; +} +const defaultRealstore: defaultRealstore = { + content: { + content_top: { + ...commonTop, + }, + theme: '0', + carousel_col: 1, + shop_desc: '1', + shop_desc_row: '1', + data_list: [], + is_right_show: '1', + right_type: 'img-icon', + right_img: [], + right_icon: 'arrow-right', + right_text: '', + }, + style: { + shop_color_list: [{ color: '#fff', color_percentage: undefined }], + shop_direction: '90deg', + shop_background_img_style: '2', + shop_background_img: [], + // 图片圆角 + shop_img_radius: { + radius: 0, + radius_top_left: 0, + radius_top_right: 0, + radius_bottom_left: 0, + radius_bottom_right: 0, + }, + shop_margin: { + margin: 0, + margin_top: 0, + margin_bottom: 0, + margin_left: 0, + margin_right: 0, + }, + shop_padding: { + padding: 10, + padding_top: 10, + padding_bottom: 10, + padding_left: 10, + padding_right: 10, + }, + shop_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: { + 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, + 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, + }, + // 是否滚动 + is_roll: '1', + interval_time: 3, + rolling_fashion: 'translation', // 滚动方式 translation 平移 cut-screen 切屏 + border_is_show: '0', + border_color: '#eee', + border_style: 'solid', + border_size: { + padding: 1, + padding_top: 1, + padding_right: 1, + padding_bottom: 1, + padding_left: 1, + }, + // 阴影 + box_shadow_color: '', + box_shadow_x: 0, + box_shadow_y: 0, + box_shadow_blur: 0, + box_shadow_spread: 0, + // 公共样式 + common_style: { + ...defaultCommon, + padding: 10, + padding_top: 10, + padding_bottom: 10, + padding_left: 10, + padding_right: 10, + } + }, +}; + +export default defaultRealstore; diff --git a/src/views/layout/components/main/index.ts b/src/views/layout/components/main/index.ts index d26e37d8..90e3aa49 100644 --- a/src/views/layout/components/main/index.ts +++ b/src/views/layout/components/main/index.ts @@ -28,6 +28,7 @@ import defaultSeckill from '@/config/const/seckill'; import defaultTabsCarousel from '@/config/const/tabs-carousel'; import defaultRealstore from '@/config/const/realstore'; import defaultShop from '@/config/const/shop'; +import defaultBinding from '@/config/const/binding'; // 系统设置 interface DefaultSettings { @@ -61,6 +62,7 @@ interface DefaultSettings { tabs_carousel: object; realstore: object; shop: object; + binding: object; } const defaultSettings: DefaultSettings = { @@ -94,6 +96,7 @@ const defaultSettings: DefaultSettings = { tabs_carousel: defaultTabsCarousel, realstore: defaultRealstore, shop: defaultShop, + binding: defaultBinding, }; export default defaultSettings; diff --git a/src/views/layout/components/settings/index.vue b/src/views/layout/components/settings/index.vue index 9bf4bf68..ba81fbe0 100644 --- a/src/views/layout/components/settings/index.vue +++ b/src/views/layout/components/settings/index.vue @@ -110,6 +110,10 @@ + + + +