Question Mark:

A array:

  {
    name: 'activityRelatedManager',
    meta: {
      title: 'Activity Related Manager',
      permissions: []
    },
    children: [
      {
        name: 'activityPublish',
        meta: { title: 'Publish Activity', permissions:[] }
      },
      {
        name: 'activityManager',
        meta: { title: 'Manage Activity', permissions:[] }
      },
      {
        name: 'activityTypeManager',
        meta: { title: ' Manage Activity Type', permissions:[] }
      },
      {
        name: 'activityLocationManager',
        meta: { title: ' Manage Activity Location', permissions:[] }
      }
    ]
  },

B array:

[
    {
      "id": 1,
      "name": "activityRelatedManager",
      "permissions": [
        "activity:publish"
      ]
    },
    {
      "id": 2,
      "name": "activityManager",
      "permissions": [
        "activity:index",
        "activity:show"
      ]
    },
    {
      "id": 3,
      "name": "activityTypeManager",
      "permissions": []
    }
]

result:

 {
    name: 'activityRelatedManager',
    meta: {
      title: 'Activity Related Manager',
      permissions: ["activity:publish"]
    },
    children: [
      {
        name: 'activityManager',
        meta: { title: 'Manage Activity', permissions:["activity:index", "activity:show"] }
      },
      {
        name: 'activityTypeManager',
        meta: { title: ' Manage Activity Type', permissions:[] }
      }
    ]
  },

本文链接:

https://7float.com/index.php/archives/13/
1 + 1 =
快来做第一个评论的人吧~