feat: 完善访谈与vlog模块页面,重组设备与图片公共资源,新增音频管理与一班对接工具

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhongyidianandClaude Opus 4.7 committed 2026-05-05 15:41:41 +08:00
1 parent c4c9be9d35
commit fc9633f371
159 files changed
+4823 -2535

No files matched your search

+34 -21
View File
@@ -2,18 +2,18 @@
<teleport to="body">
<div class="guide-steps-container" v-if="show">
<SpotlightOverlay
:visible="Boolean(highlightSelector)"
:target-selector="highlightSelector"
:padding="highlightPadding"
:border-radius="highlightRadius"
:highlight-mode="highlightMode"
:visible="Boolean(currentHighlightSelector)"
:target-selector="currentHighlightSelector"
:padding="currentHighlightPadding"
:border-radius="currentHighlightRadius"
:highlight-mode="currentHighlightMode"
/>
<div class="guide-align" :style="alignStyle">
<GuideDragon
:show-skip="currentStep < totalSteps"
:current-step="currentStep"
:total-steps="totalSteps"
:position-offset-y="props.positionOffsetY"
:position-offset-y="currentPositionOffsetY"
@next="handleNext"
@skip="handleSkip"
@complete="handleComplete"
@@ -23,6 +23,7 @@
<div v-if="useSlotMode">
<component
:is="currentStepComponent"
:key="currentStepIndex"
@continue="handleNext"
:is-last-step="currentStep >= totalSteps"
:current-step="currentStep"
@@ -32,9 +33,14 @@
<!-- 兼容原有的配置形式:也包裹 GuideStepsItem,获得继续按钮 -->
<GuideStepsItem
v-else
:key="currentStepIndex"
:is-last-step="currentStep >= totalSteps"
:current-step="currentStep"
:total-steps="totalSteps"
:audio-src="currentStepData?.audioSrc"
:audio-mode="currentStepData?.audioMode"
:audio-channel-id="currentStepData?.audioChannelId"
:audio-autoplay="currentStepData?.audioAutoplay"
@continue="handleNext"
>
<!-- 支持组件形式的 content -->
@@ -51,18 +57,11 @@
<script setup lang="ts">
import { ref, computed, useSlots, onMounted, onUnmounted, reactive } from 'vue'
import type { Component } from 'vue'
import type { GuideStep } from './types'
import SpotlightOverlay from './SpotlightOverlay.vue'
import GuideDragon from './GuideDragon.vue'
import GuideStepsItem from './GuideStepsItem.vue'
interface GuideStep {
id: string
title?: string
content: string | Component
nextText?: string
}
interface Props {
/** 引导步骤配置 - 当使用插槽模式时可以为空 */
steps?: GuideStep[]
@@ -129,14 +128,11 @@ const alignStyle = reactive<{
width: '1920px',
height: '1080px'
})
// 验证并清理选择器,空字符串或只包含空格的选择器视为无效
const highlightSelector = computed(() => {
if (!props.highlightSelector) return null
const trimmed = props.highlightSelector.trim()
const normalizeSelector = (selector?: string | null) => {
if (!selector) return null
const trimmed = selector.trim()
return trimmed.length > 0 ? trimmed : null
})
const highlightPadding = computed(() => props.highlightPadding || 0)
const highlightRadius = computed(() => props.highlightRadius || 0)
}
const useSlotMode = computed(() => {
return slots.default && slots.default().length > 0
@@ -161,6 +157,23 @@ const currentStepData = computed(() => {
return props.steps[currentStepIndex.value] || null
})
const currentStepConfig = computed(() => props.steps[currentStepIndex.value] || null)
const currentHighlightSelector = computed(() => {
return normalizeSelector(currentStepConfig.value?.highlightSelector ?? props.highlightSelector)
})
const currentHighlightPadding = computed(
() => currentStepConfig.value?.highlightPadding ?? props.highlightPadding
)
const currentHighlightRadius = computed(
() => currentStepConfig.value?.highlightRadius ?? props.highlightRadius
)
const currentHighlightMode = computed(
() => currentStepConfig.value?.highlightMode ?? props.highlightMode
)
const currentPositionOffsetY = computed(
() => currentStepConfig.value?.positionOffsetY ?? props.positionOffsetY
)
const currentStepComponent = computed(() => {
if (!useSlotMode.value) return null
return slotSteps.value[currentStepIndex.value] || null