Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

チャンネルリンクをdraggable='false'に #4277

Merged
merged 2 commits into from
May 10, 2024

Conversation

mehm8128
Copy link
Member

@mehm8128 mehm8128 commented May 8, 2024

遷移時にクリックミスるとドラッグしてしまうのが嫌なので
router-linkにそのままdraggable='false'がつけられなかったので、aタグを自分で定義していい感じにしてます
参考にしたリンク: https://router.vuejs.org/guide/advanced/extending-router-link

@mehm8128 mehm8128 requested review from ras0q and nokhnaton May 8, 2024 12:57
@mehm8128 mehm8128 self-assigned this May 8, 2024
Copy link

github-actions bot commented May 8, 2024

@@ -20,26 +20,34 @@
@mouseleave="onHashHoveredLeave"
/>
<router-link
v-slot="{ href, navigate }"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

全然わかってないんですけどここにはhasChildrenisSelectedは必要ないんですか?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

僕もあんまり分かってないですが多分ここらへんの話です
https://ja.vuejs.org/guide/components/slots#scoped-slots

router-link側で定義されたのをここに書くことによって、hrefやnavigateを使うことができるようになるので、自分で定義してるhasChildrenやisSelectedは書かなくていいと思います

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あーそういうことか、理解しました:+1:

@mehm8128 mehm8128 requested a review from ras0q May 9, 2024 11:28
Copy link
Member

@ras0q ras0q left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よさそうです!

@mehm8128 mehm8128 merged commit b0dd54a into master May 10, 2024
9 checks passed
@mehm8128 mehm8128 deleted the fix/channel_not_draggable branch May 10, 2024 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants