gridstack / gridstack.js

Build interactive dashboards in minutes.
https://gridstackjs.com
MIT License
6.38k stars 1.27k forks source link

Request for Best Practice: Nested GridStack Implementation with Vue 3 #2640

Open baiyonghong1989 opened 4 months ago

baiyonghong1989 commented 4 months ago

Subject of the issue

there is a need for a best practice guideline for implementing a nested GridStack layout with Vue 3.

Your environment

Steps to reproduce

i have a data like this:

const demoData = [
  {
    id: "22",
    x: "3",
    y: "3",
    w: 2,
    h: 2,
    widgetData: {
      type: "BusinessComponentA",
    },
  },
  {
    id: "11",
    x: "0",
    y: "0",
    w: 2,
    h: 2,
    children: [
      {
        x: "3",
        y: "3",
        w: 2,
        h: 2,
        widgetData: {
          type: "BusinessComponentB",
        },
      },
    ],
  },
];

based on the data,Expected Rendering Result:

Expected behavior

how show i organize the code,tks