Repository navigation
✨ feat: 增加复制歌词功能 - #610
✨ feat: 增加复制歌词功能#610
Conversation
Summary of ChangesHello @kazukokawagawa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求引入了一个全新的歌词复制功能,使用户能够方便地选择、过滤并复制当前播放歌曲的歌词。通过在歌词菜单中添加一个直观的复制按钮,用户可以打开一个模态框,在该模态框中,他们可以精确控制要复制的歌词内容,包括选择特定行以及决定是否包含原词、翻译或音译。这极大地提升了用户与歌词互动的灵活性和便利性。 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
|
||
| const displayLyrics = computed(() => { | ||
| return rawLyrics.value.map((line, index) => { | ||
| const text = line.words?.map((w) => w.word).join("") || ""; |
|
|
||
| <n-scrollbar class="lyrics-list"> | ||
| <n-checkbox-group v-model:value="selectedLines"> | ||
| <div v-for="(line, index) in displayLyrics" :key="index" class="lyric-item"> |
| export const openCopyLyrics = () => { | ||
| window.$modal.create({ | ||
| preset: "card", | ||
| transformOrigin: "center", | ||
| autoFocus: false, | ||
| style: { width: "500px" }, | ||
| title: "复制歌词", | ||
| content: () => { | ||
| return h(CopyLyrics, { | ||
| onClose: () => window.$modal.destroyAll(), | ||
| }); | ||
| }, | ||
| }); | ||
| }; |
There was a problem hiding this comment.
onClose 回调中使用了 window.$modal.destroyAll(),这会关闭所有当前打开的模态框,可能会导致意外行为。建议只关闭当前的模态框。可以像此文件中的其他 open... 函数一样,获取 create 方法返回的 modal 实例,然后在 onClose 中调用 modal.destroy()。
| export const openCopyLyrics = () => { | |
| window.$modal.create({ | |
| preset: "card", | |
| transformOrigin: "center", | |
| autoFocus: false, | |
| style: { width: "500px" }, | |
| title: "复制歌词", | |
| content: () => { | |
| return h(CopyLyrics, { | |
| onClose: () => window.$modal.destroyAll(), | |
| }); | |
| }, | |
| }); | |
| }; | |
| export const openCopyLyrics = () => { | |
| const modal = window.$modal.create({ | |
| preset: "card", | |
| transformOrigin: "center", | |
| autoFocus: false, | |
| style: { width: "500px" }, | |
| title: "复制歌词", | |
| content: () => { | |
| return h(CopyLyrics, { | |
| onClose: () => modal.destroy(), | |
| }); | |
| }, | |
| }); | |
| }; |
No description provided.