fix(teacher): 课程资源为空时禁用展播模式按钮
Made-with: Cursor
This commit is contained in:
parent
3bd5cdfef5
commit
5c9be63347
@ -34,7 +34,12 @@
|
||||
<StepForwardOutlined />
|
||||
</a-button>
|
||||
</a-button-group>
|
||||
<a-button type="primary" class="broadcast-btn" @click="openBroadcastMode">
|
||||
<a-button
|
||||
type="primary"
|
||||
class="broadcast-btn"
|
||||
:disabled="!hasCourseResources"
|
||||
@click="openBroadcastMode"
|
||||
>
|
||||
<template #icon>
|
||||
<ExpandOutlined />
|
||||
</template>
|
||||
@ -893,8 +898,12 @@ const nextStep = () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 打开展播模式(新标签页)
|
||||
// 打开展播模式(新标签页);无课程级资源时展播无内容,与侧栏「课程资源」一致
|
||||
const openBroadcastMode = () => {
|
||||
if (!hasCourseResources.value) {
|
||||
message.warning('暂无课程资源,无法进入展播模式');
|
||||
return;
|
||||
}
|
||||
const broadcastUrl = `${window.location.origin}/teacher/broadcast/${lessonId.value}?lessonIndex=${currentLessonIndex.value}&stepIndex=${currentStepIndex.value}`;
|
||||
window.open(broadcastUrl, '_blank', 'noopener,noreferrer');
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user