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

feat(on-response): 兼容 axios 直接返回 data 的情况 #348

Merged
merged 2 commits into from
Sep 11, 2021

Conversation

levy9527
Copy link
Contributor

Why

当项目中使用拦截器统一处理 repsone 时,this.$axios 返回的不一定是原始数据,此时组件的 dataPath/totalPath 失效,无法获取数据。

How

添加 onResponse 属性,优先使用它处理 this.$axios 返回的数据。

Test

image

Docs

yes

@auto-add-label auto-add-label bot added the enhancement New feature or request label Sep 11, 2021
@netlify
Copy link

netlify bot commented Sep 11, 2021

✔️ Deploy Preview for el-data-table ready!

🔨 Explore the source changes: c63b4d0

🔍 Inspect the deploy log: https://app.netlify.com/sites/el-data-table/deploys/613c17161a374c00074532e7

😎 Browse the preview: https://deploy-preview-348--el-data-table.netlify.app/

@levy9527 levy9527 merged commit ccca117 into dev Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant