|
@@ -532,6 +532,8 @@ export default defineComponent({
|
|
|
const activeNote = abcData.abc.measures[data.active?.measureIndex]?.notes[data.active?.noteIndex] || null;
|
|
|
|
|
|
if (type === "exit") {
|
|
|
+ // 退出时先保存 不提示
|
|
|
+ await handleSaveMusic(false);
|
|
|
// 判断是否在应用中
|
|
|
if (window.matchMedia("(display-mode: standalone)").matches) {
|
|
|
window.onbeforeunload = null;
|
|
@@ -1094,7 +1096,7 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
- const handleSaveMusic = async () => {
|
|
|
+ const handleSaveMusic = async (tips = true) => {
|
|
|
await api_musicSheetCreationUpdate({
|
|
|
name: data.musicName,
|
|
|
creator: data.creator,
|
|
@@ -1103,7 +1105,9 @@ export default defineComponent({
|
|
|
id: data.musicId,
|
|
|
subjectId: 3,
|
|
|
});
|
|
|
- message.success("保存成功");
|
|
|
+ if (tips) {
|
|
|
+ message.success("保存成功");
|
|
|
+ }
|
|
|
data.isSave = true;
|
|
|
};
|
|
|
onMounted(async () => {
|