From 7fac78c30ab8591721acfea28077734e077365d9 Mon Sep 17 00:00:00 2001 From: ansgoo Date: Sun, 10 Sep 2023 16:04:25 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E4=BA=86N-Layout?= =?UTF-8?q?=E7=B3=BB=E5=88=97=E7=BB=84=E4=BB=B6=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/rest/Pane.vue | 8 +- src/data/rest/RestDataView.vue | 46 +++------ src/data/websocket/WebsocketView.vue | 45 ++------- src/designer/Pane/Toolbar/Toolbar.vue | 2 +- src/designer/modules/backItem/BackItem.vue | 10 +- .../modules/ruler/sketch-ruler/Index.vue | 2 +- src/designer/pages/designer/Canvas.vue | 93 ++++++++++--------- src/designer/pages/designer/Designer.vue | 86 +++++++---------- src/ui/index.ts | 36 +------ 9 files changed, 114 insertions(+), 214 deletions(-) diff --git a/src/data/rest/Pane.vue b/src/data/rest/Pane.vue index cd365a7e..119833c1 100644 --- a/src/data/rest/Pane.vue +++ b/src/data/rest/Pane.vue @@ -3,7 +3,7 @@ @@ -145,9 +145,3 @@ watch( { immediate: true } ) - - diff --git a/src/data/rest/RestDataView.vue b/src/data/rest/RestDataView.vue index 54ca5847..33ef3a4e 100644 --- a/src/data/rest/RestDataView.vue +++ b/src/data/rest/RestDataView.vue @@ -3,20 +3,23 @@
-
- - - +
+
+ +
+
+ +
+
调试 - +
@@ -70,7 +73,6 @@ import { ODivider, OInput, OSelect, - OSpace, OTabPane, OTabs } from 'open-data-v/ui' @@ -173,26 +175,6 @@ const formChange = () => { diff --git a/src/designer/Pane/Toolbar/Toolbar.vue b/src/designer/Pane/Toolbar/Toolbar.vue index 86aa5345..223b4bf7 100644 --- a/src/designer/Pane/Toolbar/Toolbar.vue +++ b/src/designer/Pane/Toolbar/Toolbar.vue @@ -1,5 +1,5 @@ diff --git a/src/designer/modules/backItem/BackItem.vue b/src/designer/modules/backItem/BackItem.vue index edfb5ae9..205df258 100644 --- a/src/designer/modules/backItem/BackItem.vue +++ b/src/designer/modules/backItem/BackItem.vue @@ -1,6 +1,6 @@ - - diff --git a/src/designer/modules/ruler/sketch-ruler/Index.vue b/src/designer/modules/ruler/sketch-ruler/Index.vue index 93684683..c2712ba3 100644 --- a/src/designer/modules/ruler/sketch-ruler/Index.vue +++ b/src/designer/modules/ruler/sketch-ruler/Index.vue @@ -143,7 +143,7 @@ const paletteCpu = computed(() => { diff --git a/src/designer/pages/designer/Designer.vue b/src/designer/pages/designer/Designer.vue index 26fdb18e..cc50cefa 100644 --- a/src/designer/pages/designer/Designer.vue +++ b/src/designer/pages/designer/Designer.vue @@ -1,21 +1,10 @@ - - diff --git a/src/ui/index.ts b/src/ui/index.ts index 9c6df58a..01c7dcf1 100644 --- a/src/ui/index.ts +++ b/src/ui/index.ts @@ -8,26 +8,18 @@ import { NDescriptions, NDescriptionsItem, NDivider, - NEl, NEmpty, NForm, NFormItem, NInput, NInputGroup, NInputNumber, - NLayout, - NLayoutContent, - NLayoutFooter, - NLayoutHeader, - NLayoutSider, NMenu, NModal, NRadio, NRadioGroup, - NScrollbar, NSelect, NSlider, - NSpace, NSpin, NSwitch, NTabPane, @@ -47,15 +39,6 @@ const ODescriptions = NDescriptions const ODescriptionsItem = NDescriptionsItem const OEmpty = NEmpty const OMenu = NMenu -const OEl = NEl -const OLayout = NLayout -const OLayoutContent = NLayoutContent -const OLayoutFooter = NLayoutFooter -const OScrollbar = NScrollbar -const OSlider = NSlider -const OSpace = NSpace -const OLayoutHeader = NLayoutHeader -const OLayoutSider = NLayoutSider const OForm = NForm const OFormItem = NFormItem const OColorPicker = NColorPicker @@ -75,6 +58,8 @@ const ODivider = NDivider const OSpin = NSpin const OTooltip = NTooltip const OButtonGroup = NButtonGroup + +const OSlider = NSlider export default { OInput: OInput, OSelect: NSelect, @@ -84,15 +69,6 @@ export default { ODescriptionsItem: NDescriptionsItem, OEmpty: NEmpty, OMenu: NMenu, - OEl: NEl, - OLayout: NLayout, - OLayoutContent: NLayoutContent, - OLayoutFooter: NLayoutFooter, - OScrollbar: NScrollbar, - OSlider: NSlider, - OSpace: NSpace, - OLayoutHeader: NLayoutHeader, - OLayoutSider: NLayoutSider, OForm: NForm, OFormItem: NFormItem, OColorPicker: NColorPicker, @@ -126,26 +102,18 @@ export { ODescriptions, ODescriptionsItem, ODivider, - OEl, OEmpty, OForm, OFormItem, OInput, OInputGroup, OInputNumber, - OLayout, - OLayoutContent, - OLayoutFooter, - OLayoutHeader, - OLayoutSider, OMenu, OModal, ORadio, ORadioGroup, - OScrollbar, OSelect, OSlider, - OSpace, OSpin, OSwitch, OTabPane, From 28f8d1c9e77356386b02916fa7c95758ae4f70ee Mon Sep 17 00:00:00 2001 From: ansgoo Date: Sun, 10 Sep 2023 17:24:24 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E6=BB=9A=E8=BD=AE=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/designer/Pane/{Toolbar => Toolsbar}/Toolbar.vue | 0 src/designer/Pane/{Toolbar => Toolsbar}/index.ts | 0 src/designer/index.ts | 10 ++++++++++ src/designer/pages/designer/Canvas.vue | 4 ++-- src/designer/pages/designer/Designer.vue | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) rename src/designer/Pane/{Toolbar => Toolsbar}/Toolbar.vue (100%) rename src/designer/Pane/{Toolbar => Toolsbar}/index.ts (100%) diff --git a/src/designer/Pane/Toolbar/Toolbar.vue b/src/designer/Pane/Toolsbar/Toolbar.vue similarity index 100% rename from src/designer/Pane/Toolbar/Toolbar.vue rename to src/designer/Pane/Toolsbar/Toolbar.vue diff --git a/src/designer/Pane/Toolbar/index.ts b/src/designer/Pane/Toolsbar/index.ts similarity index 100% rename from src/designer/Pane/Toolbar/index.ts rename to src/designer/Pane/Toolsbar/index.ts diff --git a/src/designer/index.ts b/src/designer/index.ts index f1d2798a..18274d0f 100644 --- a/src/designer/index.ts +++ b/src/designer/index.ts @@ -2,13 +2,18 @@ import type { ToolBarItemType } from './components' import { CodeEditor, Group, ToolBar, ToolBarItem, XIcon } from './components' import DemoDataPlugin from './data/DemoData' import type { StoreComponentData } from './db' +import Editor from './Editor' import Shape from './Editor/Shape' import { ComponentGroupList, DataMode, EditMode, GroupType, PixelEnum } from './enum' import useComponentPlugin from './loadPlugin' import useEmpty from './modules/Empty' import Container from './modules/form/Container' +import Canvas from './pages/designer/Canvas.vue' import Designer from './pages/designer/Designer.vue' import Previewer from './pages/perviewer/viewer.vue' +import LeftSideBar from './Pane/LeftSideBar' +import RightSideBar from './Pane/RightSideBar' +import ToolsBar from './Pane/Toolsbar' import Directive from './plugins/directive' import type { ContextmenuItem } from './plugins/directive/contextmenu' import { @@ -35,6 +40,7 @@ import type { import { createComponent, handleLogger } from './utils' export { + Canvas, CodeEditor, ComponentGroupList, Container, @@ -45,18 +51,22 @@ export { Designer, Directive, EditMode, + Editor, exportCanvas, Group, GroupType, handleLogger, importCanvas, + LeftSideBar, PixelEnum, Previewer, recoveryDraft, + RightSideBar, setShowEm, Shape, ToolBar, ToolBarItem, + ToolsBar, undo, useActionState, useCanvasState, diff --git a/src/designer/pages/designer/Canvas.vue b/src/designer/pages/designer/Canvas.vue index 45d39b32..decb0b4e 100644 --- a/src/designer/pages/designer/Canvas.vue +++ b/src/designer/pages/designer/Canvas.vue @@ -117,11 +117,11 @@ function setScaleByWheel(e: WheelEvent) { } onMounted(() => { - centerCanvas.value?.$el?.addEventListener('wheel', setScaleByWheel, false) + centerCanvas.value?.addEventListener('wheel', setScaleByWheel, false) }) onBeforeUnmount(() => { - centerCanvas.value?.$el?.removeEventListener('wheel', setScaleByWheel, false) + centerCanvas.value?.removeEventListener('wheel', setScaleByWheel, false) }) diff --git a/src/designer/pages/designer/Designer.vue b/src/designer/pages/designer/Designer.vue index cc50cefa..8a4a94c9 100644 --- a/src/designer/pages/designer/Designer.vue +++ b/src/designer/pages/designer/Designer.vue @@ -37,7 +37,7 @@ import { onUnmounted, provide, readonly, ref } from 'vue' import type { LayoutData } from '../../../designer/state/type' import LeftSideBar from '../../Pane/LeftSideBar' import RightSideBar from '../../Pane/RightSideBar' -import ToolBar from '../../Pane/Toolbar' +import ToolBar from '../../Pane/Toolsbar' import Canvas from './Canvas.vue' withDefaults( From a26efcee1fed94486d251e09f08c40dee14476d0 Mon Sep 17 00:00:00 2001 From: ansgoo Date: Sun, 10 Sep 2023 17:31:05 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E5=BA=95=E9=83=A8=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=A0=8F=E5=BC=82=E5=B8=B8=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/App.vue | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/examples/App.vue b/examples/App.vue index 9006d45a..bdf8f11c 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -2,32 +2,21 @@ // This starter template is using Vue 3