diff --git a/packages/formEditor/components/Selection/selectElement.jsx b/packages/formEditor/components/Selection/selectElement.jsx index c73b403..5d8fc9c 100644 --- a/packages/formEditor/components/Selection/selectElement.jsx +++ b/packages/formEditor/components/Selection/selectElement.jsx @@ -277,7 +277,7 @@ export default { {...useAttrs()} class={[ ns.b(), - unref(isEditModel) && props.hasDrag && 'handle', + unref(isEditModel) && ER?.props?.dragMode === 'full' && props.hasDrag && 'handle', !isField && ns.e('borderless'), unref(isEditModel) && ns.e('editor'), unref(isEditModel) && Selected.value, @@ -288,6 +288,14 @@ export default { ref={elementRef} onClick={unref(isEditModel) && withModifiers(handleClick, ['stop'])} > {slots.default()} + { + ER?.props?.dragMode === 'icon' && + unref(isEditModel) && ( +
+ {props.hasDrag && ()} +
+ ) + } { unref(isEditModel) && (
diff --git a/packages/formEditor/index.vue b/packages/formEditor/index.vue index b2b3b93..6a25991 100644 --- a/packages/formEditor/index.vue +++ b/packages/formEditor/index.vue @@ -46,6 +46,11 @@ const props = defineProps(_.merge({ isShowI18n: { type: Boolean, default: true + }, + dragMode: { + type: String, + default: 'icon', + validator: (value) => ['full', 'icon'].includes(value) } }, defaultProps)) const layout = {