diff --git a/components/BlogShow.vue b/components/BlogShow.vue index 3ae9479..a63036d 100644 --- a/components/BlogShow.vue +++ b/components/BlogShow.vue @@ -117,10 +117,12 @@ const blogDirPathExtend = computed(() => { return temp?.join('/') || ''; }); -const blogName = computed(() => { - const temp = props.blogPath?.split('/'); - return temp?.pop() || ''; -}); +const blogName = ref( + (() => { + const temp = props.blogPath?.split('/'); + return temp?.pop() || ''; + })(), +); const commitConfig = ref({ message: '', mode: '100644', diff --git a/server/api/github/commit/index.post.ts b/server/api/github/commit/index.post.ts index 96abe6b..1865657 100644 --- a/server/api/github/commit/index.post.ts +++ b/server/api/github/commit/index.post.ts @@ -59,7 +59,6 @@ export default defineEventHandler((event) => { createBlobsConfig: createBlobsConfig, }, })) as RepoCreateBlobs['response']['data']; - console.log(createBlobs); // 4. 生成 tree const createTreeConfig = { @@ -114,8 +113,6 @@ export default defineEventHandler((event) => { })) as RepoUpdateRef['response']['data']; resolve(updateRef); } catch (error) { - console.log(error); - resolve(error); } });