Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

服务端菜单生成需要返回什么样的数据结构回来 #364

Open
ploetiure opened this issue Feb 3, 2024 · 1 comment
Open

Comments

@ploetiure
Copy link

开发者你好:
我是一个后端java开发者,我在Arco Design 文档 中看到关于【路由和菜单】的文档中提到【服务端菜单生成】的方法描述的不够详细,没有提到服务端需要返回的数据格式,和对应的案例。另外对于这部分的内容对我产生了误导
image
工程创建好后代已经写好了不用再添加,我发现而是需要在src/config/settings.json文件中将menuFromServer的值改为true,就会从服务端获取菜单。
请求服务端菜单后的代码发现是将服务端返回的菜单列表用vue-router中的RouteRecordNormalized结构数组接收,是否能够给一个对请求服务端菜单响应数据的详细说明,并且给一个案例,由于vue-router配置中有例如component等参数,这个从后端返回的内容应是什么格式。以及component:后面是什么格式,路径填写的格式是什么。
感谢!

@tongxin2013
Copy link

参考mock/user.ts文件中的返回样例(/api/user/menu)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants