From 2cdf6cb8e756e6135512ed29e986cb4fe8ad7b25 Mon Sep 17 00:00:00 2001 From: Liberty Date: Thu, 18 Jan 2024 10:42:50 +0800 Subject: [PATCH 1/4] feat: update package version to "1.3.0-beta.1" and enhance form editor layout --- package.json | 2 +- packages/formEditor/components/Panels/Canves/index.jsx | 5 ++--- packages/formEditor/index.vue | 5 ++++- packages/formEditor/preview.vue | 7 +++++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 7d5db5f..909dbba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "everright-formeditor", - "version": "1.2.3", + "version": "1.3.0-beta.1", "description": "🦮 Powerful lowcode|vue form editor,generator,designer,builder library. It provides an easy way to create custom forms. The project is extensible, easy to use and configure, and provides many commonly used form components and functions(vue可视化低代码表单设计器、表单编辑器、element-plus vant表单设计)", "files": [ "dist", diff --git a/packages/formEditor/components/Panels/Canves/index.jsx b/packages/formEditor/components/Panels/Canves/index.jsx index 0b5929a..97bb07e 100644 --- a/packages/formEditor/components/Panels/Canves/index.jsx +++ b/packages/formEditor/components/Panels/Canves/index.jsx @@ -17,7 +17,6 @@ export default defineComponent({ isEditModel, isPc } = hooks.useTarget() - const form = ref('') const handleClick = (e) => { setSelection('root') } @@ -27,12 +26,12 @@ export default defineComponent({ const Layout = () return (
- + { unref(isEditModel) ? Layout : Layout } - {!unref(isEditModel) && !_.isEmpty(state.config) && ER.props.isShowCompleteButton && } + {!unref(isEditModel) && !_.isEmpty(state.config) && ER.props.isShowCompleteButton && }
) } diff --git a/packages/formEditor/index.vue b/packages/formEditor/index.vue index 0bcafb8..9f3ebee 100644 --- a/packages/formEditor/index.vue +++ b/packages/formEditor/index.vue @@ -61,6 +61,7 @@ const layout = { pc: [], mobile: [] } +const form = ref('') const previewPlatform = ref('pc') const previewLoading = ref(true) const state = reactive({ @@ -391,6 +392,7 @@ const getData = () => { } const setData = props.layoutType === 1 ? setData1 : setData2 defineExpose({ + form, switchPlatform (platform) { switchPlatform(platform) }, @@ -461,7 +463,8 @@ provide('Everright', { addFieldData, canvesScrollRef, fireEvent, - getData + getData, + form })