From e8461f91e62031f87dbc976f41e873f2bcc3c00c Mon Sep 17 00:00:00 2001 From: roymondchen Date: Fri, 17 Jan 2025 19:49:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(editor):=20=E5=B7=B2=E7=BB=8F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BA=86=E7=9A=84=E6=A0=B7=E5=BC=8F=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/src/fields/StyleSetter/Index.vue | 5 +- .../src/fields/StyleSetter/pro/Layout.vue | 58 ++++++++++++------- .../src/fields/StyleSetter/pro/Position.vue | 51 ++++++++++++++-- .../src/layouts/props-panel/PropsPanel.vue | 9 ++- .../editor/src/theme/style-setter/layout.scss | 2 +- 5 files changed, 97 insertions(+), 28 deletions(-) diff --git a/packages/editor/src/fields/StyleSetter/Index.vue b/packages/editor/src/fields/StyleSetter/Index.vue index 6ccbf25f5..db037e843 100644 --- a/packages/editor/src/fields/StyleSetter/Index.vue +++ b/packages/editor/src/fields/StyleSetter/Index.vue @@ -27,7 +27,7 @@ defineOptions({ name: 'MFieldsStyleSetter', }); -defineProps>(); +const props = defineProps>(); const emit = defineEmits<{ change: [v: any, eventData: ContainerChangeEventData]; @@ -64,6 +64,9 @@ const collapseValue = shallowRef( ); const change = (v: any, eventData: ContainerChangeEventData) => { + eventData.changeRecords?.forEach((record) => { + record.propPath = `${props.name}.${record.propPath}`; + }); emit('change', v, eventData); }; diff --git a/packages/editor/src/fields/StyleSetter/pro/Layout.vue b/packages/editor/src/fields/StyleSetter/pro/Layout.vue index b01f9e99e..6e7ad81c1 100644 --- a/packages/editor/src/fields/StyleSetter/pro/Layout.vue +++ b/packages/editor/src/fields/StyleSetter/pro/Layout.vue @@ -1,6 +1,6 @@