|
@@ -323,7 +323,7 @@ export default defineComponent({
|
|
if (!data.playState) return;
|
|
if (!data.playState) return;
|
|
if (ev.measureStart && ev.left === null) return; // this was the second part of a tie across a measure line. Just ignore it.
|
|
if (ev.measureStart && ev.left === null) return; // this was the second part of a tie across a measure line. Just ignore it.
|
|
|
|
|
|
- if (popup.selectMearesShow) {
|
|
|
|
|
|
+ if (popup.selectMearesShow && data.selectMeasures.startNote && data.selectMeasures.endNote) {
|
|
const startTime = data.selectMeasures.startNote?.currentTrackMilliseconds || 0;
|
|
const startTime = data.selectMeasures.startNote?.currentTrackMilliseconds || 0;
|
|
// const timeNote = data.times.find(
|
|
// const timeNote = data.times.find(
|
|
// (n) => n.startChar === data.selectMeasures.startNote.startChar
|
|
// (n) => n.startChar === data.selectMeasures.startNote.startChar
|
|
@@ -399,6 +399,20 @@ export default defineComponent({
|
|
|
|
|
|
const togglePlay = (type: "play" | "pause" | "reset") => {
|
|
const togglePlay = (type: "play" | "pause" | "reset") => {
|
|
if (type === "play") {
|
|
if (type === "play") {
|
|
|
|
+ if (popup.selectMearesShow) {
|
|
|
|
+ if (
|
|
|
|
+ data.selectMeasures.start > data.selectMeasures.end ||
|
|
|
|
+ data.selectMeasures.start === 0 ||
|
|
|
|
+ data.selectMeasures.end === 0
|
|
|
|
+ ) {
|
|
|
|
+ data.selectMeasures.start = 0;
|
|
|
|
+ data.selectMeasures.end = 0;
|
|
|
|
+ data.selectMeasures.startNote = null;
|
|
|
|
+ data.selectMeasures.endNote = null;
|
|
|
|
+ message.warning("请输入正确的小节范围");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
abcData.synthControl.play();
|
|
abcData.synthControl.play();
|
|
data.playState = true;
|
|
data.playState = true;
|
|
} else if (type === "pause") {
|
|
} else if (type === "pause") {
|
|
@@ -2388,7 +2402,10 @@ export default defineComponent({
|
|
<div class={styles.mearesInput}>
|
|
<div class={styles.mearesInput}>
|
|
<NInputNumber
|
|
<NInputNumber
|
|
min={1}
|
|
min={1}
|
|
- max={(data.selectMeasures.end ? data.selectMeasures.end + 1 : 0) || data.selectMeasures.max}
|
|
|
|
|
|
+ max={
|
|
|
|
+ (data.selectMeasures.end ? data.selectMeasures.end + 1 : 0) ||
|
|
|
|
+ data.selectMeasures.max
|
|
|
|
+ }
|
|
bordered={false}
|
|
bordered={false}
|
|
placeholder="开始小节"
|
|
placeholder="开始小节"
|
|
showButton={false}
|
|
showButton={false}
|