From 28a6fe68f53a84224d049cdc7291b078bfb70ddc Mon Sep 17 00:00:00 2001 From: wewewe-ok Date: Sun, 7 Apr 2024 00:03:07 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20ref=E3=82=92=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=82=82=E5=8B=95=E3=81=84=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/App.vue | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/components/App.vue b/src/components/App.vue index 567e81ad8c..b45b294863 100644 --- a/src/components/App.vue +++ b/src/components/App.vue @@ -29,12 +29,6 @@ const store = useStore(); const openedEditor = computed(() => store.state.openedEditor); -/** - * 読み込むプロジェクトファイルのパス。 - * undefinedのときは何も読み込むべきものがない。 - */ -const projectFilePath = ref(undefined); - // Google Tag Manager const gtm = useGtm(); watch( @@ -76,9 +70,6 @@ onMounted(async () => { // プロジェクトファイルのパスを取得 const _projectFilePath = urlParams.get("projectFilePath"); - if (_projectFilePath != undefined && _projectFilePath !== "") { - projectFilePath.value = _projectFilePath; - } // どちらのエディタを開くか設定 await store.dispatch("SET_OPENED_EDITOR", { editor: "talk" }); @@ -129,12 +120,9 @@ onMounted(async () => { }); // プロジェクトファイルが指定されていればロード - if ( - typeof projectFilePath.value === "string" && - projectFilePath.value !== "" - ) { + if (typeof _projectFilePath === "string" && _projectFilePath !== "") { isProjectFileLoaded.value = await store.dispatch("LOAD_PROJECT_FILE", { - filePath: projectFilePath.value, + filePath: _projectFilePath, }); } else { isProjectFileLoaded.value = false; From 144bb45c01662e55b8104a732a1ea8f843ed9206 Mon Sep 17 00:00:00 2001 From: wewewe-ok Date: Sun, 7 Apr 2024 00:15:02 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=5F=E7=89=B9=E3=81=AB=E6=84=8F?= =?UTF-8?q?=E5=91=B3=E3=81=8C=E3=81=AA=E3=81=95=E3=81=9D=E3=81=86=E3=81=AA?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/App.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/App.vue b/src/components/App.vue index b45b294863..59b8af0f73 100644 --- a/src/components/App.vue +++ b/src/components/App.vue @@ -69,7 +69,7 @@ onMounted(async () => { await store.dispatch("INIT_VUEX"); // プロジェクトファイルのパスを取得 - const _projectFilePath = urlParams.get("projectFilePath"); + const projectFilePath = urlParams.get("projectFilePath"); // どちらのエディタを開くか設定 await store.dispatch("SET_OPENED_EDITOR", { editor: "talk" }); @@ -120,9 +120,9 @@ onMounted(async () => { }); // プロジェクトファイルが指定されていればロード - if (typeof _projectFilePath === "string" && _projectFilePath !== "") { + if (typeof projectFilePath === "string" && projectFilePath !== "") { isProjectFileLoaded.value = await store.dispatch("LOAD_PROJECT_FILE", { - filePath: _projectFilePath, + filePath: projectFilePath, }); } else { isProjectFileLoaded.value = false;