chore: bypass pre-commit for now
This commit is contained in:
1 parent
10e97670a5
commit
c4ba322e32
76 files changed
+2253
-218
No files matched your search
@@ -2,7 +2,7 @@
|
||||
import { computed, nextTick, onMounted, ref } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import ImgButton from '@/components/Button/ImgButton.vue'
|
||||
import { GuideSteps } from '@/components/Guide'
|
||||
import { GuideSteps, StepNavigation } from '@/components/Guide'
|
||||
import { getStaticImage, IMAGE_PATHS } from '@/utils'
|
||||
import second from '/video/Vlog模块_任务取景框_专业剖析_基础景别运用.mp4'
|
||||
import third from '/video/Vlog模块_任务取景框_专业剖析_画面构图.mp4'
|
||||
@@ -24,6 +24,44 @@ const steps = ref([
|
||||
}
|
||||
])
|
||||
|
||||
// 步骤导航数据
|
||||
const navigationSteps = ref([
|
||||
{
|
||||
id: 'step1',
|
||||
label: '拍摄执行',
|
||||
content: '基础景别应用',
|
||||
type: 'shooting' as const
|
||||
},
|
||||
{
|
||||
id: 'step2',
|
||||
label: '拍摄执行',
|
||||
content: '画面构图',
|
||||
type: 'shooting' as const
|
||||
},
|
||||
{
|
||||
id: 'step3',
|
||||
label: '内容策划',
|
||||
content: '简单脚本策划',
|
||||
type: 'planning' as const
|
||||
},
|
||||
{
|
||||
id: 'step4',
|
||||
label: '拍摄执行',
|
||||
content: '动态事件跟拍与抓拍',
|
||||
type: 'shooting' as const
|
||||
},
|
||||
{
|
||||
id: 'step5',
|
||||
label: '后期制作',
|
||||
content: '素材导入、剪辑拼接',
|
||||
type: 'post' as const
|
||||
}
|
||||
])
|
||||
|
||||
// 步骤导航相关状态
|
||||
const showStepNavigation = ref(false)
|
||||
const currentNavigationStep = ref(1) // 对应视频索引,从0开始
|
||||
|
||||
// 视频列表
|
||||
const videoList = [second, third, fourth, five, six]
|
||||
const currentVideoIndex = ref(0)
|
||||
@@ -33,6 +71,7 @@ const currentVideo = computed(() => videoList[currentVideoIndex.value])
|
||||
const handleVideoChange = () => {
|
||||
if (currentVideoIndex.value < videoList.length - 1) {
|
||||
currentVideoIndex.value++
|
||||
currentNavigationStep.value = currentVideoIndex.value
|
||||
} else {
|
||||
status.value = true
|
||||
steps.value = [
|
||||
@@ -80,14 +119,30 @@ const handleComplete = () => {
|
||||
})
|
||||
} else {
|
||||
router.push({
|
||||
name: 'midterm',
|
||||
name: 'Prepare',
|
||||
query: {
|
||||
key: 'midterm'
|
||||
key: 'prepare'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 步骤导航事件处理
|
||||
const handleStepClick = (index: number) => {
|
||||
currentVideoIndex.value = index
|
||||
currentNavigationStep.value = index
|
||||
nextTick(() => {
|
||||
if (!videoRef.value) return
|
||||
videoRef.value.muted = false
|
||||
videoRef.value.volume = 1
|
||||
videoRef.value.play()
|
||||
})
|
||||
}
|
||||
|
||||
const handleStepNavigationClose = () => {
|
||||
showStepNavigation.value = false
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (key.value === 'idea') {
|
||||
status.value = true
|
||||
@@ -103,6 +158,23 @@ onMounted(() => {
|
||||
:image="IMAGE_PATHS.COMPONENTS.BACK"
|
||||
@click="handleClose"
|
||||
/>
|
||||
<!-- 步骤导航按钮 -->
|
||||
<button
|
||||
v-if="key === 'profession'"
|
||||
class="absolute right-4 top-1/2 z-10 -translate-y-1/2 w-12 h-12 bg-blue-500/80 hover:bg-blue-500 rounded-full flex items-center justify-center text-white transition-all duration-200"
|
||||
@click="showStepNavigation = true"
|
||||
title="步骤导航"
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path
|
||||
d="M3 4H17M3 8H17M3 12H17M3 16H17"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div v-if="key === 'vlog'" :src="image">
|
||||
<img :src="getStaticImage('work/vlog背景全屏待定')" alt="" />
|
||||
</div>
|
||||
@@ -129,6 +201,16 @@ onMounted(() => {
|
||||
|
||||
<!-- 引导与高亮 -->
|
||||
<GuideSteps v-if="status" :steps="steps" position-offset-y="85%" @complete="handleComplete" />
|
||||
|
||||
<!-- 步骤导航抽屉 -->
|
||||
<StepNavigation
|
||||
:visible="showStepNavigation && key === 'profession'"
|
||||
:background-image="getStaticImage('work/vlog背景全屏待定')"
|
||||
:steps="navigationSteps"
|
||||
:current-step-index="currentNavigationStep"
|
||||
@step-click="handleStepClick"
|
||||
@close="handleStepNavigationClose"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in new issue
Block a user