Can java return the following fields?
为情所困
为情所困 2017-06-12 09:25:47
0
3
636

My front-end development will now use background data. I would like to ask if I can return the following fields, where require is a function, and it can be executed if I get it

permission: [
  {
    path: '/index',
    name: 'index',
    component: require('./../views/layout/index')  
  }
]
为情所困
为情所困

reply all(3)
刘奇

This is not a standard JSON data format.

Why not return:

permission: [
  {
    path: '/index',
    name: 'index',
    component: './../views/layout/index'
  }
]

Then require is processed based on the component field.

仅有的幸福

Change your thinking, it’s too forced

Ty80

Either process the data in the background and format it into json, or return the json data to the front desk for parsing and processing. The idea of ​​​​installing an operation in the data is indeed a bit difficult to understand. You must distinguish the data and operations and do not mix them together. Even if it works Yes, the coupling is too strong

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template