From 04539d605dc9b92773f658c3b35901c0c817e61e Mon Sep 17 00:00:00 2001 From: tnt group Date: Tue, 27 Sep 2022 20:14:00 +0800 Subject: [PATCH 01/56] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=9B=BE?= =?UTF-8?q?=E5=B1=82=E6=A8=A1=E5=BC=8F=E6=8E=A7=E5=88=B6=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 1 + src/plugins/icon.ts | 13 ++++++-- src/styles/common/style.scss | 23 +++++++++----- src/views/chart/ContentBox/index.vue | 15 +++------ src/views/chart/ContentLayers/index.vue | 41 ++++++++++++++++++++++--- 5 files changed, 67 insertions(+), 26 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d01f44ae..25f7f0d1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -22,6 +22,7 @@ module.exports = { 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-unused-vars': 'off', + 'vue/no-unused-vars': 'off', 'vue/multi-word-component-names': 'off', 'vue/valid-template-root': 'off', 'vue/no-mutating-props': 'off' diff --git a/src/plugins/icon.ts b/src/plugins/icon.ts index 90bf057c..bcc2496a 100644 --- a/src/plugins/icon.ts +++ b/src/plugins/icon.ts @@ -57,7 +57,10 @@ import { ChevronDownOutline as ChevronDownOutlineIcon, Pulse as PulseIcon, Folder as FolderIcon, - FolderOpen as FolderOpenIcon + FolderOpen as FolderOpenIcon, + Image as ImageIcon, + Images as ImagesIcon, + List as ListIcon } from '@vicons/ionicons5' import { @@ -211,7 +214,13 @@ const ionicons5 = { // 文件夹 FolderIcon, // 文件夹打开 - FolderOpenIcon + FolderOpenIcon, + // 图片 + ImageIcon, + // 多个图片 + ImagesIcon, + // 列表 + ListIcon } const carbon = { diff --git a/src/styles/common/style.scss b/src/styles/common/style.scss index 9fde7bf4..13dee27b 100644 --- a/src/styles/common/style.scss +++ b/src/styles/common/style.scss @@ -1,7 +1,7 @@ -@import './var.scss'; -@import './format.scss'; -@import './animation.scss'; -@import './mixins/mixins.scss'; +@import "./var.scss"; +@import "./format.scss"; +@import "./animation.scss"; +@import "./mixins/mixins.scss"; // 过度 .go-transition { @@ -49,14 +49,14 @@ // 毛玻璃 .go-background-filter { backdrop-filter: $--filter-blur-base; - @include fetch-bg-color('filter-color'); + @include fetch-bg-color("filter-color"); box-shadow: $--border-shadow; } // 毛玻璃 .go-background-filter-shallow { backdrop-filter: $--filter-blur-base; - @include fetch-bg-color('filter-color-shallow'); + @include fetch-bg-color("filter-color-shallow"); box-shadow: $--border-shadow; } @@ -68,7 +68,7 @@ // 背景斑点需配合 @mixin background-image 使用 .go-point-bg { - @include fetch-theme-custom('background-color', 'background-color1'); + @include fetch-theme-custom("background-color", "background-color1"); background-size: 15px 15px, 15px 15px; } @@ -117,4 +117,11 @@ .go-#{$typekey} { #{$type}: 0 !important; } -} \ No newline at end of file +} + +.go-d-inline-block { + display: inline-block; +} +.go-d-block { + display: block; +} diff --git a/src/views/chart/ContentBox/index.vue b/src/views/chart/ContentBox/index.vue index 8c10edcf..826bbb85 100644 --- a/src/views/chart/ContentBox/index.vue +++ b/src/views/chart/ContentBox/index.vue @@ -10,14 +10,9 @@ - + - + @@ -151,7 +146,7 @@ $topOrBottomHeight: 40px; border-bottom: 1px solid; @include fetch-border-color('background-color1'); } - + .content { height: calc(100vh - #{$--header-height}); overflow: hidden; @@ -165,9 +160,7 @@ $topOrBottomHeight: 40px; height: calc(100vh - #{$--header-height} - #{$topOrBottomHeight}); } .content-height-show-both { - height: calc( - 100vh - #{$--header-height} - #{$topOrBottomHeight} - #{$topOrBottomHeight} - ); + height: calc(100vh - #{$--header-height} - #{$topOrBottomHeight} - #{$topOrBottomHeight}); } } diff --git a/src/views/chart/ContentLayers/index.vue b/src/views/chart/ContentLayers/index.vue index 1c34c7b3..1211316f 100644 --- a/src/views/chart/ContentLayers/index.vue +++ b/src/views/chart/ContentLayers/index.vue @@ -8,14 +8,41 @@ @mousedown="boxMousedownHandle($event)" > + + + 暂无图层~ + - + {{ componentGroupData.chartConfig.title }} + +
@@ -31,6 +33,7 @@ v-for="element in componentGroupData.groupList" :key="element.id" :componentData="element" + :layer-mode="layerMode" @mousedown="mousedownHandle($event, element, componentGroupData.id)" @mouseenter="mouseenterHandle(element)" @mouseleave="mouseleaveHandle(element)" @@ -50,13 +53,21 @@ import { useContextMenu, divider } from '@/views/chart/hooks/useContextMenu.hook import { MenuOptionsItemType } from '@/views/chart/hooks/useContextMenu.hook.d' import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.d' import { LayersListItem } from '../LayersListItem' -import throttle from 'lodash/throttle' import { icon } from '@/plugins' +import { LayerModeEnum } from '../../enums' + +const { LockClosedOutlineIcon, EyeOffOutlineIcon } = icon.ionicons5 const props = defineProps({ componentGroupData: { type: Object as PropType, required: true + }, + layerMode: { + type: Object as PropType, + default(): LayerModeEnum { + return 'thumbnail' + } } }) @@ -148,7 +159,11 @@ const groupMousedownHandle = (e: MouseEvent) => { } // 公共点击事件 -const mousedownHandle = (e: MouseEvent, componentInstance: CreateComponentType | CreateComponentGroupType, id?: string) => { +const mousedownHandle = ( + e: MouseEvent, + componentInstance: CreateComponentType | CreateComponentGroupType, + id?: string +) => { e.preventDefault() e.stopPropagation() @@ -169,6 +184,7 @@ const mouseleaveHandle = (componentInstance: CreateComponentType | CreateCompone diff --git a/src/views/chart/ContentLayers/components/LayersListItem/index.vue b/src/views/chart/ContentLayers/components/LayersListItem/index.vue index 5ef4cdb2..e113e9bc 100644 --- a/src/views/chart/ContentLayers/components/LayersListItem/index.vue +++ b/src/views/chart/ContentLayers/components/LayersListItem/index.vue @@ -1,5 +1,5 @@ diff --git a/src/views/chart/ContentLayers/enums.ts b/src/views/chart/ContentLayers/enums.ts index 0cb26ab2..e69de29b 100644 --- a/src/views/chart/ContentLayers/enums.ts +++ b/src/views/chart/ContentLayers/enums.ts @@ -1 +0,0 @@ -export type LayerModeEnum = 'thumbnail' | 'text' diff --git a/src/views/chart/ContentLayers/index.d.ts b/src/views/chart/ContentLayers/index.d.ts new file mode 100644 index 00000000..06596dee --- /dev/null +++ b/src/views/chart/ContentLayers/index.d.ts @@ -0,0 +1,4 @@ +export enum LayerModeEnum { + THUMBNAIL = 'thumbnail', + TEXT = 'text' +} diff --git a/src/views/chart/ContentLayers/index.vue b/src/views/chart/ContentLayers/index.vue index 54efde08..c3323410 100644 --- a/src/views/chart/ContentLayers/index.vue +++ b/src/views/chart/ContentLayers/index.vue @@ -17,7 +17,7 @@ v-for="(item, index) in layerModeEnumList" :key="index" ghost - size="tiny" + size="small" :type="layerMode === item.value ? 'primary' : 'tertiary'" @click="layerMode = item.value as LayerModeEnum" > @@ -77,7 +77,7 @@ import { MenuEnum, MouseEventButton, WinKeyboard, MacKeyboard } from '@/enums/ed import { LayersListItem } from './components/LayersListItem/index' import { LayersGroupListItem } from './components/LayersGroupListItem/index' -import { LayerModeEnum } from './enums' +import { LayerModeEnum } from './index.d' import { icon } from '@/plugins' From 6f5d1d94591892437e531b9c2fcb3e8a66bcca60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Wed, 28 Sep 2022 21:39:31 +0800 Subject: [PATCH 10/56] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E9=94=81?= =?UTF-8?q?=E5=AE=9A=E5=92=8C=E9=9A=90=E8=97=8F=E5=A4=B1=E7=84=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/chartEditStore/chartEditStore.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/modules/chartEditStore/chartEditStore.ts b/src/store/modules/chartEditStore/chartEditStore.ts index 6db94d74..41d2be22 100644 --- a/src/store/modules/chartEditStore/chartEditStore.ts +++ b/src/store/modules/chartEditStore/chartEditStore.ts @@ -843,6 +843,7 @@ export const useChartEditStore = defineStore({ ) } this.updateComponentList(index, targetItem) + this.setTargetSelectChart(undefined) loadingFinish() return } @@ -875,6 +876,7 @@ export const useChartEditStore = defineStore({ ) } this.updateComponentList(index, targetItem) + this.setTargetSelectChart(undefined) loadingFinish() // 取消选择隐藏 @@ -882,7 +884,6 @@ export const useChartEditStore = defineStore({ const chartEditStore = useChartEditStore() chartEditStore.setTargetSelectChart(undefined) } - return } } catch (value) { loadingError() From 1aade9c4b867a42357f1910e9b81f4637ad13f2b Mon Sep 17 00:00:00 2001 From: tnt group Date: Wed, 28 Sep 2022 22:16:08 +0800 Subject: [PATCH 11/56] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E7=BB=84=E4=BB=B6=E9=A2=84=E8=A7=88=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/preview/components/PreviewRenderGroup/index.vue | 1 + src/views/preview/components/PreviewRenderList/index.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/src/views/preview/components/PreviewRenderGroup/index.vue b/src/views/preview/components/PreviewRenderGroup/index.vue index d5bdf767..4d0a813e 100644 --- a/src/views/preview/components/PreviewRenderGroup/index.vue +++ b/src/views/preview/components/PreviewRenderGroup/index.vue @@ -9,6 +9,7 @@ ...getFilterStyle(item.styles), ...getTransformStyle(item.styles) }" + v-show="!item.status.hide" > Date: Thu, 29 Sep 2022 09:12:05 +0800 Subject: [PATCH 12/56] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=B1=82?= =?UTF-8?q?=E7=BA=A7UI=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContentLayers/components/LayersStatus/index.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/views/chart/ContentLayers/components/LayersStatus/index.vue b/src/views/chart/ContentLayers/components/LayersStatus/index.vue index 4179e765..648d0842 100644 --- a/src/views/chart/ContentLayers/components/LayersStatus/index.vue +++ b/src/views/chart/ContentLayers/components/LayersStatus/index.vue @@ -19,9 +19,10 @@ From dd13a0844b40909059a1c3e032013d906157d0b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Thu, 29 Sep 2022 10:10:54 +0800 Subject: [PATCH 14/56] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContentEdit/components/EditShapeBox/index.vue | 12 +++++++++++- .../components/LayersGroupListItem/index.vue | 2 +- .../components/LayersListItem/index.vue | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/views/chart/ContentEdit/components/EditShapeBox/index.vue b/src/views/chart/ContentEdit/components/EditShapeBox/index.vue index a1d162df..b509b32b 100644 --- a/src/views/chart/ContentEdit/components/EditShapeBox/index.vue +++ b/src/views/chart/ContentEdit/components/EditShapeBox/index.vue @@ -1,5 +1,5 @@