|
@@ -60,6 +60,8 @@ export default defineComponent({
|
|
|
tips: [] as IFIGNER_INSTRUMENT_Note[],
|
|
|
|
|
|
tnoteShow: false,
|
|
|
+ scrollLeftBtnDisabled: false, // 左按钮
|
|
|
+ scrollRightBtnDisabled: false, // 右按钮
|
|
|
});
|
|
|
const fingerData = reactive({
|
|
|
relationshipIndex: 0,
|
|
@@ -223,6 +225,12 @@ export default defineComponent({
|
|
|
left: type === 'left' ? -width : width,
|
|
|
behavior: 'smooth'
|
|
|
})
|
|
|
+ nextTick(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ data.scrollLeftBtnDisabled = (noteBoxRef.value as unknown as HTMLElement).scrollLeft === 0;
|
|
|
+ data.scrollRightBtnDisabled = (noteBoxRef.value as unknown as HTMLElement).scrollLeft >= (noteBoxRef.value as unknown as HTMLElement).scrollWidth / 2;
|
|
|
+ }, 300)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/** 滚轮缩放 */
|
|
@@ -338,7 +346,7 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class={styles.notes}>
|
|
|
- <Button class={styles.noteBtn} onClick={() => scrollNoteBox('left')}>
|
|
|
+ <Button class={[styles.noteBtn, data.scrollLeftBtnDisabled && styles.disabled]} onClick={() => scrollNoteBox('left')}>
|
|
|
<Icon name="arrow-left" />
|
|
|
</Button>
|
|
|
<div class={[styles.noteContent, browsInfo.ios ? '' : styles.noteContentWrap]}>
|
|
@@ -374,7 +382,7 @@ export default defineComponent({
|
|
|
})}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <Button class={styles.noteBtn} onClick={() => scrollNoteBox('right')}>
|
|
|
+ <Button class={[styles.noteBtn, data.scrollRightBtnDisabled && styles.disabled]} onClick={() => scrollNoteBox('right')}>
|
|
|
<Icon name="arrow" />
|
|
|
</Button>
|
|
|
</div>
|