From 7b72a50e42ef69a384231f3d33e0f4e5012e6411 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Wed, 27 Mar 2024 14:26:34 +0900 Subject: [PATCH] =?UTF-8?q?onMounted=E3=81=8BonActivated=E3=81=AE=E3=81=A9?= =?UTF-8?q?=E3=81=A1=E3=82=89=E3=81=8B=E3=81=8C=E5=91=BC=E3=81=B0=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E6=99=82=E3=81=AB=E5=AE=9F=E8=A1=8C=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E3=82=B3=E3=83=B3=E3=83=9D=E3=83=BC=E3=82=B6=E3=83=96?= =?UTF-8?q?=E3=83=AB=E3=82=92=E5=AE=9A=E7=BE=A9=20(#1890)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * onMountedかonActivatedのどちらかが呼ばれた時に実行されるコンポーザブルを定義 * useOnRenderingにしてみた * 名称を変更 * 条件式が違ってただけだった * ニ通りの書き方で実装してみた * ややこしいので1つにした * 問題はここではなかったかも * 不要なの --- src/components/Sing/ScoreSequencer.vue | 3 -- src/components/Sing/SequencerPitch.vue | 55 ++++++-------------------- src/components/Sing/SingEditor.vue | 14 +------ src/composables/onMountOrActivate.ts | 51 ++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 59 deletions(-) create mode 100644 src/composables/onMountOrActivate.ts diff --git a/src/components/Sing/ScoreSequencer.vue b/src/components/Sing/ScoreSequencer.vue index 946549275f..78972613dc 100644 --- a/src/components/Sing/ScoreSequencer.vue +++ b/src/components/Sing/ScoreSequencer.vue @@ -138,7 +138,6 @@ marginRight: `${scrollBarWidth}px`, marginBottom: `${scrollBarWidth}px`, }" - :is-activated="isActivated" :offset-x="scrollX" :offset-y="scrollY" /> @@ -262,8 +261,6 @@ import { useShiftKey } from "@/composables/useModifierKey"; type PreviewMode = "ADD" | "MOVE" | "RESIZE_RIGHT" | "RESIZE_LEFT"; -defineProps<{ isActivated: boolean }>(); - // 直接イベントが来ているかどうか const isSelfEventTarget = (event: UIEvent) => { return event.target === event.currentTarget; diff --git a/src/components/Sing/SequencerPitch.vue b/src/components/Sing/SequencerPitch.vue index a28c72bc44..71cb64d3cf 100644 --- a/src/components/Sing/SequencerPitch.vue +++ b/src/components/Sing/SequencerPitch.vue @@ -3,13 +3,17 @@ diff --git a/src/components/Sing/SingEditor.vue b/src/components/Sing/SingEditor.vue index ac7b35267c..d7f0af5ae2 100644 --- a/src/components/Sing/SingEditor.vue +++ b/src/components/Sing/SingEditor.vue @@ -22,12 +22,12 @@ /> - +