mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
feat: add echarts
This commit is contained in:
23
mock/echarts.ts
Normal file
23
mock/echarts.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
|
||||
// http://mockjs.com/examples.html#Object
|
||||
const echartsList = (): any => {
|
||||
const result: any[] = []
|
||||
for (let index = 0; index < 200; index++) {
|
||||
result.push(['@date', Math.floor(Math.random() * 300)])
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
export default [
|
||||
{
|
||||
url: '/getEchartsInfo',
|
||||
method: 'get',
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
info: echartsList()
|
||||
}
|
||||
},
|
||||
}
|
||||
] as MockMethod[]
|
||||
Reference in New Issue
Block a user