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 @@ + + + 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 @@ + + + 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;