diff --git a/package.json b/package.json index 804b2097..d1af92d1 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "vue-i18n": "9.2.2", "vue-router": "4.0.12", "vue3-lazyload": "^0.2.5-beta", - "vue3-sketch-ruler": "^1.3.3", + "vue3-sketch-ruler": "^2.4.1", "vuedraggable": "^4.1.0" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9704bd87..701fcea8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -111,8 +111,8 @@ importers: specifier: ^0.2.5-beta version: 0.2.5-beta(@vue/compiler-sfc@3.5.16)(vue@3.5.16(typescript@4.6.3)) vue3-sketch-ruler: - specifier: ^1.3.3 - version: 1.3.16(vue@3.5.16(typescript@4.6.3)) + specifier: ^2.4.1 + version: 2.4.1 vuedraggable: specifier: ^4.1.0 version: 4.1.0(vue@3.5.16(typescript@4.6.3)) @@ -3946,18 +3946,8 @@ packages: '@vue/compiler-sfc': '>=3.0.0' vue: '>=3.0.0' - vue3-sketch-ruler@1.3.16: - resolution: {integrity: sha512-k/TBOwbueU9eWOF7k/emsZMwtEqFk/FxG+h//TlaZ2B8RWbxhIe6hPFgggO4Jng10ARsuH4cMGAR+ZOuN4ozgg==} - deprecated: This version is deprecated. Please upgrade to version 2X for better features and performance.See https://github.com/kakajun/vue3-sketch-ruler - hasBin: true - peerDependencies: - '@vue/composition-api': ^1.1.0 - vue: ^2.6.0 || ^3.2.0 - peerDependenciesMeta: - '@vue/composition-api': - optional: true - vue: - optional: true + vue3-sketch-ruler@2.4.1: + resolution: {integrity: sha512-TMMJ5v3cqDA94DPUa1iFHBx4D+FqEqpNXwzGU310aaMDllqyvyFfZigBFryeCRO7Q7EuOD5J5Zwc++LOCHB7Jw==} vue@3.5.16: resolution: {integrity: sha512-rjOV2ecxMd5SiAmof2xzh2WxntRcigkX/He4YFJ6WdRvVUrbt6DxC1Iujh10XLl8xCDRDtGKMeO3D+pRQ1PP9w==} @@ -4323,7 +4313,7 @@ snapshots: '@types/node': 20.5.1 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.8.3) - cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.8.3))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.8.3))(typescript@5.8.3) + cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@4.6.3))(ts-node@10.9.2(@types/node@16.18.126)(typescript@4.6.3))(typescript@5.8.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -5556,7 +5546,7 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.8.3))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.8.3))(typescript@5.8.3): + cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@4.6.3))(ts-node@10.9.2(@types/node@16.18.126)(typescript@4.6.3))(typescript@5.8.3): dependencies: '@types/node': 20.5.1 cosmiconfig: 8.3.6(typescript@5.8.3) @@ -8186,9 +8176,7 @@ snapshots: '@vue/compiler-sfc': 3.5.16 vue: 3.5.16(typescript@4.6.3) - vue3-sketch-ruler@1.3.16(vue@3.5.16(typescript@4.6.3)): - optionalDependencies: - vue: 3.5.16(typescript@4.6.3) + vue3-sketch-ruler@2.4.1: {} vue@3.5.16(typescript@4.6.3): dependencies: diff --git a/src/plugins/customComponents.ts b/src/plugins/customComponents.ts index 0fad1075..35e7b5db 100644 --- a/src/plugins/customComponents.ts +++ b/src/plugins/customComponents.ts @@ -1,7 +1,7 @@ import type { App } from 'vue' import { GoSkeleton } from '@/components/GoSkeleton' import { GoLoading } from '@/components/GoLoading' -import { SketchRule } from 'vue3-sketch-ruler' +import SketchRule from 'vue3-sketch-ruler' /** * 全局注册自定义组件 diff --git a/src/store/modules/chartLayoutStore/chartLayoutStore.d.ts b/src/store/modules/chartLayoutStore/chartLayoutStore.d.ts index b485dd59..f387799e 100644 --- a/src/store/modules/chartLayoutStore/chartLayoutStore.d.ts +++ b/src/store/modules/chartLayoutStore/chartLayoutStore.d.ts @@ -31,6 +31,4 @@ export interface ChartLayoutType { [ChartLayoutStoreEnum.LAYER_TYPE]: LayerModeEnum // 当前正在加载的数量 [ChartLayoutStoreEnum.PERCENTAGE]: number - // 是否重置当前画布位置 - [ChartLayoutStoreEnum.RE_POSITION_CANVAS]: boolean } diff --git a/src/store/modules/chartLayoutStore/chartLayoutStore.ts b/src/store/modules/chartLayoutStore/chartLayoutStore.ts index 95a0cb70..74983bec 100644 --- a/src/store/modules/chartLayoutStore/chartLayoutStore.ts +++ b/src/store/modules/chartLayoutStore/chartLayoutStore.ts @@ -49,9 +49,6 @@ export const useChartLayoutStore = defineStore({ }, getPercentage(): number { return this.percentage - }, - getRePositionCanvas(): boolean { - return this.rePositionCanvas } }, actions: { @@ -65,8 +62,6 @@ export const useChartLayoutStore = defineStore({ }) // 存储本地 setLocalStorage(GO_CHART_LAYOUT_STORE, this.$state) - // 这里需要标记重置画布位置 - this.rePositionCanvas = true; // 重新计算拖拽区域缩放比例 if (computedScale) { setTimeout(() => { diff --git a/src/views/chart/ContentConfigurations/index.vue b/src/views/chart/ContentConfigurations/index.vue index 110a3c2f..9c37280d 100644 --- a/src/views/chart/ContentConfigurations/index.vue +++ b/src/views/chart/ContentConfigurations/index.vue @@ -37,7 +37,13 @@ - + @@ -297,60 +269,10 @@ window.onKeySpacePressHold = (isHold: boolean) => { width: 100%; height: 100%; - .edit-screens { - position: absolute; - width: 100%; - height: 100%; - overflow: auto; - user-select: none; - padding-bottom: 0px; - - /* firefox */ - scrollbar-color: rgba(144, 146, 152, 0.3) transparent; - scrollbar-width: thin; - - /* chrome */ - &::-webkit-scrollbar, - &::-webkit-scrollbar-track-piece { - background-color: transparent; - } - - &::-webkit-scrollbar { - width: 7px; - } - - &::-webkit-scrollbar-thumb { - border-radius: 5px; - background-color: rgba(144, 146, 152, 0.3); - } - // 修复右下角白点用的 - &::-webkit-scrollbar-corner { - background-color: transparent; - } - } - - .fix-edit-screens-block { - position: absolute; - bottom: 0; - right: 0; - width: 10px; - height: 10px; - background-color: $--color-dark-bg-1; - } - - .edit-screen-container { - position: absolute; - height: v-bind('containerHeight'); - top: 0; - left: 0; - } - .canvas { position: absolute; - top:50%; - left: 50%; - transform-origin: 50% 0; - transform: translateY(-50%); + top: 0; + left: 0; &:hover { cursor: v-bind('cursorStyle'); diff --git a/src/views/chart/ContentEdit/components/EditTools/index.vue b/src/views/chart/ContentEdit/components/EditTools/index.vue index c92e578c..4537ce67 100644 --- a/src/views/chart/ContentEdit/components/EditTools/index.vue +++ b/src/views/chart/ContentEdit/components/EditTools/index.vue @@ -223,6 +223,7 @@ $asideBottom: 70px; @include go('chart-edit-tools') { @extend .go-background-filter; + z-index: 9; position: absolute; display: flex; justify-content: space-around; diff --git a/src/views/chart/ContentEdit/index.vue b/src/views/chart/ContentEdit/index.vue index d44393d4..f8d538fc 100644 --- a/src/views/chart/ContentEdit/index.vue +++ b/src/views/chart/ContentEdit/index.vue @@ -1,5 +1,4 @@