chore: bypass pre-commit for now

This commit is contained in:
zhongyingmin committed 2025-09-26 00:11:15 +08:00
1 parent 10e97670a5
commit c4ba322e32
76 files changed
+2253 -218

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

+6 -1
View File
@@ -4,7 +4,12 @@
-->
<template>
<img class="cursor-pointer" draggable="false" :src="getStaticImage(image)" @click="handleClick" />
<img
class="cursor-pointer transition-all duration-300 hover:scale-105 hover:brightness-110"
draggable="false"
:src="getStaticImage(image)"
@click="handleClick"
/>
</template>
<script lang="ts" setup>
-1
View File
@@ -5,7 +5,6 @@
v-if="currentStep !== totalSteps"
:image="IMAGE_PATHS.BUTTONS.CONTINUE"
class="continue-button"
@click="handleContinue"
/>
</span>
</template>
+430
View File
@@ -0,0 +1,430 @@
<template>
<!-- 抽屉遮罩层 -->
<div v-if="visible" class="drawer-overlay" @click="handleClose">
<!-- 抽屉内容 -->
<div
class="drawer-container"
:class="{
'drawer-container--visible': visible && !isClosing,
'drawer-container--closing': isClosing
}"
@click.stop
>
<!-- 右侧步骤面板 -->
<div class="steps-panel">
<!-- 关闭按钮 -->
<!-- <button class="close-button" @click="handleClose">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
<path
d="M12 4L4 12M4 4L12 12"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
/>
</svg>
</button> -->
<!-- 顶部导航箭头 -->
<div class="panel-header">
<button class="nav-arrow nav-arrow-up" @click="scrollUp" :disabled="!canScrollUp">
<svg width="12" height="12" viewBox="0 0 12 12" fill="none">
<path
d="M6 9L3 6L6 3"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</button>
</div>
<!-- 步骤列表 -->
<div class="steps-list" ref="stepsListRef">
<div
v-for="(step, index) in steps"
:key="step.id"
class="step-item"
:class="{ 'step-item--active': index === currentStepIndex }"
@click="handleStepClick(index)"
>
<!-- 播放图标(仅当前步骤显示) -->
<!-- <div v-if="index === currentStepIndex" class="play-icon">
<svg width="8" height="8" viewBox="0 0 8 8" fill="none">
<path d="M1.5 0.5L6.5 4L1.5 7.5V0.5Z" fill="currentColor" />
</svg>
</div> -->
<!-- 步骤标签 -->
<div class="step-label" :class="`step-label--${step.type}`">
{{ step.label }}
</div>
<!-- 步骤内容 -->
<div class="step-content">
{{ step.content }}
</div>
<!-- 步骤数字 -->
<div class="step-number" :class="{ 'step-number--active': index === currentStepIndex }">
{{ index + 1 }}
</div>
</div>
</div>
<!-- 底部导航 -->
<div class="panel-footer">
<button class="nav-arrow nav-arrow-down" @click="scrollDown" :disabled="!canScrollDown">
<svg width="12" height="12" viewBox="0 0 12 12" fill="none">
<path
d="M6 3L9 6L6 9"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</button>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, computed, onMounted, nextTick, watch } from 'vue'
export interface StepItem {
id: string
label: string
content: string
type: 'shooting' | 'planning' | 'post' | 'other'
}
interface Props {
/** 是否显示抽屉 */
visible: boolean
/** 背景图片路径 */
backgroundImage: string
/** 步骤列表 */
steps: StepItem[]
/** 当前步骤索引 */
currentStepIndex?: number
/** 是否显示关闭按钮 */
showClose?: boolean
}
interface Emits {
(e: 'step-click', index: number, step: StepItem): void
(e: 'close'): void
}
const props = withDefaults(defineProps<Props>(), {
currentStepIndex: 0,
showClose: true
})
const emit = defineEmits<Emits>()
const stepsListRef = ref<HTMLElement>()
const scrollPosition = ref(0)
const maxScroll = ref(0)
const isClosing = ref(false)
// 计算是否可以滚动
const canScrollUp = computed(() => scrollPosition.value > 0)
const canScrollDown = computed(() => scrollPosition.value < maxScroll.value)
// 滚动到指定位置
const scrollTo = (position: number) => {
if (!stepsListRef.value) return
stepsListRef.value.scrollTop = position
scrollPosition.value = position
}
// 向上滚动
const scrollUp = () => {
if (!canScrollUp.value) return
const newPosition = Math.max(0, scrollPosition.value - 100)
scrollTo(newPosition)
}
// 向下滚动
const scrollDown = () => {
if (!canScrollDown.value) return
const newPosition = Math.min(maxScroll.value, scrollPosition.value + 100)
scrollTo(newPosition)
}
// 处理步骤点击
const handleStepClick = (index: number) => {
emit('step-click', index, props.steps[index])
}
// 处理关闭
const handleClose = () => {
isClosing.value = true
// 延迟关闭,让动画完成
setTimeout(() => {
emit('close')
isClosing.value = false
}, 300)
}
// 监听visible变化,重置关闭状态
watch(
() => props.visible,
newVal => {
if (newVal) {
isClosing.value = false
}
}
)
// 更新滚动状态
const updateScrollState = () => {
if (!stepsListRef.value) return
const { scrollTop, scrollHeight, clientHeight } = stepsListRef.value
scrollPosition.value = scrollTop
maxScroll.value = scrollHeight - clientHeight
}
// 监听滚动事件
const handleScroll = () => {
updateScrollState()
}
onMounted(() => {
nextTick(() => {
updateScrollState()
if (stepsListRef.value) {
stepsListRef.value.addEventListener('scroll', handleScroll)
}
})
})
</script>
<style scoped>
.drawer-overlay {
@apply fixed inset-0 z-50;
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(8px);
animation: fadeIn 0.3s ease-out;
}
.drawer-container {
@apply absolute right-0 top-0 w-1/2 h-full flex justify-end;
transform: translateX(100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
max-width: 100vw;
}
.drawer-container--visible {
transform: translateX(0);
}
.drawer-container--closing {
transform: translateX(100%);
}
.steps-panel {
@apply h-full relative;
/* background: linear-gradient(
180deg,
rgba(20, 30, 45, 0.85) 0%,
rgba(10, 15, 25, 0.9) 30%,
rgba(15, 20, 30, 0.85) 70%,
rgba(20, 30, 45, 0.85) 100%
); */
width: 648px;
background-image: url('@/assets/images/vlog/专业剖析侧边.png');
backdrop-filter: blur(20px);
display: flex;
flex-direction: column;
/* border-left: 1px solid rgba(255, 255, 255, 0.1); */
border-radius: 12px 0 0 12px;
box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}
.close-button {
@apply absolute top-4 right-4 w-8 h-8 rounded-full flex items-center justify-center;
background: rgba(59, 130, 246, 0.9);
color: white;
border: none;
cursor: pointer;
transition: all 0.2s ease;
z-index: 10;
box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}
.close-button:hover {
background: rgba(59, 130, 246, 1);
transform: scale(1.1);
box-shadow: 0 0 25px rgba(59, 130, 246, 0.8);
}
.panel-header {
@apply flex justify-center items-center;
padding: 3rem 0 1rem 0;
z-index: 2;
position: relative;
}
.nav-arrow {
@apply w-6 h-6 flex items-center justify-center;
background: transparent;
color: rgba(255, 255, 255, 0.7);
border: none;
cursor: pointer;
transition: all 0.2s ease;
}
.nav-arrow:hover:not(:disabled) {
color: white;
transform: scale(1.1);
}
.nav-arrow:disabled {
opacity: 0.3;
cursor: not-allowed;
}
.steps-list {
@apply flex-1 px-6 py-4;
scrollbar-width: none;
-ms-overflow-style: none;
z-index: 2;
position: absolute;
top: 50%;
left: 60%;
transform: translate(-50%, -50%);
}
.steps-list::-webkit-scrollbar {
display: none;
}
.step-item {
@apply flex items-center py-4 px-8 mb-4 cursor-pointer transition-all duration-300;
position: relative;
width: 831px;
height: 122px;
/* min-height: 4rem; */
/* background: rgba(255, 255, 255, 0.05); */
background-image: url('@/assets/images/vlog/侧边-底板未选中.png');
/* border: 1px solid rgba(255, 255, 255, 0.1); */
/* border-radius: 20px; */
/* backdrop-filter: blur(10px); */
}
.step-item:hover {
/* background: rgba(255, 255, 255, 0.08); */
transform: translateX(4px);
}
.step-item--active {
width: 1034px;
height: 230px;
padding-left: 180px;
/* background: linear-gradient(90deg, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.1) 100%); */
/* border-color: rgba(59, 130, 246, 0.6);
box-shadow:
0 0 30px rgba(59, 130, 246, 0.5),
inset 0 0 20px rgba(59, 130, 246, 0.1); */
background-image: url('@/assets/images/vlog/侧边-选中底板.png');
transform: translateX(-23%);
}
.play-icon {
@apply w-5 h-5 flex items-center justify-center mr-3;
color: #60a5fa;
background: rgba(96, 165, 250, 0.2);
border-radius: 50%;
box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}
.step-label {
@apply px-16 py-4 rounded-full text-2xl font-semibold mr-4 whitespace-nowrap;
color: white;
min-width: 5rem;
text-align: center;
}
.step-label--shooting {
background: linear-gradient(135deg, #22c55e, #16a34a);
box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}
.step-label--planning {
background: linear-gradient(135deg, #f97316, #ea580c);
box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}
.step-label--post {
background: linear-gradient(135deg, #0ea5e9, #0284c7);
box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}
.step-label--other {
background: linear-gradient(135deg, #a855f7, #9333ea);
box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}
.step-content {
@apply flex-1 text-3xl font-bold;
line-height: 1.5;
margin-right: 1rem;
}
.step-number {
@apply flex items-center justify-center text-6xl font-semibold;
color: rgba(255, 255, 255, 0.3);
transition: all 0.3s ease;
position: absolute;
right: 15%;
z-index: 1;
}
.step-number--active {
margin-bottom: 80px;
font-size: 150px;
color: white;
text-shadow: 5px 10px 5px rgba(0, 0, 0, 0.1);
/* transform: scale(1.2);
background: rgba(59, 130, 246, 0.2);
box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); */
}
.panel-footer {
@apply flex flex-col justify-center items-center;
padding: 1rem 0 2rem 0;
z-index: 2;
position: relative;
}
.guide-button {
@apply px-8 py-3 rounded-full text-sm font-semibold;
background: linear-gradient(135deg, #dc2626, #b91c1c);
color: white;
border: none;
cursor: pointer;
transition: all 0.2s ease;
margin-top: 1rem;
box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}
.guide-button:hover {
background: linear-gradient(135deg, #ef4444, #dc2626);
transform: scale(1.05);
box-shadow: 0 6px 16px rgba(220, 38, 38, 0.5);
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
+1
View File
@@ -3,6 +3,7 @@ export { default as GuideDragon } from './GuideDragon.vue'
export { default as GuideSteps } from './GuideSteps.vue'
export { default as GuideStepsItem } from './GuideStepsItem.vue'
export { default as SpotlightOverlay } from './SpotlightOverlay.vue'
export { default as StepNavigation } from './StepNavigation.vue'
// 类型导出
export type {
@@ -50,6 +50,8 @@ type Props = {
designWidth?: number
designHeight?: number
getScaleMetrics: () => { scale: number; offsetX: number; offsetY: number }
// 关闭回调函数
onClose?: () => void
}
const props = withDefaults(defineProps<Props>(), {
@@ -119,6 +121,10 @@ const imageStyle = computed(() => ({
function emitClose() {
visible.value = false
emit('close')
// 调用用户提供的关闭回调
if (props.onClose) {
props.onClose()
}
}
function onMaskClick() {
+1
View File
@@ -1 +1,2 @@
export { default as ImagePreview } from './service.ts'
export type { default as ImagePreviewComponent } from './ImagePreview.vue'
+7
View File
@@ -8,6 +8,8 @@ type PreviewOptions = {
zIndex?: number
// Supply scale metrics provider compatible with useScale
getScaleMetrics: () => { scale: number; offsetX: number; offsetY: number }
// 关闭回调函数
onClose?: () => void
}
let container: HTMLElement | null = null
@@ -24,6 +26,11 @@ export default function previewImage(options: PreviewOptions) {
...options,
onClose: () => {
state.visible = false
// 调用用户提供的关闭回调
if (options.onClose) {
options.onClose()
}
// 清理 DOM
render(null, container!)
}
})
+156
View File
@@ -0,0 +1,156 @@
<template>
<Overlay
:visible="visible"
:z-index="zIndex"
:clickable="maskClosable"
:custom-class="customClass"
:animation="animation"
@click="handleMaskClick"
@close="handleClose"
>
<div class="modal-container" :style="modalStyle">
<!-- 头部 -->
<div v-if="showHeader" class="modal-header">
<slot name="header">
<div class="modal-title">
<slot name="title">
{{ title }}
</slot>
</div>
</slot>
<button v-if="closable" class="modal-close" @click="handleClose">×</button>
</div>
<!-- 内容区域 -->
<div class="modal-body">
<slot name="body">
<slot />
</slot>
</div>
<!-- 底部 -->
<div v-if="$slots.footer" class="modal-footer">
<slot name="footer" />
</div>
</div>
</Overlay>
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import { Overlay } from '@/components/Overlay'
import type { ModalProps, ModalEmits } from './types'
interface Props extends ModalProps {}
const props = withDefaults(defineProps<Props>(), {
visible: false,
title: '',
width: '520px',
height: 'auto',
mask: true,
maskClosable: true,
closable: true,
zIndex: 1000,
customClass: '',
center: true,
animation: 'fade'
})
const emit = defineEmits<ModalEmits>()
// 计算属性
const showHeader = computed(() => {
return props.title
})
// 移除 animationName 计算属性,由 Overlay 组件处理
const modalStyle = computed(() => {
const style: Record<string, string> = {}
if (props.width) {
style.width = typeof props.width === 'number' ? `${props.width}px` : props.width
}
if (props.height && props.height !== 'auto') {
style.height = typeof props.height === 'number' ? `${props.height}px` : props.height
}
return style
})
// 事件处理
const handleClose = () => {
emit('close')
}
const handleMaskClick = (event: MouseEvent) => {
emit('mask-click')
}
</script>
<style scoped>
.modal-container {
background: white;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
max-width: 90vw;
max-height: 90vh;
overflow: hidden;
display: flex;
flex-direction: column;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid #f0f0f0;
min-height: 60px;
}
.modal-title {
font-size: 18px;
font-weight: 600;
color: #333;
flex: 1;
}
.modal-close {
width: 32px;
height: 32px;
border: none;
background: none;
font-size: 24px;
color: #999;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: all 0.2s;
}
.modal-close:hover {
background-color: #f5f5f5;
color: #666;
}
.modal-body {
padding: 20px;
flex: 1;
overflow-y: auto;
}
.modal-footer {
padding: 16px 20px;
border-top: 1px solid #f0f0f0;
display: flex;
justify-content: flex-end;
gap: 12px;
}
/* 动画效果由 Overlay 组件处理 */
</style>
+135
View File
@@ -0,0 +1,135 @@
# Modal 弹窗组件
一个功能完整的 Vue 3 弹窗组件,支持多种动画效果和灵活的插槽系统。
## 基本用法
```vue
<template>
<Modal v-model:visible="showModal" title="弹窗标题" @close="handleClose">
<template #body>
<p>这是弹窗的主体内容</p>
</template>
</Modal>
</template>
<script setup>
import { ref } from 'vue'
import { Modal } from '@/components/Modal'
const showModal = ref(false)
const handleClose = () => {
showModal.value = false
}
</script>
```
## 插槽说明
### body 插槽(推荐)
直接传入弹窗的主体内容,这是最常用的插槽:
```vue
<template #body>
<div class="custom-content">
<img src="image.jpg" alt="图片" />
<p>自定义内容</p>
</div>
</template>
```
### 其他插槽
- `title`: 标题内容
- `header`: 整个头部区域
- `footer`: 底部区域
- `default`: 默认内容(会作为 body 的备用内容)
## 属性
| 属性 | 类型 | 默认值 | 说明 |
| ------------ | ------------- | ------- | ------------------------------ |
| visible | boolean | false | 是否显示弹窗 |
| title | string | '' | 弹窗标题 |
| width | string/number | '520px' | 弹窗宽度 |
| height | string/number | 'auto' | 弹窗高度 |
| animation | string | 'fade' | 动画类型:fade/slide/zoom/none |
| mask | boolean | true | 是否显示遮罩 |
| maskClosable | boolean | true | 是否可点击遮罩关闭 |
| closable | boolean | true | 是否显示关闭按钮 |
| center | boolean | true | 是否居中显示 |
| zIndex | number | 1000 | 弹窗层级 |
| customClass | string | '' | 自定义类名 |
## 事件
| 事件名 | 说明 | 参数 |
| ---------- | -------------- | ---- |
| close | 关闭弹窗时触发 | - |
| confirm | 确认时触发 | - |
| cancel | 取消时触发 | - |
| mask-click | 点击遮罩时触发 | - |
## 动画效果
支持四种动画效果:
- `fade`: 淡入淡出(默认)
- `slide`: 从上方滑入
- `zoom`: 缩放效果
- `none`: 无动画
## 完整示例
```vue
<template>
<div>
<button @click="showModal = true">打开弹窗</button>
<Modal
v-model:visible="showModal"
title="图片预览"
:width="800"
:height="600"
animation="zoom"
:closable="false"
:mask-closable="false"
@close="handleClose"
>
<template #body>
<div class="relative w-full h-full flex items-center justify-center">
<img :src="imageUrl" alt="预览图片" class="max-w-full max-h-full object-contain" />
</div>
<div class="absolute bottom-4 right-4 flex gap-4">
<button @click="handleConfirm">确认</button>
<button @click="handleCancel">取消</button>
</div>
</template>
</Modal>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { Modal } from '@/components/Modal'
const showModal = ref(false)
const imageUrl = ref('path/to/image.jpg')
const handleClose = () => {
showModal.value = false
}
const handleConfirm = () => {
// 处理确认逻辑
showModal.value = false
}
const handleCancel = () => {
// 处理取消逻辑
showModal.value = false
}
</script>
```
+6
View File
@@ -0,0 +1,6 @@
/**
* Modal 组件导出
*/
export { default as Modal } from './Modal.vue'
export type { ModalProps, ModalEmits, ModalSlots } from './types'
+52
View File
@@ -0,0 +1,52 @@
/**
* Modal 组件类型定义
*/
export interface ModalProps {
/** 是否显示弹窗 */
visible: boolean
/** 弹窗标题 */
title?: string
/** 弹窗宽度 */
width?: string | number
/** 弹窗高度 */
height?: string | number
/** 是否显示遮罩层 */
mask?: boolean
/** 是否可点击遮罩关闭 */
maskClosable?: boolean
/** 是否显示关闭按钮 */
closable?: boolean
/** 弹窗层级 */
zIndex?: number
/** 自定义类名 */
customClass?: string
/** 是否居中显示 */
center?: boolean
/** 动画类型 */
animation?: 'fade' | 'slide' | 'zoom' | 'none'
}
export interface ModalEmits {
/** 关闭弹窗事件 */
close: []
/** 确认事件 */
confirm: []
/** 取消事件 */
cancel: []
/** 遮罩点击事件 */
'mask-click': []
}
export interface ModalSlots {
/** 默认内容插槽 */
default: () => any
/** 主体内容插槽 */
body: () => any
/** 标题插槽 */
title: () => any
/** 头部插槽 */
header: () => any
/** 底部插槽 */
footer: () => any
}
+142
View File
@@ -0,0 +1,142 @@
<template>
<Teleport to=".app-content">
<Transition :name="animationName" :duration="duration" appear>
<div
v-if="visible"
class="overlay"
:class="[customClass]"
:style="overlayStyle"
@click="handleOverlayClick"
>
<div class="overlay-content" :class="[contentClass]" @click.stop>
<slot />
</div>
</div>
</Transition>
</Teleport>
</template>
<script lang="ts" setup>
import { computed, inject, provide } from 'vue'
import type { OverlayProps, OverlayEmits } from './types'
interface Props extends OverlayProps {}
// 全局层级管理
const OVERLAY_LEVEL_KEY = Symbol('overlay-level')
const props = withDefaults(defineProps<Props>(), {
visible: false,
background: 'rgba(0, 0, 0, 0.5)',
zIndex: undefined,
clickable: true,
customClass: '',
contentClass: '',
customStyle: () => ({}),
animation: 'fade',
duration: 300,
level: 0,
baseZIndex: 1000
})
const emit = defineEmits<OverlayEmits>()
// 获取父级层级
const parentLevel = inject(OVERLAY_LEVEL_KEY, 0)
// 计算当前层级
const currentLevel = computed(() => {
return props.level !== undefined ? props.level : parentLevel + 1
})
// 向子组件提供当前层级
provide(OVERLAY_LEVEL_KEY, currentLevel.value)
// 计算属性
const animationName = computed(() => {
if (props.animation === 'none') return ''
return `overlay-${props.animation}`
})
const overlayStyle = computed(() => {
// 计算 z-index:如果手动指定了 zIndex 则使用,否则根据当前层级自动计算
const calculatedZIndex =
props.zIndex !== undefined ? props.zIndex : props.baseZIndex + currentLevel.value * 10
return {
zIndex: calculatedZIndex,
backgroundColor: props.background,
...props.customStyle
}
})
// 事件处理
const handleOverlayClick = (event: MouseEvent) => {
emit('click', event)
if (props.clickable) {
emit('close')
}
}
</script>
<style scoped>
.overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
/* padding: 20px; */
}
.overlay-content {
position: relative;
max-width: 100%;
max-height: 100%;
}
/* 动画效果 */
.overlay-fade-enter-active,
.overlay-fade-leave-active {
transition: opacity v-bind('`${duration}ms`') ease;
}
.overlay-fade-enter-from,
.overlay-fade-leave-to {
opacity: 0;
}
.overlay-slide-enter-active,
.overlay-slide-leave-active {
transition: all v-bind('`${duration}ms`') ease;
}
.overlay-slide-enter-from {
opacity: 0;
transform: translateY(-50px);
}
.overlay-slide-leave-to {
opacity: 0;
transform: translateY(-50px);
}
.overlay-zoom-enter-active,
.overlay-zoom-leave-active {
transition: all v-bind('`${duration}ms`') ease;
}
.overlay-zoom-enter-from {
opacity: 0;
transform: scale(0.8);
}
.overlay-zoom-leave-to {
opacity: 0;
transform: scale(0.8);
}
</style>
+92
View File
@@ -0,0 +1,92 @@
# Overlay 组件
遮罩层组件,支持多层嵌套。
## 基本用法
```vue
<template>
<Overlay :visible="showModal" @close="showModal = false">
<div>内容</div>
</Overlay>
</template>
```
## 多层嵌套
组件支持多层嵌套,会自动管理 z-index 层级:
```vue
<template>
<!-- 第一层 Overlay -->
<Overlay :visible="showFirstModal" @close="showFirstModal = false">
<div>
<h2>第一层弹窗</h2>
<button @click="showSecondModal = true">打开第二层</button>
<!-- 第二层 Overlay -->
<Overlay :visible="showSecondModal" @close="showSecondModal = false">
<div>
<h2>第二层弹窗</h2>
<button @click="showThirdModal = true">打开第三层</button>
<!-- 第三层 Overlay -->
<Overlay :visible="showThirdModal" @close="showThirdModal = false">
<div>
<h2>第三层弹窗</h2>
<p>这是最顶层的弹窗</p>
</div>
</Overlay>
</div>
</Overlay>
</div>
</Overlay>
</template>
<script setup>
import { ref } from 'vue'
const showFirstModal = ref(false)
const showSecondModal = ref(false)
const showThirdModal = ref(false)
</script>
```
## 手动指定层级
如果需要手动控制层级,可以使用 `level` 或 `zIndex` 属性:
```vue
<template>
<!-- 手动指定层级 -->
<Overlay :visible="showModal" :level="5" @close="showModal = false">
<div>内容</div>
</Overlay>
<!-- 或者直接指定 z-index -->
<Overlay :visible="showModal" :z-index="2000" @close="showModal = false">
<div>内容</div>
</Overlay>
</template>
```
## 属性说明
| 属性 | 类型 | 默认值 | 说明 |
| ---------- | ------- | -------------------- | ------------------------------ |
| visible | boolean | false | 是否显示遮罩 |
| background | string | 'rgba(0, 0, 0, 0.5)' | 遮罩背景色 |
| zIndex | number | undefined | 手动指定 z-index |
| level | number | 0 | 嵌套层级,用于自动计算 z-index |
| baseZIndex | number | 1000 | 基础 z-index 值 |
| clickable | boolean | true | 是否可点击遮罩关闭 |
| animation | string | 'fade' | 动画类型 |
| duration | number | 300 | 动画持续时间 |
## 层级计算规则
- 如果没有手动指定 `zIndex`,组件会根据 `level` 自动计算:
- 计算公式:`baseZIndex + level * 10`
- 例如:baseZIndex=1000, level=1 → z-index=1010
- 嵌套时,子组件的 level 会自动递增
- 手动指定 `zIndex` 时,会忽略自动计算
+6
View File
@@ -0,0 +1,6 @@
/**
* Overlay 遮罩层组件导出
*/
export { default as Overlay } from './Overlay.vue'
export type { OverlayProps, OverlayEmits, OverlaySlots } from './types'
+39
View File
@@ -0,0 +1,39 @@
/**
* Overlay 遮罩层组件类型定义
*/
export interface OverlayProps {
/** 是否显示遮罩 */
visible: boolean
/** 遮罩背景色 */
background?: string
/** 遮罩层级 */
zIndex?: number
/** 是否可点击遮罩关闭 */
clickable?: boolean
/** 自定义类名 */
customClass?: string
/** 自定义样式 */
customStyle?: Record<string, string>
contentClass?: string
/** 动画类型 */
animation?: 'fade' | 'slide' | 'zoom' | 'none'
/** 动画持续时间(毫秒) */
duration?: number
/** 嵌套层级,用于自动计算 z-index */
level?: number
/** 基础 z-index 值,默认为 1000 */
baseZIndex?: number
}
export interface OverlayEmits {
/** 点击遮罩事件 */
click: [event: MouseEvent]
/** 关闭事件 */
close: []
}
export interface OverlaySlots {
/** 默认内容插槽 */
default: () => void
}
+77 -41
View File
@@ -10,28 +10,58 @@
<!-- 中间步骤指示器 -->
<div class="steps-section" v-if="currentStep > 0">
<!-- 标题区域 -->
<div class="absolute top-0 left-40">
<div class="absolute top-0 left-40" v-if="currentStep > 0">
<img
:src="getStaticImage(IMAGE_PATHS.PROGRESS_BAR.TITLE)"
alt="制作变焦镜-我的志愿者手记"
class="title-image"
/>
</div>
<div
v-for="(step, index) in steps.slice(0, 3)"
:key="index"
class="step-item"
:class="getStepStatus(index)"
>
<span class="step-text">
<img
:src="
props.currentPage === index ? steps[index].nameSelect : steps[index].nameselectNot
"
alt=""
/>
<img class="step-ellipsis" src="@/assets/images/midterm/进度装饰(未完成.png" alt="" />
</span>
<div class="flex">
<div
v-for="(step, index) in steps.slice(0, 3)"
:key="index"
class="step-item"
:class="getStepStatus(index)"
>
<span class="relative flex items-center justify-center">
<!-- <img
:src="currentStep === index ? steps[index].nameSelect : steps[index].nameselectNot"
alt=""
/> -->
<div class="flex items-center">
<span
:class="[
'font-bold text-4xl ',
currentStep === index + 1 ? 'text-[#fbbf24]' : 'text-white'
]"
>{{ step.name }}</span
>
<img v-if="canComplete" src="@/assets/images/midterm/完成.png" alt="" />
<img
v-else
:class="['ml-2', currentStep === index + 1 && 'filter-blue']"
:src="step.icon"
alt=""
/>
</div>
<template v-if="index < 2">
<img
v-if="canComplete"
class="step-ellipsis"
src="@/assets/images/midterm/进度装饰(已完成.png"
alt=""
/>
<img
v-else
class="step-ellipsis"
src="@/assets/images/midterm/进度装饰(未完成.png"
alt=""
/>
</template>
</span>
</div>
</div>
</div>
<div class="absolute top-0 left-40" v-else>
@@ -71,11 +101,6 @@ interface Props {
/** 当前步骤索引 (0-3) */
currentStep?: number
}
//
interface Props {
/** 当前步骤索引 (0-3) */
currentPage?: number
}
// 定义事件
interface Emits {
/** 点击完成按钮时触发 */
@@ -83,14 +108,13 @@ interface Emits {
}
const props = withDefaults(defineProps<Props>(), {
currentStep: 0,
currentPage: 0
currentStep: 0
})
const emit = defineEmits<Emits>()
// 计算属性:是否可以完成(当前在最后一步)
const canComplete = computed(() => props.currentStep === 3)
const canComplete = computed(() => props.currentStep > steps.length)
// 处理完成按钮点击
const handleComplete = () => {
@@ -102,16 +126,22 @@ const handleComplete = () => {
// 步骤配置
const steps = [
{
nameSelect: '/src/assets/images/midterm/前期准备-选中.png',
nameselectNot: '/src/assets/images/midterm/前期准备-未选中.png'
name: '前期准备',
icon: getStaticImage('midterm/准备图标.png'),
nameSelect: getStaticImage('midterm/前期准备-选中.png'),
nameselectNot: getStaticImage('midterm/前期准备-未选中.png')
},
{
nameSelect: '/src/assets/images/midterm/中期拍摄-选中.png',
nameselectNot: '/src/assets/images/midterm/中期拍摄-未选中.png'
name: '中期拍摄',
icon: getStaticImage('midterm/拍摄图标.png'),
nameSelect: getStaticImage('midterm/中期拍摄-选中.png'),
nameselectNot: getStaticImage('midterm/中期拍摄-未选中.png')
},
{
nameSelect: '/src/assets/images/midterm/后期剪辑-选中.png',
nameselectNot: '/src/assets/images/midterm/后期剪辑-未选中.png'
name: '后期剪辑',
icon: getStaticImage('midterm/剪辑图标.png'),
nameSelect: getStaticImage('midterm/后期剪辑-选中.png'),
nameselectNot: getStaticImage('midterm/后期剪辑-未选中.png')
}
]
@@ -138,8 +168,9 @@ const getStepStatus = (stepIndex: number) => {
.progress-bar {
position: relative;
display: flex;
justify-content: center;
align-items: center;
padding: 15px 20px;
padding-right: 160px;
height: 292px;
background-image: url('@/assets/images/components/ProgressBar-bg.png');
background-size: cover;
@@ -153,22 +184,22 @@ const getStepStatus = (stepIndex: number) => {
}
.steps-section {
width: 1600px;
width: 1400px;
display: flex;
align-items: center;
justify-content: space-between;
justify-content: center;
margin: 30px 20px 0;
gap: 15px;
}
.step-item {
padding-left: 300px;
display: flex;
/* .step-item { */
/* padding-left: 300px; */
/* display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
flex: 1;
}
gap: 5px; */
/* flex: 1; */
/* } */
.step-text {
/* font-size: 40px; */
@@ -178,12 +209,12 @@ const getStepStatus = (stepIndex: number) => {
white-space: nowrap;
text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
display: flex;
justify-content: center;
justify-content: start;
align-items: center;
}
.step-ellipsis {
padding-left: 17px;
padding: 0 40px;
}
.step-dots {
@@ -256,6 +287,11 @@ button:disabled {
object-fit: contain;
}
.filter-blue {
filter: brightness(0) saturate(100%) invert(79%) sepia(29%) saturate(1190%) hue-rotate(330deg)
brightness(102%) contrast(98%);
}
/* 响应式设计 */
@media (max-width: 768px) {
.progress-bar {
+6
View File
@@ -16,3 +16,9 @@ export * from './Switcher'
// 图片预览(函数式)
export * from './ImagePreview'
// 弹窗组件
export * from './Modal'
// 遮罩层组件
export * from './Overlay'
+8
View File
@@ -206,6 +206,14 @@ const routes: RouteRecordRaw[] = [
meta: {
title: '脚本撰写'
}
},
{
path: '/color',
name: 'Color',
component: () => import('@/views/afterditing/color.vue'),
meta: {
title: '调色'
}
}
]
+172
View File
@@ -0,0 +1,172 @@
<script lang="ts" setup>
import router from '@/router'
import { getBackgroundImage, getStaticImage, IMAGE_PATHS } from '@/utils'
import { ImgButton } from '@/components/Button'
import { Overlay } from '@/components/Overlay'
import { computed, ref } from 'vue'
const selected = ref<number | undefined>()
const showColorBar = ref(false)
const btnState = ref(false)
const screenshot = ref()
const showModal = ref(false)
const colorBarList = ref([
{
id: 1,
name: '智能调色',
image: getStaticImage('afterditing/color/智能调色.png'),
Screenshot: getStaticImage('afterditing/color/卡片-智能调色.png')
},
{
id: 2,
name: '滤镜-冬日物语',
image: getStaticImage('afterditing/color/冬日物语.jpg'),
Screenshot: getStaticImage('afterditing/color/卡片-冬日物语.png')
},
{
id: 3,
name: '滤镜-日落电影',
image: getStaticImage('afterditing/color/落日余晖.jpg'),
Screenshot: getStaticImage('afterditing/color/卡片-落日余晖.png')
}
])
const selectedImage = computed(() => {
return !btnState.value && colorBarList.value.find(v => v.id === selected.value)?.image
})
const changeOriginalImgae = () => {
btnState.value = !btnState.value
}
const handleSave = () => {
screenshot.value = colorBarList.value.find(v => v.id === selected.value)?.Screenshot
showModal.value = true
}
const handleModalClose = () => {
showModal.value = false
screenshot.value = null
}
const handleTryOther = () => {
showModal.value = false
}
const handleFinish = () => {
router.push({
name: 'afterditing',
query: { step: 4 }
})
}
const handleClose = () => {
router.back()
}
const changeColor = (item: { id: number; name: string }) => {
selected.value = item.id
}
</script>
<template>
<div class="w-full h-full relative">
<!-- 返回 -->
<ImgButton
class="absolute right-0 top-0 z-10"
:image="IMAGE_PATHS.COMPONENTS.BACK"
@click="handleClose"
/>
<!-- 背景图片-center -->
<div
class="absolute inset-0 bg-cover bg-center bg-no-repeat"
:style="{
backgroundImage: `url(${selectedImage || getStaticImage('afterditing/color/原图')})`
}"
></div>
<!-- 分段控制器 -->
<div class="absolute top-10 left-1/2 transform -translate-x-1/2 z-20" v-if="!showColorBar">
<div
class="flex justify-between w-[800px] bg-white/60 backdrop-blur-sm border-[3px] border-white rounded-[50px] px-4 py-4 text-xl font-bold tracking-[4px]"
>
<!-- 后期制作选项 -->
<button :class="['px-12 py-3 rounded-[50px] bg-teal-500 text-white shadow-lg']">
后期制作
</button>
<!-- 智能调色和滤镜选项 -->
<button :class="['px-4 rounded-[50px] text-[#2F5A84] text-2xl']">智能调色和滤镜</button>
</div>
</div>
<!-- title -->
<div
class="absolute top-0 left-0 w-[332px] h-[153px] bg-cover bg-center bg-no-repeat"
:style="{
backgroundImage: showColorBar
? getBackgroundImage('afterditing/color/标题-调色实践')
: getBackgroundImage('afterditing/color/标题-调色')
}"
></div>
<!-- 调色栏 -->
<div class="absolute bottom-0 flex justify-center w-full" v-if="showColorBar">
<div class="flex">
<div
v-for="item in colorBarList"
:key="item.id"
:style="{
backgroundImage:
selected == item.id
? getBackgroundImage('afterditing/color/按钮-调色选中')
: getBackgroundImage('afterditing/color/按钮-调色未选中')
}"
class="w-[449px] h-[170px] text-white text-3xl font-bold flex items-center justify-center cursor-pointer bg-no-repeat bg-cover"
@click="changeColor(item)"
>
<span>{{ item.name }}</span>
</div>
</div>
<ImgButton
class="flex-[0_0_200px]"
@click="changeOriginalImgae"
:image="
btnState ? 'afterditing/color/开启对比 - 可开启' : 'afterditing/color/开启对比 - 不可开启'
"
></ImgButton>
</div>
<!-- 保存 -->
<ImgButton
v-if="selected"
class="absolute right-0 top-1/2 -translate-y-1/2 z-10"
image="afterditing/color/按钮-保存"
@click="handleSave"
/>
<!-- 调色栏显示隐藏按钮 -->
<ImgButton
v-if="!showColorBar"
class="absolute bottom-0 right-0"
image="afterditing/color/调色实践"
@click="showColorBar = true"
></ImgButton>
<!-- 保存图片弹窗 -->
<Overlay :visible="showModal" @close="handleModalClose">
<div class="relative w-[1000px] h-[600px] flex items-center justify-center">
<img :src="screenshot" alt="调色结果" class="max-w-full max-h-full object-contain" />
<!-- 操作按钮 -->
<div class="absolute bottom-1/2 -left-1/3 translate-y-1/2">
<ImgButton image="afterditing/color/按钮-试试其他调色" @click="handleTryOther" />
</div>
<div class="absolute bottom-1/2 -right-1/3 translate-y-1/2">
<ImgButton image="afterditing/color/按钮-结束调色实践" @click="handleFinish" />
</div>
</div>
</Overlay>
</div>
</template>
+15 -9
View File
@@ -1,17 +1,19 @@
<script lang="tsx" setup>
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
import { getBackgroundImage, getStaticImage, IMAGE_PATHS } from '@/utils'
import { ImgButton } from '@/components/Button'
import { ref } from 'vue'
import { onMounted, ref } from 'vue'
import { ProgressBar } from '@/components'
import { useRouter } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
const router = useRouter()
const currentStep = ref(1)
const currentPage = ref(2)
const route = useRoute()
// 当前步骤
const currentStep = ref(3)
const highlightShow = ref(true)
const handleComplete = () => {
console.log('完成前置条件')
window.open('http://101.132.152.157/dspdr/vlog.html', '_self')
}
const handleStepChange = (step: number) => {
@@ -27,6 +29,11 @@ const navigateTo = (routeName: string) => {
console.log('任务取景按钮点击')
router.push({ name: routeName })
}
onMounted(() => {
// 页面加载时的逻辑
currentStep.value = Number(route.query.step) || 3
})
</script>
<template>
@@ -58,7 +65,7 @@ const navigateTo = (routeName: string) => {
<!-- 中期拍摄底板 -->
<div v-if="highlightShow" class="absolute right-90 ml-[135px]" style="z-index: 998">
<ImgButton :image="IMAGE_PATHS.AFTEREDITING.MIDTERM" />
<img :src="getStaticImage(IMAGE_PATHS.AFTEREDITING.MIDTERM)" />
</div>
<!-- 进度百分比 -->
@@ -77,7 +84,7 @@ const navigateTo = (routeName: string) => {
<!-- 后期准备按钮文字 -->
<div
v-if="highlightShow"
class="absolute left-[21%] top-[9%] -translate-x-1/2"
class="absolute left-[21%] top-[9%] -translate-x-1/2 space-y-[-30px]"
style="z-index: 998; margin-top: 120px"
>
<ImgButton
@@ -87,7 +94,7 @@ const navigateTo = (routeName: string) => {
/>
<ImgButton
:image="IMAGE_PATHS.AFTEREDITING.ADJUSTMENTCOLOR"
@click="navigateTo('adjustmentColor')"
@click="navigateTo('Color')"
class="ml-[40px]"
/>
</div>
@@ -115,7 +122,6 @@ const navigateTo = (routeName: string) => {
:current-step="currentStep"
@complete="handleComplete"
@step-change="handleStepChange"
:current-page="currentPage"
/>
</div>
</div>
+1 -1
View File
@@ -90,7 +90,7 @@ onMounted(() => {
<!-- 电视机 -->
<div
class="absolute w-[765px] h-[768px] right-0 top-0 z-[5] transition-opacity duration-200 cursor-pointer"
class="absolute w-[765px] h-[768px] right-0 top-0 z-[5] transition-all duration-300 hover:scale-105 hover:brightness-110 cursor-pointer"
:class="{ 'opacity-50': isImageLoading }"
:style="{ backgroundImage: selectedImage }"
@click.stop="handleClick"
@@ -1,7 +1,11 @@
<template>
<div
:style="{ backgroundImage: getBackgroundImage(currentImage) }"
:class="['module-btn', module.className, { selected: isSelected }]"
:class="[
'module-btn transition-all duration-300 hover:scale-105 hover:brightness-110',
module.className,
{ selected: isSelected }
]"
>
<div :class="['btn-mask', module.maskConfig.className]" @click="$emit('click')"></div>
</div>
@@ -54,7 +58,7 @@ const currentImage = computed(() => {
transition:
transform 0.2s ease,
z-index 0.2s ease;
z-index: 1;
z-index: 8;
pointer-events: none;
}
@@ -72,7 +72,14 @@ const moduleConfigs: ModuleConfig[] = [
selectedImage: IMAGE_PATHS.ACTION.SELECTED_BTN2,
className: 'w-[1087px] h-[822px] left-[calc(50%+50px)] -translate-x-1/2 -bottom-4',
maskConfig: {
className: 'left-[16em] bottom-[50px] w-[500px] h-[100px]',
/**
* width: 200px;
height: 173px;
background-color: #fbbf24;
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
*/
className:
'left-[6em] bottom-[60px] w-[850px] h-[153px] bg-transparent [clip-path:polygon(50%_0%,_0%_100%,_100%_100%)]',
position: 'left-[16em] bottom-[50px]',
size: 'w-[500px] h-[100px]',
transform: ''
@@ -84,7 +91,7 @@ const moduleConfigs: ModuleConfig[] = [
selectedImage: IMAGE_PATHS.ACTION.SELECTED_BTN3,
className: 'w-[943px] h-[822px] right-[320px] -bottom-4',
maskConfig: {
className: 'right-[0em] bottom-[200px] w-[420px] h-[100px] rotate-[15deg]',
className: 'right-[0em] bottom-[100px] w-[520px] h-[400px] rotate-[19deg]',
position: 'right-[0em] bottom-[200px]',
size: 'w-[420px] h-[100px]',
transform: 'rotate-[15deg]'
+286 -83
View File
@@ -4,89 +4,109 @@
<div
class="absolute inset-0 bg-cover bg-center bg-no-repeat equipment-bg"
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.EQUIPMENT.BG) }"
>
<div class="equipment-bar">
<img src="@/assets/images/equipment/侧边导航栏.png" alt="" :hidden="hiddenbar" />
<div class="equipment-item" :hidden="hiddenbar">
<span>
<img src="@/assets/images/equipment/选中按钮.png" alt="" />
<img src="@/assets/images/equipment/手机-亮.png" alt="" />
</span>
<div>
<img src="@/assets/images/equipment/设备列表合图.png" alt="" />
</div>
</div>
<!-- 设备准备按钮 -->
<div class="equipment-bt">
<img src="@/assets/images/equipment/按钮选中-设备准备.png" alt="" />
</div>
<div
:class="hiddenbar ? 'equipment-unfold1' : 'equipment-unfold2'"
@click="hiddenbarclick()"
>
<img
:src="
hiddenbar
? getStaticImage('equipment/按钮-展开.png')
: getStaticImage('equipment/按钮-收缩.png')
"
alt=""
/>
</div>
</div>
<div class="equipment-layout">
<div class="equipment-home">
<div
class="equipment-leftbutton"
@click="prevPhone"
:style="{ visibility: currentIndex > 0 ? 'visible' : 'hidden' }"
>
<img src="@/assets/images/equipment/按钮-左滑.png" alt="" />
</div>
<div class="equipment-phoneImg">
<img :src="phoneList[currentIndex].phoneImg" alt="" />
</div>
<div
class="equipment-rightbutton"
@click="nextPhone"
:style="{ visibility: currentIndex < phoneList.length - 1 ? 'visible' : 'hidden' }"
>
<img src="@/assets/images/equipment/按钮-右滑.png" alt="" />
</div>
</div>
<div class="equipment-purpose">
<div class="plate">
<img src="@/assets/images/equipment/浮空屏.png" alt="" />
</div>
></div>
<div class="title">
<img :src="platetitleList[currentIndex].title" alt="" />
</div>
<div class="plate-content">
<div class="text">
<img :src="platetextList[currentIndex].text" alt="" />
<div class="equipment-bar">
<img src="@/assets/images/equipment/侧边导航栏.png" alt="" :hidden="hiddenbar" />
<!-- 内容列表 -->
<div class="equipment-item" :hidden="hiddenbar">
<div class="menu-list">
<div
v-for="(item, index) in menuItems"
:key="item.id"
class="menu-item"
:class="{
'menu-item--active': selectedMenuIndex === index,
'menu-item--disabled': item.disabled
}"
@click="selectMenuItem(index, item)"
>
<div
class="menu-item__indicator"
v-if="selectedMenuIndex === index && !item.disabled"
></div>
<span class="menu-item__text">{{ item.name }}</span>
<div class="menu-item__status" v-if="item.disabled">
<!-- <span class="status-text">未解锁</span> -->
</div>
</div>
</div>
</div>
<div class="shooting-return">
<img src="@/assets/images/shooting/返回.png" alt="" @click="back" />
</div>
<!-- 引导步骤 -->
<GuideSteps
:steps="steps"
:highlight-selector="currentHighlight"
:highlight-padding="12"
:highlight-radius="20"
@step-change="handleStepChange"
position-offset-y="85%"
>
<GuideStepsItem>
<img src="@/assets/images/equipment/设备准备引导1.png" alt="" />
</GuideStepsItem>
</GuideSteps>
<!-- 设备准备按钮 -->
<div class="equipment-bt">
<img src="@/assets/images/equipment/按钮选中-设备准备.png" alt="" />
</div>
<div :class="hiddenbar ? 'equipment-unfold1' : 'equipment-unfold2'" @click="hiddenbarclick()">
<img
:src="
hiddenbar
? getStaticImage('equipment/按钮-展开.png')
: getStaticImage('equipment/按钮-收缩.png')
"
alt=""
/>
</div>
</div>
<div class="equipment-layout">
<div class="equipment-home">
<div
class="equipment-leftbutton"
@click="prevPhone"
:style="{ visibility: currentIndex > 0 ? 'visible' : 'hidden' }"
>
<img src="@/assets/images/equipment/按钮-左滑.png" alt="" />
</div>
<div class="equipment-phoneImg">
<img :src="phoneList[currentIndex].phoneImg" alt="" />
</div>
<div
class="equipment-rightbutton"
@click="nextPhone"
:style="{ visibility: currentIndex < phoneList.length - 1 ? 'visible' : 'hidden' }"
>
<img src="@/assets/images/equipment/按钮-右滑.png" alt="" />
</div>
</div>
<div class="equipment-purpose">
<div class="plate">
<img src="@/assets/images/equipment/浮空屏.png" alt="" />
</div>
<div class="title">
<img :src="platetitleList[currentIndex].title" alt="" />
</div>
<div class="plate-content">
<div class="text">
<img :src="platetextList[currentIndex].text" alt="" />
</div>
</div>
</div>
</div>
<div class="absolute right-0 top-0">
<img src="@/assets/images/shooting/返回.png" alt="" @click="back" />
</div>
<!-- 调试按钮组 -->
<!-- <div class="debug-controls">
<button @click="enableAllMenuItems" class="debug-btn">启用全部</button>
<button @click="disableAllMenuItems" class="debug-btn">禁用全部</button>
<button @click="toggleMenuItem('bluetooth-remote')" class="debug-btn">切换蓝牙遥控器</button>
</div> -->
<!-- 引导步骤 -->
<GuideSteps
:steps="steps"
:highlight-selector="currentHighlight"
:highlight-padding="12"
:highlight-radius="20"
@step-change="handleStepChange"
position-offset-y="85%"
>
<GuideStepsItem>
<img src="@/assets/images/equipment/设备准备引导1.png" alt="" />
</GuideStepsItem>
</GuideSteps>
</div>
</template>
<script lang="tsx" setup>
@@ -108,6 +128,17 @@ const steps = [
const stepIndex = ref(0)
const hiddenbar = ref(false)
const currentIndex = ref(0) // 当前显示的图片索引
const selectedMenuIndex = ref(0) // 当前选中的菜单项索引
// 菜单项数据
const menuItems = ref([
{ id: 'phone', name: '手机', disabled: false },
{ id: 'phone-stand', name: '手机支架', disabled: true },
{ id: 'bluetooth-remote', name: '蓝牙遥控器', disabled: true },
{ id: 'stabilizer', name: '稳定器', disabled: true },
{ id: 'props', name: '常用道具', disabled: true },
{ id: 'phone-lens', name: '手机辅助箱头', disabled: true }
])
const phoneList = ref([
{ phoneImg: getStaticImage('equipment/设备-手机1.png') },
@@ -127,6 +158,58 @@ const hiddenbarclick = () => {
hiddenbar.value = !hiddenbar.value
}
// 选择菜单项
const selectMenuItem = (index: number, item: { id: string; name: string; disabled: boolean }) => {
if (item.disabled) {
console.log(`菜单项 "${item.name}" 已被禁用`)
return
}
selectedMenuIndex.value = index
}
// 启用菜单项
const enableMenuItem = (id: string) => {
const item = menuItems.value.find(item => item.id === id)
if (item) {
item.disabled = false
console.log(`菜单项 "${item.name}" 已启用`)
}
}
// 禁用菜单项
const disableMenuItem = (id: string) => {
const item = menuItems.value.find(item => item.id === id)
if (item) {
item.disabled = true
console.log(`菜单项 "${item.name}" 已禁用`)
}
}
// 切换菜单项状态
const toggleMenuItem = (id: string) => {
const item = menuItems.value.find(item => item.id === id)
if (item) {
item.disabled = !item.disabled
console.log(`菜单项 "${item.name}" 状态已切换为: ${item.disabled ? '禁用' : '启用'}`)
}
}
// 启用所有菜单项
const enableAllMenuItems = () => {
menuItems.value.forEach(item => {
item.disabled = false
})
console.log('所有菜单项已启用')
}
// 禁用所有菜单项
const disableAllMenuItems = () => {
menuItems.value.forEach(item => {
item.disabled = true
})
console.log('所有菜单项已禁用')
}
// 下一张图片
const nextPhone = () => {
if (currentIndex.value < phoneList.value.length - 1) {
@@ -156,14 +239,11 @@ const currentHighlight = computed(() =>
</script>
<style lang="less">
.equipment-index {
position: relative;
width: 100%;
height: 100%;
}
.equipment-bg {
// display: flex;
}
.equipment-layout {
position: relative;
width: 100%;
@@ -221,8 +301,105 @@ const currentHighlight = computed(() =>
padding-top: 220px;
padding-left: 20px;
span {
.menu-list {
display: flex;
flex-direction: column;
gap: 8px;
//background: linear-gradient(135deg, #1a2a4a 0%, #0f1a2e 100%);
border-radius: 12px;
padding: 16px 12px;
// box-shadow:
// 0 0 20px rgba(64, 150, 255, 0.3),
// inset 0 0 20px rgba(64, 150, 255, 0.1);
// backdrop-filter: blur(10px);
}
.menu-item {
position: relative;
display: flex;
align-items: center;
padding: 24px 32px;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
min-height: 44px;
&:hover {
// background: rgba(64, 150, 255, 0.1);
transform: translateX(4px);
}
&--active {
// background: rgba(64, 150, 255, 0.2);
// box-shadow: 0 0 15px rgba(64, 150, 255, 0.4);
.menu-item__text {
color: #ffffff;
text-shadow:
0 0 10px rgba(64, 150, 255, 0.8),
0 0 20px rgba(64, 150, 255, 0.6),
0 0 30px rgba(64, 150, 255, 0.4);
font-weight: 600;
}
}
&__indicator {
position: absolute;
left: 0px;
top: 45%;
transform: translateY(-50%);
width: 6px;
height: 38px;
background: #ffffff;
border-radius: 2px;
box-shadow: 0 0 16px rgba(255, 255, 255, 0.8);
}
&__text {
color: #64a5ff;
font-size: 30px;
font-weight: 800;
text-shadow: 0 0 8px rgba(64, 150, 255, 0.6);
transition: all 0.3s ease;
user-select: none;
}
&__status {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
.status-text {
font-size: 12px;
color: #999;
background: rgba(0, 0, 0, 0.6);
padding: 2px 8px;
border-radius: 4px;
border: 1px solid #333;
}
}
// 禁用状态样式
&--disabled {
opacity: 0.5;
cursor: not-allowed;
pointer-events: auto; // 保持可点击以显示禁用提示
&:hover {
transform: none;
// background: rgba(255, 0, 0, 0.1);
}
.menu-item__text {
color: #666;
text-shadow: none;
}
.menu-item__indicator {
display: none;
}
}
}
}
@@ -307,8 +484,8 @@ const currentHighlight = computed(() =>
.plate-content {
position: absolute;
bottom: 144px;
left: 1235px;
top: 144px;
right: 100px;
width: 600px;
height: 797px;
overflow: hidden;
@@ -352,4 +529,30 @@ const currentHighlight = computed(() =>
}
}
}
// 调试控制按钮样式
.debug-controls {
position: absolute;
top: 20px;
left: 20px;
display: flex;
flex-direction: column;
gap: 8px;
z-index: 1000;
.debug-btn {
background: rgba(0, 0, 0, 0.8);
color: white;
border: 1px solid #333;
padding: 6px 12px;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
transition: background 0.3s ease;
&:hover {
background: rgba(0, 0, 0, 0.9);
}
}
}
</style>
+3 -5
View File
@@ -1,5 +1,5 @@
<script lang="tsx" setup>
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
import { getBackgroundImage, getStaticImage, IMAGE_PATHS } from '@/utils'
import { ImgButton } from '@/components/Button'
import { ref } from 'vue'
@@ -8,7 +8,7 @@ import { useRouter } from 'vue-router'
const router = useRouter()
const currentStep = ref(1)
const currentStep = ref(2)
const handleComplete = () => {
console.log('完成前置条件')
@@ -34,7 +34,6 @@ const shooting = () => {
// 跳转实地取景
router.push({ name: 'shooting' })
}
const currentPage = ref(1)
const highlightShow = ref(true)
</script>
@@ -66,7 +65,7 @@ const highlightShow = ref(true)
</div>
<!-- 中期拍摄底板 -->
<div v-if="highlightShow" class="absolute right-90 ml-[135px]" style="z-index: 998">
<ImgButton :image="IMAGE_PATHS.VLOG.Midterm" />
<img :src="getStaticImage(IMAGE_PATHS.VLOG.Midterm)" />
</div>
<!-- 进度百分比 -->
<div
@@ -116,7 +115,6 @@ const highlightShow = ref(true)
<div class="absolute bottom-0 w-full bright">
<ProgressBar
:current-step="currentStep"
:current-page="currentPage"
@complete="handleComplete"
@step-change="handleStepChange"
/>
+219 -4
View File
@@ -1,9 +1,65 @@
<script lang="ts" setup>
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
import shootingtitle from '@/assets/images/shooting/标题-实地取景.png'
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { GuideSteps, GuideStepsItem } from '@/components/Guide'
import { Overlay } from '@/components/Overlay'
import { ImgButton } from '@/components/Button'
import { getBackgroundImage, getStaticImage, IMAGE_PATHS } from '@/utils'
import shootingtitle from '@/assets/images/shooting/标题-实地取景.png'
import videoSrc from '/video/新手导航_九种构图法.mp4'
type Btn = {
key: string
name: string
image: string
desc: string
}
const router = useRouter()
const showModal = ref(false)
const showModal2 = ref(false)
const showModal3 = ref(false)
const currentItem = ref<Btn>({
key: '',
name: '',
image: '',
desc: ''
})
const showBoxLine = ref(false)
const btnList = ref<Btn[]>([
{
key: '1',
name: '居中构图',
image: 'shooting/居中构图底板',
desc: '居中构图就是主体放在画面中心,让画面更稳定主体更突出,拍摄时需避免选取杂乱的背景,可以用大光圈或者长焦距让背景虚化使主体从背景中跳出来适合拍摄单个主体,操作比较简单,非常适合新手使用'
},
{
key: '2',
name: '三分法构图',
image: 'shooting/三分法构图底板',
desc: '三分法构图又称九宫格构图,就是把拍摄主体置于九宫格的任意一条三分位置,三分构图法是比较常见的构图法可以视觉上让整体画面更加生动,使用三分构图法拍摄人像时,尽量占据画面的下2格比例和重心会更协调'
},
{
key: '3',
name: '对角线构图',
image: 'shooting/对角线构图底板',
desc: '对角线构图属于引导线构图的一种,所以也是借助引导线的视觉引导效果来突出强调主体。另外对角线构图在画面中制造出对角线的走向即可。'
}
])
const handleModalClose = () => {
showModal.value = false
}
const handleClick = (item: any) => {
currentItem.value = item
showModal2.value = true
}
const handleClickA = () => {
// 跳转设备准备
router.push({ name: 'filmingLocation-a' })
@@ -37,12 +93,171 @@ const back = () => {
<img src="@/assets/images/shooting/按钮-取景地B.png" alt="" @click="handleClickB" />
</div>
<div class="shooting-composition">
<img src="@/assets/images/shooting/构图指南.png" alt="" />
<img
class="mybutton cursor-pointer"
src="@/assets/images/shooting/构图指南.png"
alt=""
@click="showModal = true"
/>
</div>
</div>
<!-- 引导步骤 -->
<GuideSteps
:highlight-selector="'.mybutton'"
:highlight-padding="12"
:highlight-radius="20"
position-offset-y="70%"
>
<GuideStepsItem> 在走进拍摄场景之前,我们先来查看一下构图指南。 </GuideStepsItem>
</GuideSteps>
<!-- 保存图片弹窗 -->
<Overlay
:visible="showModal"
:clickable="false"
:customStyle="{
backgroundImage: getBackgroundImage('shooting/构图指南底图')
}"
customClass="inset-0 bg-cover bg-center bg-no-repeat"
contentClass="relative w-full h-full"
>
<!-- 返回 -->
<ImgButton
class="absolute right-0 top-0 z-10"
:image="IMAGE_PATHS.COMPONENTS.BACK"
@click="handleModalClose"
/>
<!-- 新手导航视频 -->
<ImgButton
class="absolute left-28 top-[calc(50%-40px)] -translate-y-1/2"
image="shooting/新手导航-视频回顾"
@click="showModal3 = true"
/>
<div class="absolute top-[30%] right-10">
<ImgButton
v-for="item in btnList"
:key="item.key"
:image="item.image"
@click="handleClick(item)"
/>
</div>
<!-- 知识卡片 -->
<Overlay :visible="showModal2" :clickable="false">
<div
class="relative w-[1752px] h-[932px]"
:style="{
backgroundImage: getBackgroundImage('shooting/知识卡片底板')
}"
>
<div
class="absolute top-4 left-1/2 -translate-x-1/2 text-[45px] text-white font-bold tracking-[2px] drop-shadow-[2px_2px_4px_rgba(0,0,139,0.8)]"
>
{{ currentItem.name }}
</div>
<div
class="absolute w-full h-[38px] top-32 left-1/2 -translate-x-1/2 bg-no-repeat bg-center"
:style="{
backgroundImage: getBackgroundImage('shooting/文案1')
}"
></div>
<div
class="absolute w-[191px] h-[131px] top-[30px] left-[120px] bg-no-repeat bg-center"
:style="{
backgroundImage: getBackgroundImage('shooting/示意图-三分法')
}"
></div>
<div class="absolute top-[calc(50%-30px)] left-1/2 -translate-x-1/2 -translate-y-1/2">
<ImgButton
class="absolute right-6 top-6 z-10"
:image="showBoxLine ? 'shooting/辅助线开' : 'shooting/辅助线关'"
@click="showBoxLine = !showBoxLine"
/>
<div class="relative">
<img :src="getStaticImage('shooting/图片待定1')" alt="" />
<!-- 构图辅助线 -->
<div v-if="showBoxLine" class="absolute inset-0 pointer-events-none p-[18px]">
<div class="relative w-full h-full overflow-hidden">
<!-- 居中构图 - 十字线 -->
<div v-if="currentItem.key === '1'" class="absolute inset-0">
<!-- 垂直中心线 -->
<div
class="absolute top-0 left-1/2 w-0.5 h-full bg-white opacity-80 -translate-x-1/2"
></div>
<!-- 水平中心线 -->
<div
class="absolute left-0 top-1/2 w-full h-0.5 bg-white opacity-80 -translate-y-1/2"
></div>
</div>
<!-- 三分法构图 - 九宫格线 -->
<div v-else-if="currentItem.key === '2'" class="absolute inset-0">
<!-- 垂直三分线 -->
<div
class="absolute top-0 left-1/3 w-0.5 h-full bg-white opacity-80 -translate-x-1/2"
></div>
<div
class="absolute top-0 left-2/3 w-0.5 h-full bg-white opacity-80 -translate-x-1/2"
></div>
<!-- 水平三分线 -->
<div
class="absolute left-0 top-1/3 w-full h-0.5 bg-white opacity-80 -translate-y-1/2"
></div>
<div
class="absolute left-0 top-2/3 w-full h-0.5 bg-white opacity-80 -translate-y-1/2"
></div>
</div>
<!-- 对角线构图 - 对角线 -->
<div v-else-if="currentItem.key === '3'" class="absolute inset-0">
<!-- 对角线:从左上到右下 -->
<div class="absolute top-0 left-0 w-full h-full">
<div
class="absolute top-0 left-0 h-0.5 bg-white opacity-80"
style="width: 141.42%; transform: rotate(33deg); transform-origin: left top"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="absolute w-full px-20 bottom-32 left-1/2 -translate-x-1/2 text-[#395E66] text-3xl font-bold indent-14 leading-[50px]"
>
{{ currentItem.desc }}
</div>
<!-- 返回 -->
<ImgButton
class="absolute right-2 top-4 translate-x-1/2 -translate-y-1/2 z-10"
:image="IMAGE_PATHS.COMPONENTS.CLOSE"
@click="showModal2 = false"
/>
</div>
</Overlay>
<!-- 视频 -->
<Overlay :visible="showModal3" :clickable="false">
<video :src="videoSrc" controls></video>
<!-- 返回 -->
<ImgButton
class="absolute right-0 top-0 z-10"
:image="IMAGE_PATHS.COMPONENTS.CLOSE"
@click="showModal3 = false"
/>
</Overlay>
</Overlay>
</div>
</template>
<style lang="less">
<style lang="less" scoped>
.shooting-bg {
position: absolute;
+5 -6
View File
@@ -1,12 +1,12 @@
<script lang="tsx" setup>
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
import { getBackgroundImage, getStaticImage, IMAGE_PATHS } from '@/utils'
import { ImgButton } from '@/components/Button'
import { ref, computed } from 'vue'
import { ProgressBar } from '@/components'
import { useRouter } from 'vue-router'
import { GuideSteps } from '@/components/Guide'
import { GuideSteps, GuideStepsItem } from '@/components/Guide'
const steps = [
{
id: 'step1',
@@ -87,11 +87,11 @@ const currentPage = ref(0)
class="absolute left-24 top-24"
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.TASK_CAMERA) }"
>
<ImgButton :image="IMAGE_PATHS.VLOG.TASK_BTN" @click="handleWorkClick" />
<ImgButton :image="IMAGE_PATHS.VLOG.TASK_BTN_OK" />
</div>
<!-- 前期准备底板 -->
<div v-if="highlightShow" class="absolute right-90 ml-[135px]">
<ImgButton :image="IMAGE_PATHS.VLOG.PREPARE" />
<img :src="getStaticImage(IMAGE_PATHS.VLOG.PREPARE)" />
</div>
<!-- 脚本撰写按钮 -->
<div v-if="highlightShow" class="absolute left-[13%] top-1/3">
@@ -141,7 +141,6 @@ const currentPage = ref(0)
<div class="absolute bottom-0 w-full">
<ProgressBar
:current-step="currentStep"
:current-page="currentPage"
@complete="handleComplete"
@step-change="handleStepChange"
/>
@@ -163,7 +162,7 @@ const currentPage = ref(0)
v-if="highlightShow"
class="absolute right-0 top-0"
style="z-index: 998; cursor: pointer"
@click="highlightShow = false"
@click="router.back()"
>
<img src="@/assets/images/midterm/叉.png" alt="" />
</div>
+2 -9
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { IMAGE_PATHS } from '@/utils'
import { IMAGE_PATHS, getStaticImage } from '@/utils'
import { ImgButton } from '@/components/Button'
import { useRouter } from 'vue-router'
import { ref } from 'vue'
@@ -45,14 +45,7 @@ const hiddenbarclick = () => {
<ImgButton :image="IMAGE_PATHS.VLOG.SCRIPTINGTITLE" />
</div>
<div :class="hiddenbar ? 'writing-unfold1' : 'writing-unfold2'" @click="hiddenbarclick()">
<img
:src="
hiddenbar
? '/src/assets/images/equipment/按钮-展开.png'
: '/src/assets/images/equipment/按钮-收缩.png'
"
alt=""
/>
<ImgButton :image="hiddenbar ? 'equipment/按钮-展开' : 'equipment/按钮-收缩'" />
</div>
</div>
+22 -9
View File
@@ -5,7 +5,7 @@
class="absolute inset-0 bg-cover bg-center bg-no-repeat writing-bg"
:style="{ backgroundImage: getBackgroundImage(IMAGE_PATHS.VLOG.BIAOGEBG) }"
>
<div v-if="showDoubao">
<div>
<div class="writing-title">
<img src="@/assets/images/vlog/标题栏-中间.png" alt="" class="titledibu" />
<img
@@ -26,7 +26,7 @@
</div>
</div>
<div v-else>
<!-- <div v-else>
<div class="writing-title">
<img src="@/assets/images/vlog/标题栏-中间.png" alt="" class="titledibu" />
<img
@@ -46,10 +46,11 @@
<div class="shooting-return">
<img src="@/assets/images/shooting/返回.png" alt="" @click="back" />
</div>
</div>
</div> -->
<!-- 引导步骤 -->
<GuideSteps
v-if="showDoubao"
:steps="steps"
:highlight-selector="currentHighlight"
:highlight-padding="12"
@@ -66,10 +67,12 @@
</div>
</template>
<script lang="tsx" setup>
import { getBackgroundImage, IMAGE_PATHS } from '@/utils'
import { getBackgroundImage, getStaticImage, IMAGE_PATHS } from '@/utils'
import { GuideSteps, GuideStepsItem } from '@/components/Guide'
import { ref, computed } from 'vue'
import { ref, computed, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { ImagePreview } from '@/components'
import { useScale } from '@/composables/useScale'
const router = useRouter()
const showDoubao = ref(false)
const steps = [
@@ -81,9 +84,6 @@ const stepIndex = ref(1)
const back = () => {
router.back()
}
const deletebiaoge = () => {
showDoubao.value = true
}
interface SimpleStep {
id: string
@@ -101,8 +101,21 @@ const currentHighlight = computed(() =>
const clickdoubao = () => {
router.push('midterm')
}
const { scale, offsetX, offsetY } = useScale()
onMounted(() => {
ImagePreview({
images: [getStaticImage('vlog/脚本切图/我的志愿者手记拍摄脚本.png')],
startIndex: 0,
maskClosable: true,
getScaleMetrics: () => ({ scale: scale.value, offsetX: offsetX.value, offsetY: offsetY.value }),
onClose: () => {
showDoubao.value = true
}
})
})
</script>
<style lang="less">
<style lang="less" scoped>
.writing-index {
width: 100%;
height: 100%;
+4 -6
View File
@@ -13,9 +13,10 @@
class="titletext"
/>
</div>
<div class="shooting-return">
<video :src="fourth" controls></video>
<!-- <div class="shooting-return">
<img src="@/assets/images/shooting/返回.png" alt="" @click="back" />
</div>
</div> -->
<!-- 引导步骤 -->
<!-- <GuideSteps :steps="steps" :highlight-selector="currentHighlight" :highlight-padding="12"
:highlight-radius="20" @step-change="handleStepChange" position-offset-y="85%" hidden:false>
@@ -32,16 +33,13 @@ import { GuideSteps, GuideStepsItem } from '@/components/Guide'
import { ref, computed } from 'vue'
import { ImgButton } from '@/components/Button'
import { useRouter } from 'vue-router'
import fourth from '/video/Vlog模块_任务取景框_专业剖析_脚本策划.mp4'
const router = useRouter()
const back = () => {
// 跳转设备准备
router.back()
}
const steps = [
{ id: 'step1', content: '先认识 Vlog:点击右侧「1.vlog初识」继续' },
{ id: 'step2', content: '这是主要内容区域的边框' }
]
const stepIndex = ref(0)
const hiddenbar = ref(false)
+243 -34
View File
@@ -13,17 +13,156 @@ const sideStatus = ref(true)
const status = ref(false)
// const selectedButton = ref('拍摄基础')
// //按钮 {key: '拍摄基础', value: '拍摄基础'}
// const buttons = ref([
// { key: '拍摄基础', value: '拍摄基础' },
// { key: '内容策划', value: '内容策划' },
// { key: '拍摄执行', value: '拍摄执行' },
// { key: '后期制作', value: '后期制作' },
// { key: '版权伦理意识', value: '版权伦理意识' }
// ])
const selectedModule = ref(1)
const selectedCategory = ref('') // 新增:选中的分类
// 预留:按钮选中状态(如需启用再恢复逻辑)
// 新增:分类配置类型定义
interface CategoryConfig {
icons: string[]
positions: { top: string; left: string }[]
}
// 新增:模块配置类型定义
interface ModuleConfig {
name: string
value: number
categories: Record<string, CategoryConfig>
}
const moduleList = ref<ModuleConfig[]>([
{
name: '技能书-新手启航',
value: 1,
categories: {
拍摄基础: {
icons: ['skill/画面构图选中', 'skill/景别', 'skill/运镜技巧', 'skill/光线运用'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
},
内容策划: {
icons: ['skill/画面构图选中', 'skill/三分法构图', 'skill/居中构图', 'skill/对角线构图'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
},
拍摄执行: {
icons: ['skill/画面构图选中', 'skill/景别', 'skill/运镜技巧', 'skill/光线运用'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
},
后期制作: {
icons: ['skill/画面构图选中', 'skill/三分法构图', 'skill/居中构图', 'skill/对角线构图'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
},
版权伦理意识: {
icons: ['skill/画面构图选中', 'skill/景别', 'skill/运镜技巧', 'skill/光线运用'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
}
}
},
{
name: '技能书-vlog',
value: 2,
categories: {
拍摄基础: {
icons: ['skill/画面构图选中', 'skill/景别', 'skill/运镜技巧', 'skill/光线运用'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
},
内容策划: {
icons: ['skill/画面构图选中', 'skill/三分法构图', 'skill/居中构图', 'skill/对角线构图'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
},
拍摄执行: {
icons: ['skill/画面构图选中', 'skill/景别', 'skill/运镜技巧', 'skill/光线运用'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
},
后期制作: {
icons: ['skill/画面构图选中', 'skill/三分法构图', 'skill/居中构图', 'skill/对角线构图'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
},
版权伦理意识: {
icons: ['skill/画面构图选中', 'skill/景别', 'skill/运镜技巧', 'skill/光线运用'],
positions: [
{ top: '25%', left: '25%' },
{ top: '15%', left: '34%' },
{ top: '20%', left: '45%' },
{ top: '28%', left: '58%' }
]
}
}
}
])
const currentModule = computed(() => {
return moduleList.value.find(item => item.value === selectedModule.value) || moduleList.value[0]
})
const nextModule = () => {
if (selectedModule.value === moduleList.value.length) {
selectedModule.value = 1
} else {
selectedModule.value++
}
// 切换模块时重置分类选择
if (selectedCategory.value) {
selectedCategory.value = ''
sideStatus.value = true
}
}
const prevModule = () => {
if (selectedModule.value === 1) {
selectedModule.value = moduleList.value.length
} else {
selectedModule.value--
}
// 切换模块时重置分类选择
if (selectedCategory.value) {
selectedCategory.value = ''
sideStatus.value = true
}
}
//引导步骤
const steps = [
@@ -39,9 +178,9 @@ const currentHighlight = computed(() =>
stepIndex.value === 0 ? '.img-switch-item--vlog' : '.work-border'
)
const selectedImage = computed(() => {
return selected.value ? 'skill/画面构图选中' : 'skill/画面构图未选中'
})
// const selectedImage = computed(() => {
// return selected.value ? 'skill/画面构图选中' : 'skill/画面构图未选中'
// })
interface SimpleStep {
id: string
@@ -53,7 +192,13 @@ const handleStepChange = (_step: SimpleStep | null, index: number) => {
}
const handleClose = () => {
router.back()
// 如果当前在分类选中状态,则退出选中回到主视图
if (selectedCategory.value) {
handleBackToMain()
} else {
// 否则退出页面
router.back()
}
}
const handleClick = () => {
@@ -63,6 +208,29 @@ const handleClick = () => {
})
}
// 新增:处理分类点击事件
const handleCategoryClick = (categoryName: string) => {
selectedCategory.value = categoryName
sideStatus.value = false // 隐藏其他模块标签
}
// 新增:返回主视图
const handleBackToMain = () => {
selectedCategory.value = ''
sideStatus.value = true
}
// 新增:获取当前分类的配置
const currentCategoryConfig = computed(() => {
if (!selectedCategory.value) return null
return currentModule.value.categories[selectedCategory.value] || null
})
// 新增:返回按钮提示文本
const backButtonTooltip = computed(() => {
return selectedCategory.value ? '返回主视图' : '退出页面'
})
setTimeout(() => {
status.value = true
}, 1000)
@@ -76,17 +244,26 @@ setTimeout(() => {
:style="{ backgroundImage: getBackgroundImage('skill/技能树背景') }"
></div>
<ImgButton class="absolute left-0 top-1/2 -translate-y-1/2" :image="'skill/左滑'"> </ImgButton>
<ImgButton
@click="prevModule"
class="absolute left-0 top-1/2 -translate-y-1/2"
:image="'skill/左滑'"
>
</ImgButton>
<ImgButton
@click="sideStatus = false"
@click="nextModule"
class="absolute right-0 top-1/2 -translate-y-1/2"
:image="'skill/右滑'"
>
</ImgButton>
<!-- 周围模块标签(静态绘制) -->
<div v-show="sideStatus" class="module module-left-bottom module-vertical">
<div
v-show="sideStatus || selectedCategory === '拍摄基础'"
class="module module-left-bottom module-vertical"
@click="handleCategoryClick('拍摄基础')"
>
<div
:class="['module-text blue-text', status ? 'text-white' : 'text-[#969696e6_!important]']"
>
@@ -95,7 +272,11 @@ setTimeout(() => {
<div :class="['module-percent', status ? 'red-text' : 'blue-text']">0%</div>
</div>
<div v-show="sideStatus" class="module module-left-middle module-vertical">
<div
v-show="sideStatus || selectedCategory === '内容策划'"
class="module module-left-middle module-vertical"
@click="handleCategoryClick('内容策划')"
>
<div
:class="['module-text blue-text', status ? 'text-white' : 'text-[#969696e6_!important]']"
>
@@ -104,7 +285,11 @@ setTimeout(() => {
<div :class="['module-percent', status ? 'red-text' : 'blue-text']">0%</div>
</div>
<div v-show="!sideStatus" class="module module-right-middle module-vertical">
<div
v-show="sideStatus || selectedCategory === '拍摄执行'"
class="module module-right-middle module-vertical"
@click="handleCategoryClick('拍摄执行')"
>
<div
:class="['module-text blue-text', status ? 'text-white' : 'text-[#969696e6_!important]']"
>
@@ -113,7 +298,11 @@ setTimeout(() => {
<div :class="['module-percent', status ? 'red-text' : 'blue-text']">0%</div>
</div>
<div v-show="sideStatus" class="module module-right-upper module-vertical">
<div
v-show="sideStatus || selectedCategory === '后期制作'"
class="module module-right-upper module-vertical"
@click="handleCategoryClick('后期制作')"
>
<div
:class="['module-text blue-text', status ? 'text-white' : 'text-[#969696e6_!important]']"
>
@@ -122,7 +311,11 @@ setTimeout(() => {
<div :class="['module-percent', status ? 'red-text' : 'blue-text']">0%</div>
</div>
<div v-show="sideStatus" class="module module-right-far module-vertical">
<div
v-show="sideStatus || selectedCategory === '版权伦理意识'"
class="module module-right-far module-vertical"
@click="handleCategoryClick('版权伦理意识')"
>
<div
:class="['module-text blue-text', status ? 'text-white' : 'text-[#969696e6_!important]']"
>
@@ -131,21 +324,27 @@ setTimeout(() => {
<div :class="['module-percent', status ? 'red-text' : 'blue-text']">0%</div>
</div>
<!-- 画面构图 -->
<ImgButton
v-show="!sideStatus"
@click="handleClick"
class="absolute top-[38%] left-[23%] z-10"
:image="selectedImage"
/>
<!-- 动态显示分类对应的icon -->
<template v-if="currentCategoryConfig">
<ImgButton
v-for="(icon, index) in currentCategoryConfig.icons"
:key="index"
v-show="!sideStatus"
@click="handleClick"
class="absolute z-10"
:style="{
top: currentCategoryConfig.positions[index].top,
left: currentCategoryConfig.positions[index].left
}"
:image="icon"
/>
</template>
<!-- 景别 -->
<ImgButton v-show="!sideStatus" class="absolute top-[15%] left-[33%] z-10" image="skill/景别" />
<!-- 返回 -->
<!-- 返回按钮 -->
<ImgButton
class="absolute right-0 top-0"
:image="IMAGE_PATHS.COMPONENTS.BACK"
:title="backButtonTooltip"
@click="handleClose"
/>
@@ -161,12 +360,16 @@ setTimeout(() => {
<div class="absolute bottom-28 left-1/2 -translate-x-1/2">
<span class="blue-text tracking-[18px] text-5xl">
{{ !sideStatus ? '技能树-vlog' : '技能树-新手启航' }}
{{ selectedCategory || currentModule.name }}
</span>
</div>
<div class="absolute bottom-10 left-1/2 -translate-x-1/2">
<span class="red-text text-4xl">{{
status ? '当前尚未收集任何知识点,快去学习收集知识点吧' : '当前已全部解锁'
!status
? '当前尚未收集任何知识点,快去学习收集知识点吧'
: selectedCategory
? `当前${selectedCategory}模块已全部解锁`
: '当前已全部解锁'
}}</span>
</div>
@@ -219,6 +422,12 @@ setTimeout(() => {
display: flex;
align-items: center;
gap: 8px;
transition: all 0.3s ease;
}
.module:hover {
transform: scale(1.05);
filter: brightness(1.2);
}
/* 竖排布局 */
+1
View File
@@ -0,0 +1 @@
+85 -3
View File
@@ -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>
+1 -1
View File
@@ -35,7 +35,7 @@ const sideSwitcherItems = ref([
{
key: 'vlog',
description: '记录身边的美好',
image: 'work/vlog初识框'
image: 'work/vlog背景全屏待定'
},
{
key: 'case',