diff --git a/src/App.vue b/src/App.vue index 89e1b44..06916d3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,18 @@ diff --git a/src/components/ImagePreview/index.ts b/src/components/ImagePreview/index.ts new file mode 100644 index 0000000..68573df --- /dev/null +++ b/src/components/ImagePreview/index.ts @@ -0,0 +1 @@ +export { default as ImagePreview } from './service.ts' diff --git a/src/components/ImagePreview/service.ts b/src/components/ImagePreview/service.ts new file mode 100644 index 0000000..4a3bc4e --- /dev/null +++ b/src/components/ImagePreview/service.ts @@ -0,0 +1,32 @@ +import { createVNode, render, reactive } from 'vue' +import ImagePreviewVue from './ImagePreview.vue' + +type PreviewOptions = { + images: string[] + startIndex?: number + maskClosable?: boolean + zIndex?: number + // Supply scale metrics provider compatible with useScale + getScaleMetrics: () => { scale: number; offsetX: number; offsetY: number } +} + +let container: HTMLElement | null = null + +export default function previewImage(options: PreviewOptions) { + if (!container) { + container = document.createElement('div') + document.body.appendChild(container) + } + + const state = reactive({ visible: true }) + + const vnode = createVNode(ImagePreviewVue, { + ...options, + onClose: () => { + state.visible = false + render(null, container!) + } + }) + + render(vnode, container) +} diff --git a/src/components/Sidebar/Sidebar.vue b/src/components/Sidebar/Sidebar.vue new file mode 100644 index 0000000..48c4556 --- /dev/null +++ b/src/components/Sidebar/Sidebar.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/src/components/index.ts b/src/components/index.ts index 3b55f96..8045278 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -13,3 +13,6 @@ export * from './ProgressBar' // 切换组件 export * from './Switcher' + +// 图片预览(函数式) +export * from './ImagePreview' diff --git a/src/router/index.ts b/src/router/index.ts index 5291e22..4e3646e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -52,6 +52,23 @@ const routes: RouteRecordRaw[] = [ title: '视频' } }, + //技能树 + { + path: '/skill', + name: 'Skill', + component: () => import('@/views/skill/index.vue'), + meta: { + title: '技能树' + } + }, + { + path: '/skill/video', + name: 'SkillVdieo', + component: () => import('@/views/skill/video.vue'), + meta: { + title: '技能树视频' + } + }, //中期拍摄 { path: '/midterm', diff --git a/src/views/home/action.vue b/src/views/home/action.vue index 20a80a6..4d7510b 100644 --- a/src/views/home/action.vue +++ b/src/views/home/action.vue @@ -16,8 +16,8 @@ const isImageLoading = ref(false) // 预加载图片映射 const imageMap = { vlog: IMAGE_PATHS.ACTION.VIDEO1, - film: IMAGE_PATHS.ACTION.VIDEO2, - interview: IMAGE_PATHS.ACTION.VIDEO3 + film: IMAGE_PATHS.ACTION.VIDEO3, + interview: IMAGE_PATHS.ACTION.VIDEO2 } // 预加载所有图片 @@ -63,6 +63,12 @@ const selectedImage = computed(() => { return getBackgroundImage(imageMap[selectedModule.value]) }) +const handleSkill = () => { + router.push({ + name: 'Skill' + }) +} + // 生命周期 onMounted(() => { preloadImages() @@ -90,8 +96,10 @@ onMounted(() => { @click.stop="handleClick" > + @@ -127,16 +135,5 @@ onMounted(() => { alt="" /> - - diff --git a/src/views/prepare/index.vue b/src/views/prepare/index.vue index 7345c5e..58344db 100644 --- a/src/views/prepare/index.vue +++ b/src/views/prepare/index.vue @@ -23,7 +23,7 @@ const currentHighlight = computed(() => const router = useRouter() -const currentStep = ref(0) +const currentStep = ref(1) const handleComplete = () => { console.log('完成前置条件') @@ -47,6 +47,7 @@ interface SimpleStep { const handleStepChangeGui = (_step: SimpleStep | null, index: number) => { stepIndex.value = index } +const highlightShow = ref(true) diff --git a/src/views/skill/index.vue b/src/views/skill/index.vue new file mode 100644 index 0000000..ef11e82 --- /dev/null +++ b/src/views/skill/index.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/src/views/skill/video.vue b/src/views/skill/video.vue new file mode 100644 index 0000000..b097650 --- /dev/null +++ b/src/views/skill/video.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/src/views/vlog/index.vue b/src/views/vlog/index.vue index 23107a5..e0a200f 100644 --- a/src/views/vlog/index.vue +++ b/src/views/vlog/index.vue @@ -27,6 +27,10 @@ const handleWorkClick = () => { router.push({ name: 'Work' }) } +const handleClose = () => { + router.back() +} + onMounted(() => { if (route.query.key === 'video') { currentStep.value = 1 @@ -42,6 +46,13 @@ onMounted(() => { :style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BG_CENTER) }" > + + +
{ steps.value = [ { id: 'step1', - content: '已完成专业剖析,即可查看脚本' + content: '恭喜你,已完成专业剖析的学习,点击【查看脚本】回顾视频脚本吧!' } ] return diff --git a/src/views/vlog/work/index.vue b/src/views/vlog/work/index.vue index fc43349..0e3be86 100644 --- a/src/views/vlog/work/index.vue +++ b/src/views/vlog/work/index.vue @@ -1,10 +1,13 @@ -