Mockjs simulates a custom array

when using mockjs to simulate an array of objects, you need to do this:

  1. the first object of the array is artificially controlled;
  2. The other object of the
  3. array is randomly generated.

but mock is the last Mock.mock (url, template) when rendering tempalte,
so I don"t know what to do

Aug.08,2021

[{a:1}, ...Mock.mock({
    'data|1-10': [{
        p: '@string'
    }]
}).data]
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb4121-48289.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb4121-48289.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?