|
@@ -1,6 +1,6 @@
|
|
|
import TheSticky from '@/components/the-sticky'
|
|
|
import styles from './new-index.module.less'
|
|
|
-import { useEventListener, useWindowScroll } from '@vueuse/core'
|
|
|
+import { useEventListener, useThrottleFn, useWindowScroll } from '@vueuse/core'
|
|
|
import { postMessage } from '@/helpers/native-message'
|
|
|
import iconShare from '../../images/icon-share.png'
|
|
|
import oStart from '../album-detail/icon-hart.png'
|
|
@@ -888,20 +888,24 @@ export default defineComponent({
|
|
|
type="primary"
|
|
|
color="linear-gradient(270deg, #FF3C81 0%, #FF76A6 100%)"
|
|
|
onClick={() => {
|
|
|
- player.value && player.value.stop()
|
|
|
- const item: any = partColumns.value.find(
|
|
|
- (c: any) => c.value === staffData.partIndex
|
|
|
- )
|
|
|
- const index = staffData.tempPartList.findIndex(
|
|
|
- (i: any) => i.track === item?.track
|
|
|
- )
|
|
|
- musicBuy(musicDetail.value, () => {}, {
|
|
|
- 'part-index': index || 0,
|
|
|
- sett: staff.radio,
|
|
|
- // 1:忽略系统节拍器
|
|
|
- ignoreSysMetronome:
|
|
|
- route.query.subjectType === 'MUSIC' ? 1 : 0
|
|
|
- })
|
|
|
+ const throttleFn = useThrottleFn(() => {
|
|
|
+ player.value && player.value.stop()
|
|
|
+ const item: any = partColumns.value.find(
|
|
|
+ (c: any) => c.value === staffData.partIndex
|
|
|
+ )
|
|
|
+ const index = staffData.tempPartList.findIndex(
|
|
|
+ (i: any) => i.track === item?.track
|
|
|
+ )
|
|
|
+ musicBuy(musicDetail.value, () => {}, {
|
|
|
+ 'part-index': index || 0,
|
|
|
+ sett: staff.radio,
|
|
|
+ // 1:忽略系统节拍器
|
|
|
+ ignoreSysMetronome:
|
|
|
+ route.query.subjectType === 'MUSIC' ? 1 : 0
|
|
|
+ })
|
|
|
+ }, 500)
|
|
|
+
|
|
|
+ throttleFn()
|
|
|
}}
|
|
|
>
|
|
|
立即练习
|