|
@@ -12,6 +12,7 @@ import detailState from '/src/pages/detail/state'
|
|
import iconFollwBtn from './icons/icon-follwBtn.png'
|
|
import iconFollwBtn from './icons/icon-follwBtn.png'
|
|
import { unitTestData } from '/src/subpages/colexiu/unitTest/index'
|
|
import { unitTestData } from '/src/subpages/colexiu/unitTest/index'
|
|
import { formatPitch } from '/src/subpages/colexiu/buttons/evaluating'
|
|
import { formatPitch } from '/src/subpages/colexiu/buttons/evaluating'
|
|
|
|
+import SettingState from '/src/pages/detail/setting-state'
|
|
|
|
|
|
// 显示或隐藏播放按钮
|
|
// 显示或隐藏播放按钮
|
|
const togglePlayer = (show: boolean = false) => {
|
|
const togglePlayer = (show: boolean = false) => {
|
|
@@ -134,7 +135,12 @@ const handleEnd = () => {
|
|
*/
|
|
*/
|
|
const autoEndFollow = () => {
|
|
const autoEndFollow = () => {
|
|
if (data.index >= detailState.times.length) {
|
|
if (data.index >= detailState.times.length) {
|
|
- handleEnd()
|
|
|
|
|
|
+ // 如果开了自动循环需要重新开始跟练
|
|
|
|
+ if (SettingState.sett.loop) {
|
|
|
|
+ handleStart()
|
|
|
|
+ } else {
|
|
|
|
+ handleEnd()
|
|
|
|
+ }
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let nextIndex = data.index + 1;
|
|
let nextIndex = data.index + 1;
|
|
@@ -142,7 +148,12 @@ const autoEndFollow = () => {
|
|
// 后面的音符是否都是休止音符
|
|
// 后面的音符是否都是休止音符
|
|
const isAllRest = !rightTimes.some((item: any) => item.frequency > 1);
|
|
const isAllRest = !rightTimes.some((item: any) => item.frequency > 1);
|
|
if (isAllRest && detailState.times[data.index].frequency < 1) {
|
|
if (isAllRest && detailState.times[data.index].frequency < 1) {
|
|
- handleEnd()
|
|
|
|
|
|
+ // 如果开了自动循环需要重新开始跟练
|
|
|
|
+ if (SettingState.sett.loop) {
|
|
|
|
+ handleStart()
|
|
|
|
+ } else {
|
|
|
|
+ handleEnd()
|
|
|
|
+ }
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|