Compare commits
No commits in common. "8f94774e1917a33eff482a190175c93f7d797e83" and "c90873bea9dd9c68e4016c5f72c43c6b3a4551f2" have entirely different histories.
8f94774e19
...
c90873bea9
@ -7,16 +7,11 @@ export {}
|
|||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AAlert: typeof import('ant-design-vue/es')['Alert']
|
|
||||||
AAvatar: typeof import('ant-design-vue/es')['Avatar']
|
AAvatar: typeof import('ant-design-vue/es')['Avatar']
|
||||||
ABadge: typeof import('ant-design-vue/es')['Badge']
|
ABadge: typeof import('ant-design-vue/es')['Badge']
|
||||||
AButton: typeof import('ant-design-vue/es')['Button']
|
AButton: typeof import('ant-design-vue/es')['Button']
|
||||||
AButtonGroup: typeof import('ant-design-vue/es')['ButtonGroup']
|
|
||||||
ACard: typeof import('ant-design-vue/es')['Card']
|
ACard: typeof import('ant-design-vue/es')['Card']
|
||||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
|
||||||
ACheckboxGroup: typeof import('ant-design-vue/es')['CheckboxGroup']
|
|
||||||
ACol: typeof import('ant-design-vue/es')['Col']
|
ACol: typeof import('ant-design-vue/es')['Col']
|
||||||
ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
|
|
||||||
ADescriptions: typeof import('ant-design-vue/es')['Descriptions']
|
ADescriptions: typeof import('ant-design-vue/es')['Descriptions']
|
||||||
ADescriptionsItem: typeof import('ant-design-vue/es')['DescriptionsItem']
|
ADescriptionsItem: typeof import('ant-design-vue/es')['DescriptionsItem']
|
||||||
ADivider: typeof import('ant-design-vue/es')['Divider']
|
ADivider: typeof import('ant-design-vue/es')['Divider']
|
||||||
@ -43,7 +38,6 @@ declare module 'vue' {
|
|||||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
AModal: typeof import('ant-design-vue/es')['Modal']
|
||||||
APageHeader: typeof import('ant-design-vue/es')['PageHeader']
|
APageHeader: typeof import('ant-design-vue/es')['PageHeader']
|
||||||
APagination: typeof import('ant-design-vue/es')['Pagination']
|
|
||||||
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||||
AProgress: typeof import('ant-design-vue/es')['Progress']
|
AProgress: typeof import('ant-design-vue/es')['Progress']
|
||||||
ARadio: typeof import('ant-design-vue/es')['Radio']
|
ARadio: typeof import('ant-design-vue/es')['Radio']
|
||||||
@ -58,15 +52,12 @@ declare module 'vue' {
|
|||||||
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
||||||
ASkeleton: typeof import('ant-design-vue/es')['Skeleton']
|
ASkeleton: typeof import('ant-design-vue/es')['Skeleton']
|
||||||
ASpace: typeof import('ant-design-vue/es')['Space']
|
ASpace: typeof import('ant-design-vue/es')['Space']
|
||||||
ASpin: typeof import('ant-design-vue/es')['Spin']
|
|
||||||
AStatistic: typeof import('ant-design-vue/es')['Statistic']
|
AStatistic: typeof import('ant-design-vue/es')['Statistic']
|
||||||
AStep: typeof import('ant-design-vue/es')['Step']
|
AStep: typeof import('ant-design-vue/es')['Step']
|
||||||
ASteps: typeof import('ant-design-vue/es')['Steps']
|
ASteps: typeof import('ant-design-vue/es')['Steps']
|
||||||
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
||||||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
||||||
ATable: typeof import('ant-design-vue/es')['Table']
|
ATable: typeof import('ant-design-vue/es')['Table']
|
||||||
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
|
||||||
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
|
||||||
ATag: typeof import('ant-design-vue/es')['Tag']
|
ATag: typeof import('ant-design-vue/es')['Tag']
|
||||||
ATextarea: typeof import('ant-design-vue/es')['Textarea']
|
ATextarea: typeof import('ant-design-vue/es')['Textarea']
|
||||||
ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
|
ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="!expire" ref="containerRef" class="!w-full !h-full z-999"
|
<div v-if="!expire" ref="containerRef" class="!w-full !h-full z-999" :class="noPage ? 'absolute top-0 left-0' : 'pos-fixed top-0 left-0'"></div>
|
||||||
:class="noPage ? 'absolute top-0 left-0' : 'pos-fixed top-0 left-0'"></div>
|
|
||||||
<div v-else class="flex justify-center items-center w-full h-full">
|
<div v-else class="flex justify-center items-center w-full h-full">
|
||||||
<div class="my-60px text-center">
|
<div class="my-60px text-center">
|
||||||
链接已失效!
|
链接已失效!
|
||||||
@ -117,7 +116,7 @@ onUnmounted(() => {
|
|||||||
window.addEventListener('beforeunload', updateSize);
|
window.addEventListener('beforeunload', updateSize);
|
||||||
|
|
||||||
function home() {
|
function home() {
|
||||||
router.replace("/");
|
router.replace("/datas");
|
||||||
}
|
}
|
||||||
const baseInstance = ref<any>(null);
|
const baseInstance = ref<any>(null);
|
||||||
async function init(mount: HTMLElement | null) {
|
async function init(mount: HTMLElement | null) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="kids-mode">
|
<div class="kids-mode" @click="showControls" @mousemove="showControls">
|
||||||
<!-- 静音开关 -->
|
<!-- 静音开关 -->
|
||||||
<button v-if="false" class="mute-toggle" @click.stop="toggleMute" :class="{ muted: isMuted }">
|
<button class="mute-toggle" @click.stop="toggleMute" :class="{ muted: isMuted }">
|
||||||
<VolumeX v-if="isMuted" :size="24" :stroke-width="2.5" class="mute-icon" />
|
<VolumeX v-if="isMuted" :size="24" :stroke-width="2.5" class="mute-icon" />
|
||||||
<Volume2 v-else :size="24" :stroke-width="2.5" class="mute-icon" />
|
<Volume2 v-else :size="24" :stroke-width="2.5" class="mute-icon" />
|
||||||
</button>
|
</button>
|
||||||
@ -17,8 +17,14 @@
|
|||||||
|
|
||||||
<!-- 视频播放 -->
|
<!-- 视频播放 -->
|
||||||
<div v-else-if="currentResourceType === 'video'" key="video" class="content-viewer">
|
<div v-else-if="currentResourceType === 'video'" key="video" class="content-viewer">
|
||||||
<Player v-if="currentResourceUrl" :key="currentResourceUrl" :url="currentResourceUrl"
|
<Player
|
||||||
:title="currentResourceName" :no-page="true" @ended="handleMediaEnded" />
|
v-if="currentResourceUrl"
|
||||||
|
:key="currentResourceUrl"
|
||||||
|
:url="currentResourceUrl"
|
||||||
|
:title="currentResourceName"
|
||||||
|
:no-page="true"
|
||||||
|
@ended="handleMediaEnded"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 图片展示 -->
|
<!-- 图片展示 -->
|
||||||
@ -81,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 底部固定导航 -->
|
<!-- 底部固定导航 -->
|
||||||
<div class="kids-nav">
|
<div class="kids-nav" :class="{ hidden: !controlsVisible }">
|
||||||
<!-- 教学资源区域 -->
|
<!-- 教学资源区域 -->
|
||||||
<div class="resources-section">
|
<div class="resources-section">
|
||||||
<div class="section-label">
|
<div class="section-label">
|
||||||
@ -224,6 +230,10 @@ const emit = defineEmits<{
|
|||||||
(e: 'stepChange', index: number): void;
|
(e: 'stepChange', index: number): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
// 控制栏显示状态
|
||||||
|
const controlsVisible = ref(true);
|
||||||
|
let hideControlsTimer: number | null = null;
|
||||||
|
|
||||||
// 当前资源状态
|
// 当前资源状态
|
||||||
const currentResourceType = ref<string>('');
|
const currentResourceType = ref<string>('');
|
||||||
const currentResourceUrl = ref<string>('');
|
const currentResourceUrl = ref<string>('');
|
||||||
@ -784,6 +794,18 @@ const getResourceById = (resId: string) => {
|
|||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const showControls = () => {
|
||||||
|
controlsVisible.value = true;
|
||||||
|
resetHideTimer();
|
||||||
|
};
|
||||||
|
|
||||||
|
const resetHideTimer = () => {
|
||||||
|
if (hideControlsTimer) clearTimeout(hideControlsTimer);
|
||||||
|
hideControlsTimer = setTimeout(() => {
|
||||||
|
controlsVisible.value = false;
|
||||||
|
}, 5000) as unknown as number;
|
||||||
|
};
|
||||||
|
|
||||||
const handleExit = () => {
|
const handleExit = () => {
|
||||||
playSound('click');
|
playSound('click');
|
||||||
emit('exit');
|
emit('exit');
|
||||||
@ -842,6 +864,7 @@ const handleResourceClick = (resource: { id: string; type: string; name: string;
|
|||||||
showingResource.value = null;
|
showingResource.value = null;
|
||||||
} else {
|
} else {
|
||||||
showingResource.value = resource;
|
showingResource.value = resource;
|
||||||
|
showControls();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -931,6 +954,7 @@ const toggleMute = () => {
|
|||||||
|
|
||||||
// 键盘事件
|
// 键盘事件
|
||||||
const handleKeydown = (e: KeyboardEvent) => {
|
const handleKeydown = (e: KeyboardEvent) => {
|
||||||
|
showControls();
|
||||||
if (e.key === 'ArrowLeft' || e.key === 'a' || e.key === 'A') prevStep();
|
if (e.key === 'ArrowLeft' || e.key === 'a' || e.key === 'A') prevStep();
|
||||||
else if (e.key === 'ArrowRight' || e.key === 'd' || e.key === 'D') nextStep();
|
else if (e.key === 'ArrowRight' || e.key === 'd' || e.key === 'D') nextStep();
|
||||||
else if (e.key === 'Escape') handleExit();
|
else if (e.key === 'Escape') handleExit();
|
||||||
@ -975,10 +999,12 @@ watch(() => props.currentStepIndex, () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.addEventListener('keydown', handleKeydown);
|
document.addEventListener('keydown', handleKeydown);
|
||||||
|
resetHideTimer();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
document.removeEventListener('keydown', handleKeydown);
|
document.removeEventListener('keydown', handleKeydown);
|
||||||
|
if (hideControlsTimer) clearTimeout(hideControlsTimer);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -1236,7 +1262,13 @@ onUnmounted(() => {
|
|||||||
backdrop-filter: blur(20px);
|
backdrop-filter: blur(20px);
|
||||||
border-top: 3px solid #FF9800;
|
border-top: 3px solid #FF9800;
|
||||||
padding: 16px 24px 24px;
|
padding: 16px 24px 24px;
|
||||||
|
transform: translateY(0);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
box-shadow: 0 -4px 20px rgba(255, 152, 0, 0.15);
|
box-shadow: 0 -4px 20px rgba(255, 152, 0, 0.15);
|
||||||
|
|
||||||
|
&.hidden {
|
||||||
|
transform: translateY(100%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.steps-section {
|
.steps-section {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user