From c72f11cc5beb78613d055345624e122231b2f574 Mon Sep 17 00:00:00 2001 From: lizw-2015 <1183409807@qq.com> Date: Thu, 5 Jun 2025 18:18:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat(runtime):=20=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=85=A8=E5=B1=80=E9=85=8D=E7=BD=AE=E5=B9=B6=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20DataForm=20=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 main.ts 中添加 initGlobalConfig 和 initGlobalConfigWithRuntime 初始化函数 - 在 DataForm01.vue 中注册 DataForm 组件并创建测试按钮 - 实现了将 reactive 数据转换为普通对象并传递给对话框的功能 --- src/main.ts | 5 ++ src/pages/DataForm01.vue | 159 +++++++++++++++++++++++++++++------------------ 2 files changed, 105 insertions(+), 59 deletions(-) diff --git a/src/main.ts b/src/main.ts index 4710dc8..b60708d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,6 +6,8 @@ import router from './router' import * as webIndex from '@/components/webindex' import { directive, menusEvent, Vue3Menus } from 'vue3-menus' import ElementPlus from 'element-plus' +import { initGlobalConfig } from "@ease-forge/shared"; +import { initGlobalConfigWithRuntime } from "@ease-forge/runtime"; import System from '@/runtime/System' import 'ag-grid-community/styles/ag-grid.css' @@ -13,6 +15,9 @@ import 'ag-grid-community/styles/ag-theme-alpine.css' import 'element-plus/dist/index.css' import './main.less' +initGlobalConfig(); +initGlobalConfigWithRuntime(); + const app = createApp(App) app.use(createPinia()) diff --git a/src/pages/DataForm01.vue b/src/pages/DataForm01.vue index 1160450..a515fe8 100644 --- a/src/pages/DataForm01.vue +++ b/src/pages/DataForm01.vue @@ -1,64 +1,68 @@ + + 测试 + - {{ JSON.stringify(dataForm1.data, null, 4) }} + + {{ JSON.stringify(data, null, 4) }} From 51c2b39277d53be7fed27d637e9bc3998b13ae86 Mon Sep 17 00:00:00 2001 From: lizw-2015 <1183409807@qq.com> Date: Thu, 5 Jun 2025 18:21:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?refactor(components):=20=E7=AE=80=E5=8C=96?= =?UTF-8?q?=20ShowDialogWrap=20=E7=BB=84=E4=BB=B6=E7=9A=84=20onOkHandle=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了对子组件 okClick 方法的复杂调用逻辑 - 直接调用 onOk 方法并传入 null 作为参数 - 这种简化使代码更加清晰,并且减少了潜在的错误和复杂性 --- src/components/ShowDialogWrap.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/components/ShowDialogWrap.vue b/src/components/ShowDialogWrap.vue index 509352e..f2241dc 100644 --- a/src/components/ShowDialogWrap.vue +++ b/src/components/ShowDialogWrap.vue @@ -25,7 +25,6 @@
{{ JSON.stringify(dataForm1.data, null, 4) }}
{{ JSON.stringify(data, null, 4) }}