echarts.ts 465 B

1234567891011121314151617181920212223
  1. import { MockMethod } from 'vite-plugin-mock'
  2. // http://mockjs.com/examples.html#Object
  3. const echartsList = (): any => {
  4. const result: any[] = []
  5. for (let index = 0; index < 200; index++) {
  6. result.push(['@date', Math.floor(Math.random() * 300)])
  7. }
  8. return result
  9. }
  10. export default [
  11. {
  12. url: '/getEchartsInfo',
  13. method: 'get',
  14. response: () => {
  15. return {
  16. code: 0,
  17. info: echartsList()
  18. }
  19. },
  20. }
  21. ] as MockMethod[]