From e2d7632e9c840ecce5575f12f14282ed1d44d2ec Mon Sep 17 00:00:00 2001 From: xream Date: Sat, 13 Jan 2024 19:56:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- src/api/artifacts/index.ts | 8 ++++---- src/components/ArtifactsListItem.vue | 11 +++++++++-- src/store/artifacts.ts | 8 ++++---- src/views/Sync.vue | 9 ++++++++- 5 files changed, 27 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 8f9baa694..1f5bb2429 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sub-store-front-end", - "version": "2.14.45", + "version": "2.14.46", "private": true, "scripts": { "dev": "vite --host", @@ -61,4 +61,4 @@ "vue-tsc": "^0.35.2", "workbox-window": "^7.0.0" } -} +} \ No newline at end of file diff --git a/src/api/artifacts/index.ts b/src/api/artifacts/index.ts index f1cf624f4..571186390 100644 --- a/src/api/artifacts/index.ts +++ b/src/api/artifacts/index.ts @@ -15,10 +15,10 @@ export function useArtifactsApi() { method: 'get', }); }, - syncOneArtifact: (name: string): AxiosPromise => { + syncOneArtifact: (name: string, method = 'get'): AxiosPromise => { return request({ url: `/api/sync/artifact/${encodeURIComponent(name)}`, - method: 'get', + method, }); }, createArtifact: (data: Artifact): AxiosPromise => { @@ -41,10 +41,10 @@ export function useArtifactsApi() { method: 'delete', }); }, - syncAllArtifact: (): AxiosPromise => { + syncAllArtifact: (method = 'get'): AxiosPromise => { return request({ url: '/api/sync/artifacts', - method: 'get', + method, }); }, }; diff --git a/src/components/ArtifactsListItem.vue b/src/components/ArtifactsListItem.vue index a13f39769..a0c957ea7 100644 --- a/src/components/ArtifactsListItem.vue +++ b/src/components/ArtifactsListItem.vue @@ -88,6 +88,7 @@