-
Notifications
You must be signed in to change notification settings - Fork 93
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
不支持restful形式的api结构 #4
Comments
另外也不支持, /admin-api/api-permission/:id 这种写法, 匹配不到 :id |
只能先写死了, 不会排查.. 我之前看vue-router好像有个什么库, 专门处理这种路径匹配的 {
url: '/admin-api/api-permission/0',
timeout: 1000,
method: 'delete',
response: () => {
return resultSuccess({});
},
}, |
会支持 |
我刚好准备提交一个pull request |
|
试试v2.2.1 |
2.2.2 |
yezir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
不支持restful形式的api结构, 如果mock模拟数据按以下restful api结构书写, 永远只会返回第一个
版本
最新版本
解决方法
https://github.com/anncwb/vite-plugin-mock/blob/bee76e432663c7bd6968fe0670dfa0eb8ab0946a/src/createMockServer.ts#L61
在这里需要加个method判断
我不确定是我调用的方式不对, 还是程序判断不准确
The text was updated successfully, but these errors were encountered: