From a250a4496184cff56b5c4eb235e7525028b33a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Wed, 12 Mar 2025 18:22:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=94=80=E5=94=AE=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/model-salerecords/index.vue | 285 ++++++++++++++++++ .../model-salerecords-content.vue | 74 +++++ .../model-salerecords-setting.vue | 27 ++ .../model-salerecords-styles.vue | 111 +++++++ src/config/const/salerecords.ts | 142 +++++++++ 5 files changed, 639 insertions(+) create mode 100644 src/components/model-salerecords/index.vue create mode 100644 src/components/model-salerecords/model-salerecords-content.vue create mode 100644 src/components/model-salerecords/model-salerecords-setting.vue create mode 100644 src/components/model-salerecords/model-salerecords-styles.vue create mode 100644 src/config/const/salerecords.ts diff --git a/src/components/model-salerecords/index.vue b/src/components/model-salerecords/index.vue new file mode 100644 index 00000000..53fc0263 --- /dev/null +++ b/src/components/model-salerecords/index.vue @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + {{ item.nick_name }} + + + + {{ item.goods_title }} + {{ item.time }} + + + + + + + + + + + + + + + {{ item1.goods_title }} + {{ item1.time }} + + + + + + + + + + + + diff --git a/src/components/model-salerecords/model-salerecords-content.vue b/src/components/model-salerecords/model-salerecords-content.vue new file mode 100644 index 00000000..64ec406a --- /dev/null +++ b/src/components/model-salerecords/model-salerecords-content.vue @@ -0,0 +1,74 @@ + + + + + + + 展示设置 + + + + + + 纵向 + 横向 + + + + + + + + + 自动读取 + + + + + + + 显示内容 + + + {{ item.name }} + + + + + + + + diff --git a/src/components/model-salerecords/model-salerecords-setting.vue b/src/components/model-salerecords/model-salerecords-setting.vue new file mode 100644 index 00000000..b2f19dec --- /dev/null +++ b/src/components/model-salerecords/model-salerecords-setting.vue @@ -0,0 +1,27 @@ + + + + + + + + + + + diff --git a/src/components/model-salerecords/model-salerecords-styles.vue b/src/components/model-salerecords/model-salerecords-styles.vue new file mode 100644 index 00000000..8c954f75 --- /dev/null +++ b/src/components/model-salerecords/model-salerecords-styles.vue @@ -0,0 +1,111 @@ + + + + + 内容样式 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/config/const/salerecords.ts b/src/config/const/salerecords.ts new file mode 100644 index 00000000..60b355e8 --- /dev/null +++ b/src/config/const/salerecords.ts @@ -0,0 +1,142 @@ +import defaultCommon from "./index"; +import commonTop from './common-top'; +import { cloneDeep } from "lodash"; + +interface defaultSalerecords { + content: { + content_top: object; + is_roll: string; + rotation_direction: string; + interval_time: number; + show_number: number; + is_show: string[]; + }; + style: { + heading_img_width: number; + heading_img_height: number; + heading_img_border_color: string; + heading_img_border_size: number; + heading_img_radius: { + radius: number; + radius_top_left: number; + radius_top_right: number; + radius_bottom_left: number; + radius_bottom_right: number; + }; + nick_name_color: string; + nick_name_typeface: string; + nick_name_size: number; + goods_img_width: number; + goods_img_height: number; + goods_img_border_color: string; + goods_img_border_size: number; + goods_img_radius: { + radius: number; + radius_top_left: number; + radius_top_right: number; + radius_bottom_left: number; + radius_bottom_right: number; + }; + goods_title_color: string; + goods_title_typeface: string; + goods_title_size: number; + time_color: string; + time_typeface: string; + time_size: number; + content_color_list: color_list[]; + content_direction: number; + content_background_img_style: number; + content_background_img: string[]; + data_spacing: number; + content_padding: paddingStyle; + content_radius: { + radius: number; + radius_top_left: number; + radius_top_right: number; + radius_bottom_left: number; + radius_bottom_right: number; + }; + common_style: object; + }; +} +const defaultSalerecords: defaultSalerecords = { + content: { + content_top: { + ...commonTop, + }, + is_roll: '1', + rotation_direction: 'vertical', + interval_time: 3, + show_number: 2, + is_show: ['head', 'nick_name', 'goods_image', 'goods_title', 'time'], + }, + style: { + heading_img_width: 28, + heading_img_height: 28, + heading_img_border_color: '', + heading_img_border_size: 0, + heading_img_radius: { + radius: 20, + radius_top_left: 20, + radius_top_right: 20, + radius_bottom_left: 20, + radius_bottom_right: 20, + }, + nick_name_color: '#666', + nick_name_typeface: '400', + nick_name_size: 14, + goods_img_width: 28, + goods_img_height: 28, + goods_img_border_color: '', + goods_img_border_size: 0, + goods_img_radius: { + radius: 20, + radius_top_left: 20, + radius_top_right: 20, + radius_bottom_left: 20, + radius_bottom_right: 20, + }, + goods_title_color: '#666', + goods_title_typeface: '400', + goods_title_size: 14, + time_color: '#999', + time_typeface: '400', + time_size: 14, + content_color_list: [{ color: '#F4F4F4', color_percentage: undefined }], + content_direction: 0, + content_background_img_style: 0, + content_background_img: [], + data_spacing: 10, + content_padding: { + padding: 0, + padding_top: 6, + padding_bottom: 6, + padding_left: 10, + padding_right: 10, + }, + content_radius: { + radius: 20, + radius_top_left: 20, + radius_top_right: 20, + radius_bottom_left: 20, + radius_bottom_right: 20, + }, + // 公共样式 + common_style: { + ...defaultCommon, + color_list: [{ color: '#fff', color_percentage: undefined }], + margin: 10, + margin_top: 10, + margin_bottom: 10, + margin_left: 10, + margin_right: 10, + padding: 10, + padding_top: 10, + padding_bottom: 10, + padding_left: 10, + padding_right: 10, + } + }, +}; + +export default defaultSalerecords;