From dab54ed457e5fad5bae1c501c30bbfd39d0ac27b Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Tue, 1 Jun 2021 13:29:59 +0800 Subject: [PATCH] fix: layout slot bug --- package.json | 6 +- .../container-component/layout/index.tsx | 10 +- .../components/common/simulator.vue | 8 +- yarn.lock | 121 +++++------------- 4 files changed, 41 insertions(+), 104 deletions(-) diff --git a/package.json b/package.json index 6dfa899..3a41c99 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "nprogress": "^1.0.0-1", "qrcode": "^1.4.4", "vant": "^3.0.17", - "vue": "3.1.0-beta.6", + "vue": "3.0.11", "vue-router": "^4.0.8", "vuedraggable": "^4.0.1", "vuex": "^4.0.1" @@ -47,7 +47,7 @@ "@vitejs/plugin-legacy": "^1.4.0", "@vitejs/plugin-vue": "^1.2.2", "@vitejs/plugin-vue-jsx": "^1.1.4", - "@vue/compiler-sfc": "3.1.0-beta.6", + "@vue/compiler-sfc": "3.0.11", "commitizen": "^4.2.4", "cz-conventional-changelog": "^3.3.0", "cz-customizable": "^6.3.0", @@ -67,7 +67,7 @@ "stylelint-config-standard": "^22.0.0", "stylelint-order": "^4.1.0", "typescript": "^4.3.2", - "vite": "2.3.4", + "vite": "2.3.5", "vite-plugin-components": "^0.10.4", "vite-plugin-style-import": "^0.10.1", "vite-plugin-windicss": "^0.16.7", diff --git a/src/packages/container-component/layout/index.tsx b/src/packages/container-component/layout/index.tsx index a693faf..01b69da 100644 --- a/src/packages/container-component/layout/index.tsx +++ b/src/packages/container-component/layout/index.tsx @@ -50,7 +50,7 @@ export default { }) } - const Layout = () => ( + return ( registerRef(el, block._vid)} {...custom} @@ -66,15 +66,13 @@ export default { .map((spanItem: SlotItem, spanIndex) => { slotsTemp[block._vid][`slot${spanIndex}`] = spanItem return ( - - {renderSlot(slots, `slot${spanIndex}`, {}, () => [`slot${spanIndex}`])} - + <> + {renderSlot(slots, `slot${spanIndex}`)} + ) })} ) - - return }, resize: { height: true, diff --git a/src/visual-editor/components/common/simulator.vue b/src/visual-editor/components/common/simulator.vue index 374ac70..0bcb82f 100644 --- a/src/visual-editor/components/common/simulator.vue +++ b/src/visual-editor/components/common/simulator.vue @@ -15,10 +15,10 @@ export default defineComponent({