feat: init project
This commit is contained in:
26
server/routes/menu/index.ts
Normal file
26
server/routes/menu/index.ts
Normal file
@ -0,0 +1,26 @@
|
||||
export default defineEventHandler((event) => {
|
||||
const page = 1
|
||||
const pageSize = 10
|
||||
|
||||
const dataList: Record<string, any>[] = []
|
||||
// 根据分页计算数据
|
||||
for (let i = 0; i < pageSize; i++) {
|
||||
dataList.push({
|
||||
id: i + (page - 1) * pageSize,
|
||||
pid: null,
|
||||
path: '/dashboard',
|
||||
redirect: '/dashboard/analysis',
|
||||
name: `Dashboard` + `_${i + 1}`,
|
||||
icon: 'AppstoreOutlined',
|
||||
title: 'pages.dashboard.title',
|
||||
component: 'RouteView',
|
||||
})
|
||||
}
|
||||
return {
|
||||
code: 200,
|
||||
data: {
|
||||
data: dataList,
|
||||
total: 200,
|
||||
},
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user