From 7e2e197c43e269df78fb7c4a2fc518b5c5346a12 Mon Sep 17 00:00:00 2001 From: haoziqaq <357229046@qq.com> Date: Tue, 20 Jun 2023 00:01:44 +0800 Subject: [PATCH] refactor: patch ext --- playground/src/request/index.ts | 2 +- src/index.ts | 4 ++-- src/use.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/playground/src/request/index.ts b/playground/src/request/index.ts index 5454f45..b4b5652 100644 --- a/playground/src/request/index.ts +++ b/playground/src/request/index.ts @@ -25,7 +25,7 @@ function dataFormatter(response) { return response.data.data } - if (['post', 'put', 'delete', 'patch']) { + if (['post', 'put', 'delete', 'patch'].includes(method)) { return response.data } } diff --git a/src/index.ts b/src/index.ts index fad2d25..ff9b194 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,2 @@ -export * from './instance' -export * from './use' \ No newline at end of file +export * from './instance.js' +export * from './use.js' \ No newline at end of file diff --git a/src/use.ts b/src/use.ts index fea5caa..1595588 100644 --- a/src/use.ts +++ b/src/use.ts @@ -1,5 +1,5 @@ import { ref, type Ref, type UnwrapRef } from 'vue' -import { type AxleRequestConfig, createFetchHelper, createModifyHelper } from './instance' +import { type AxleRequestConfig, createFetchHelper, createModifyHelper } from './instance.js' // default options export interface CreateUseAxleOptions {