|
@@ -377,8 +377,13 @@ export default defineComponent({
|
|
for (let i = 0; i < data.itemList.length; i++) {
|
|
for (let i = 0; i < data.itemList.length; i++) {
|
|
const activeItem = data.itemList[i];
|
|
const activeItem = data.itemList[i];
|
|
if (activeItem.type === 'VIDEO' && activeItem.videoEle) {
|
|
if (activeItem.type === 'VIDEO' && activeItem.videoEle) {
|
|
- activeItem.videoEle.currentTime(0);
|
|
|
|
- activeItem.videoEle.pause();
|
|
|
|
|
|
+ console.log(activeItem.videoEle, ' activeItem.videoEle');
|
|
|
|
+ try {
|
|
|
|
+ activeItem.videoEle?.currentTime(0);
|
|
|
|
+ activeItem.videoEle?.pause();
|
|
|
|
+ } catch (e: any) {
|
|
|
|
+ console.log(e, 'e');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
if (activeItem.type === 'SONG' && activeItem.audioEle) {
|
|
if (activeItem.type === 'SONG' && activeItem.audioEle) {
|
|
@@ -821,7 +826,7 @@ export default defineComponent({
|
|
const activeItem = data.itemList[popupData.activeIndex];
|
|
const activeItem = data.itemList[popupData.activeIndex];
|
|
// 暂停视频和曲谱的播放
|
|
// 暂停视频和曲谱的播放
|
|
if (activeItem.type === 'VIDEO' && activeItem.videoEle) {
|
|
if (activeItem.type === 'VIDEO' && activeItem.videoEle) {
|
|
- activeItem.videoEle.pause();
|
|
|
|
|
|
+ activeItem.videoEle?.pause();
|
|
}
|
|
}
|
|
if (activeItem.type === 'SONG' && activeItem.audioEle) {
|
|
if (activeItem.type === 'SONG' && activeItem.audioEle) {
|
|
activeItem.audioEle?.stop();
|
|
activeItem.audioEle?.stop();
|
|
@@ -1012,10 +1017,10 @@ export default defineComponent({
|
|
clearTimeout(activeData.timer);
|
|
clearTimeout(activeData.timer);
|
|
activeData.model = !activeData.model;
|
|
activeData.model = !activeData.model;
|
|
Object.values(data.videoRefs).map((n: any) =>
|
|
Object.values(data.videoRefs).map((n: any) =>
|
|
- n.toggleHideControl(activeData.model)
|
|
|
|
|
|
+ n?.toggleHideControl(activeData.model)
|
|
);
|
|
);
|
|
Object.values(data.audioRefs).map((n: any) =>
|
|
Object.values(data.audioRefs).map((n: any) =>
|
|
- n.toggleHideControl(activeData.model)
|
|
|
|
|
|
+ n?.toggleHideControl(activeData.model)
|
|
);
|
|
);
|
|
}}>
|
|
}}>
|
|
<div
|
|
<div
|
|
@@ -1028,12 +1033,12 @@ export default defineComponent({
|
|
{!popupData.chapterLoading ? (
|
|
{!popupData.chapterLoading ? (
|
|
<div class={styles.wraps}>
|
|
<div class={styles.wraps}>
|
|
{data.itemList.map((m: any, mIndex: number) => {
|
|
{data.itemList.map((m: any, mIndex: number) => {
|
|
- const isRender =
|
|
|
|
- m.isRender || Math.abs(popupData.activeIndex - mIndex) < 2;
|
|
|
|
|
|
+ const isRender = Math.abs(popupData.activeIndex - mIndex) < 2;
|
|
const isEmtry = Math.abs(popupData.activeIndex - mIndex) > 4;
|
|
const isEmtry = Math.abs(popupData.activeIndex - mIndex) > 4;
|
|
- if (isRender) {
|
|
|
|
- m.isRender = true;
|
|
|
|
- }
|
|
|
|
|
|
+ // if (isRender) {
|
|
|
|
+ // m.isRender = true;
|
|
|
|
+ // }
|
|
|
|
+ // console.log(isRender, 'isRender', mIndex);
|
|
return isRender ? (
|
|
return isRender ? (
|
|
<div
|
|
<div
|
|
key={'index' + mIndex}
|
|
key={'index' + mIndex}
|
|
@@ -1063,10 +1068,10 @@ export default defineComponent({
|
|
activeData.timer = setTimeout(() => {
|
|
activeData.timer = setTimeout(() => {
|
|
activeData.model = !activeData.model;
|
|
activeData.model = !activeData.model;
|
|
Object.values(data.videoRefs).map((n: any) =>
|
|
Object.values(data.videoRefs).map((n: any) =>
|
|
- n.toggleHideControl(activeData.model)
|
|
|
|
|
|
+ n?.toggleHideControl(activeData.model)
|
|
);
|
|
);
|
|
Object.values(data.audioRefs).map((n: any) =>
|
|
Object.values(data.audioRefs).map((n: any) =>
|
|
- n.toggleHideControl(activeData.model)
|
|
|
|
|
|
+ n?.toggleHideControl(activeData.model)
|
|
);
|
|
);
|
|
if (activeData.model) {
|
|
if (activeData.model) {
|
|
setModelOpen();
|
|
setModelOpen();
|