diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index 5c42c1ae..55c56764 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -1024,35 +1024,6 @@ export default { height: `${rect.height}px`, }; } - // if (this.courseInfo.type === 20 && this.currentStep === 1) { - // this.$nextTick(() => { - // const guidanceContent = document.querySelector('.guidance-content'); - // if (guidanceContent) { - // // 调整引导框位置,显示在元素上方或旁边 - // const elementTop = rect.top; - // const elementHeight = rect.height; - // const guidanceHeight = guidanceContent.offsetHeight || 300; - // - // // 如果元素在页面上半部分,引导框显示在下方 - // if (elementTop < window.innerHeight / 2) { - // guidanceContent.style.top = `${elementTop + elementHeight + 10}px`; - // } else { - // // 如果元素在页面下半部分,引导框显示在上方 - // guidanceContent.style.top = `${elementTop - guidanceHeight - 10}px`; - // } - // - // // 确保引导框在视窗内 - // const contentRect = guidanceContent.getBoundingClientRect(); - // if (contentRect.bottom > window.innerHeight) { - // guidanceContent.style.top = `${window.innerHeight - contentRect.height - 20}px`; - // } - // if (contentRect.top < 0) { - // guidanceContent.style.top = '20px'; - // } - // } - // }); - // } - } }, // 下一步 @@ -1083,9 +1054,7 @@ export default { onContentTypeFocus() { if (this.showGuidance && this.currentStep === 1) { this.currentStep = 2; - // this.$nextTick(() => { - this.highlightCurrentStep(); - // }); + this.highlightCurrentStep(); } }, @@ -1093,9 +1062,7 @@ export default { onContentTypeChange() { if (this.showGuidance && this.currentStep === 1) { this.currentStep = 2; - // this.$nextTick(() => { - this.highlightCurrentStep(); - // }); + this.highlightCurrentStep(); } }, @@ -2035,8 +2002,6 @@ export default { max-width: 500px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); z-index: 10000; - //left: 50%; - //transform: translateX(-50%); top: 0%; }