From 463874a35a91d6568fc4832850f4c68923eeded0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Tue, 13 Aug 2024 10:48:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE=E9=AD=94?= =?UTF-8?q?=E6=96=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{picture-cube => magic-cube}/index.vue | 2 +- src/components/model-data-magic/index.vue | 158 ++++++++++++++ .../model-data-magic-content.vue | 197 ++++++++++++++++++ .../model-data-magic-setting.vue | 27 +++ .../model-data-magic-styles.vue | 62 ++++++ .../model-img-magic-content.vue | 2 +- .../components/main/default/data-magic.ts | 60 ++++++ src/layout/components/main/index.ts | 4 + src/layout/components/main/index.vue | 6 +- src/layout/components/settings/index.vue | 4 + src/types/components.d.ts | 9 + 11 files changed, 528 insertions(+), 3 deletions(-) rename src/components/common/{picture-cube => magic-cube}/index.vue (99%) create mode 100644 src/components/model-data-magic/index.vue create mode 100644 src/components/model-data-magic/model-data-magic-content.vue create mode 100644 src/components/model-data-magic/model-data-magic-setting.vue create mode 100644 src/components/model-data-magic/model-data-magic-styles.vue create mode 100644 src/layout/components/main/default/data-magic.ts diff --git a/src/components/common/picture-cube/index.vue b/src/components/common/magic-cube/index.vue similarity index 99% rename from src/components/common/picture-cube/index.vue rename to src/components/common/magic-cube/index.vue index 8372a0f6..f17d58cd 100644 --- a/src/components/common/picture-cube/index.vue +++ b/src/components/common/magic-cube/index.vue @@ -39,7 +39,7 @@ interface CubeItem { x: number; y: number; }; - img: uploadList[]; + img: uploadList[] } interface Props { diff --git a/src/components/model-data-magic/index.vue b/src/components/model-data-magic/index.vue new file mode 100644 index 00000000..00bba6c6 --- /dev/null +++ b/src/components/model-data-magic/index.vue @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/model-data-magic/model-data-magic-content.vue b/src/components/model-data-magic/model-data-magic-content.vue new file mode 100644 index 00000000..7ebe9afc --- /dev/null +++ b/src/components/model-data-magic/model-data-magic-content.vue @@ -0,0 +1,197 @@ + + + + + 展示风格 + + + + + + + + + + 展示设置 + + + + + + + + + + 250 x 750 像素 + + + + + + + + + + + + + + 375 x 375 像素 + 250 x 375 像素 + + + + + + + + + + + + 内容设置 + + + + + + + + + + + + + + diff --git a/src/components/model-data-magic/model-data-magic-setting.vue b/src/components/model-data-magic/model-data-magic-setting.vue new file mode 100644 index 00000000..0b41600d --- /dev/null +++ b/src/components/model-data-magic/model-data-magic-setting.vue @@ -0,0 +1,27 @@ + + + + + + + + + + + + diff --git a/src/components/model-data-magic/model-data-magic-styles.vue b/src/components/model-data-magic/model-data-magic-styles.vue new file mode 100644 index 00000000..6a8a1bd5 --- /dev/null +++ b/src/components/model-data-magic/model-data-magic-styles.vue @@ -0,0 +1,62 @@ + + + + + 图片魔方 + + + + + + + + + + + + + + + + diff --git a/src/components/model-img-magic/model-img-magic-content.vue b/src/components/model-img-magic/model-img-magic-content.vue index 58208204..380943dd 100644 --- a/src/components/model-img-magic/model-img-magic-content.vue +++ b/src/components/model-img-magic/model-img-magic-content.vue @@ -44,7 +44,7 @@ - + diff --git a/src/layout/components/main/default/data-magic.ts b/src/layout/components/main/default/data-magic.ts new file mode 100644 index 00000000..164191f8 --- /dev/null +++ b/src/layout/components/main/default/data-magic.ts @@ -0,0 +1,60 @@ +import { get_math } from "@/utils"; +import defaultCommon from "./index"; +interface img_magic { + start: object; + end: object; + img: uploadList[], + img_link: object; +} +interface defaultSearch { + content: { + style_actived: number; + img_magic_list: img_magic[]; + }; + style: { + img_radius: object + data_radius: object; + image_spacing: number; + common_style: object; + }; +} + +const defaultSearch: defaultSearch = { + content: { + style_actived: 0, + img_magic_list: [ + { + start: {x: 1, y: 1}, + end: {x: 4, y: 2}, + img: [], + img_link: {} + }, + { + start: {x: 1, y: 3}, + end: {x: 4, y: 4}, + img: [], + img_link: {} + } + ], + }, + style: { + img_radius: { + radius: 0, + radius_top_left: 0, + radius_top_right: 0, + radius_bottom_left: 0, + radius_bottom_right: 0, + }, + data_radius: { + radius: 0, + radius_top_left: 0, + radius_top_right: 0, + radius_bottom_left: 0, + radius_bottom_right: 0, + }, + image_spacing: 2, + common_style: defaultCommon, + }, +}; + +export default defaultSearch; diff --git a/src/layout/components/main/index.ts b/src/layout/components/main/index.ts index 4fecbfc6..d1c1e1ac 100644 --- a/src/layout/components/main/index.ts +++ b/src/layout/components/main/index.ts @@ -19,6 +19,8 @@ import defaultShopTabs from './default/shop-tabs'; import defaultImgMagic from './default/img-magic'; import defaultHotZone from './default/hot-zone'; import defaultCustom from './default/custom'; +import defaultDataMagic from './default/data-magic'; +import { de } from 'element-plus/es/locale'; // 系统设置 interface DefaultSettings { header_nav: object; @@ -40,6 +42,7 @@ interface DefaultSettings { shop_list: object; shop_tabs: object; img_magic: object; + data_magic: object; hot_zone: object; custom: object; } @@ -64,6 +67,7 @@ const defaultSettings: DefaultSettings = { shop_list: defaultProductList, shop_tabs: defaultShopTabs, img_magic: defaultImgMagic, + data_magic: defaultDataMagic, hot_zone: defaultHotZone, custom: defaultCustom, }; diff --git a/src/layout/components/main/index.vue b/src/layout/components/main/index.vue index 65df2e42..08a47fa5 100644 --- a/src/layout/components/main/index.vue +++ b/src/layout/components/main/index.vue @@ -92,6 +92,10 @@ + + + + @@ -100,7 +104,6 @@ - @@ -205,6 +208,7 @@ const components = reactive([ { key: 'article-tabs', name: '文章选项卡' }, { key: 'hot-zone', name: '热区' }, { key: 'custom', name: '自定义' }, + { key: 'data-magic', name: '数据魔方' }, ], }, { diff --git a/src/layout/components/settings/index.vue b/src/layout/components/settings/index.vue index 622d86e2..331f6519 100644 --- a/src/layout/components/settings/index.vue +++ b/src/layout/components/settings/index.vue @@ -63,6 +63,10 @@ + + + + diff --git a/src/types/components.d.ts b/src/types/components.d.ts index ff24f7ac..8dd4f9ee 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -13,6 +13,8 @@ declare module 'vue' { ColorPicker: typeof import('./../components/base/color-picker/index.vue')['default'] CommonStyles: typeof import('./../components/common/common-styles/index.vue')['default'] Components: typeof import('./../components/model-custom/components/index.vue')['default'] + copy: typeof import('./../components/model-img-magic copy/index.vue')['default'] + Cube: typeof import('./../components/common/cube/index.vue')['default'] Dialog: typeof import('./../components/model-custom/components/dialog.vue')['default'] Drag: typeof import('./../components/base/drag/index.vue')['default'] ElBadge: typeof import('element-plus/es')['ElBadge'] @@ -70,8 +72,10 @@ declare module 'vue' { LinkGoodsSearch: typeof import('./../components/common/url-value/link-goods-search.vue')['default'] LinkList: typeof import('./../components/common/url-value/link-list.vue')['default'] LinkTable: typeof import('./../components/common/url-value/link-table.vue')['default'] + MagicCube: typeof import('./../components/common/magic-cube/index.vue')['default'] Main: typeof import('./../layout/components/main/index.vue')['default'] Maps: typeof import('./../components/base/maps/index.vue')['default'] + 'Model-': typeof import('./../components/model-/index.vue')['default'] ModelArticleList: typeof import('./../components/model-article-list/index.vue')['default'] ModelArticleListContent: typeof import('./../components/model-article-list/model-article-list-content.vue')['default'] ModelArticleListSetting: typeof import('./../components/model-article-list/model-article-list-setting.vue')['default'] @@ -96,6 +100,11 @@ declare module 'vue' { ModelCustomContent: typeof import('./../components/model-custom/model-custom-content.vue')['default'] ModelCustomSetting: typeof import('./../components/model-custom/model-custom-setting.vue')['default'] ModelCustomStyles: typeof import('./../components/model-custom/model-custom-styles.vue')['default'] + ModelDataCube: typeof import('./../components/model-data-cube/index.vue')['default'] + ModelDataMagic: typeof import('./../components/model-data-magic/index.vue')['default'] + ModelDataMagicContent: typeof import('./../components/model-data-magic/model-data-magic-content.vue')['default'] + ModelDataMagicSetting: typeof import('./../components/model-data-magic/model-data-magic-setting.vue')['default'] + ModelDataMagicStyles: typeof import('./../components/model-data-magic/model-data-magic-styles.vue')['default'] ModelFloatWindow: typeof import('./../components/model-float-window/index.vue')['default'] ModelFloatWindowContent: typeof import('./../components/model-float-window/model-float-window-content.vue')['default'] ModelFloatWindowSetting: typeof import('./../components/model-float-window/model-float-window-setting.vue')['default']