From 63a7d0f870b03f8c4f8deed42ea649a2196c05f1 Mon Sep 17 00:00:00 2001 From: Afiq Date: Thu, 10 Apr 2025 18:31:17 +0800 Subject: [PATCH] Implement component resizing and grid optimization in Form Builder - Added functionality for resizing components within the Form Builder, allowing users to adjust widths dynamically. - Introduced a method to find optimal grid placement for new components, ensuring efficient use of available space. - Enhanced layout optimization after component addition, deletion, and reordering to maintain a clean and organized interface. - Updated the FormBuilderConfiguration to include width settings for components, improving customization options. - Refactored styles for grid layout and component previews to enhance visual consistency and user experience. --- components/ComponentPreview.vue | 19 +- components/FormBuilderCanvas.vue | 282 ++++++++++++++++++++---- components/FormBuilderComponents.vue | 13 +- components/FormBuilderConfiguration.vue | 100 +++++++++ pages/form-builder/index.vue | 33 ++- stores/formBuilder.js | 199 ++++++++++++++++- 6 files changed, 590 insertions(+), 56 deletions(-) diff --git a/components/ComponentPreview.vue b/components/ComponentPreview.vue index 786df1b..6eb46f1 100644 --- a/components/ComponentPreview.vue +++ b/components/ComponentPreview.vue @@ -1,5 +1,5 @@