Skip to content

Commit

Permalink
chore: pnpm bump
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Dec 17, 2023
1 parent 265e2af commit 7f6c672
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 42 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"*.{vue,ts,tsx,js,jsx}": "pnpm lint"
},
"dependencies": {
"@varlet/axle": "0.2.16",
"@varlet/touch-emulator": "^2.20.0",
"@varlet/ui": "^2.20.0",
"@varlet/use": "^2.20.0",
"@varlet/axle": "^0.3.1",
"@varlet/touch-emulator": "^2.20.2",
"@varlet/ui": "^2.20.2",
"@varlet/use": "^2.20.2",
"dayjs": "^1.11.8",
"pinia": "^2.1.3",
"vue": "^3.3.4",
Expand Down
77 changes: 43 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src/request/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { createUseAxle } from '@varlet/axle/use'

const axle = createAxle()

axle.axios.interceptors.response.use(
(response) => {
axle.useResponseInterceptor({
onFulfilled(response) {
const { code, message } = response.data

if (code !== 200 && message) {
Expand All @@ -14,11 +14,12 @@ axle.axios.interceptors.response.use(

return response.data
},
(error) => {

onRejected(error) {
Snackbar.error(error.message)
return Promise.reject(error)
}
)
})

const useAxle = createUseAxle({
axle,
Expand Down

0 comments on commit 7f6c672

Please sign in to comment.