Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
zhangxuelin | 2463feb0b7 | |
zhangxuelin | d866f546bc | |
baigl | 991bbd179f | |
白了个白 | bf39850d2f | |
白了个白 | 0f51892d96 | |
zhengdegang | 2224de7144 | |
zhangxuelin | 35e63e3587 | |
zhangxuelin | 1999104ee4 | |
zhangxuelin | 65643279ce |
|
@ -2,7 +2,7 @@
|
||||||
* @description 公共监听器
|
* @description 公共监听器
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { watch } from 'vue'
|
import { watch, render } from 'vue'
|
||||||
import { PPTApi } from './index'
|
import { PPTApi } from './index'
|
||||||
import * as store from '../store'
|
import * as store from '../store'
|
||||||
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
||||||
|
@ -99,6 +99,7 @@ export default () => {
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页
|
case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页
|
||||||
|
render(null, document.body) //移除弹窗
|
||||||
emitter.emit('closegridPic') //如果有推图片窗口 就关闭
|
emitter.emit('closegridPic') //如果有推图片窗口 就关闭
|
||||||
const slideIndex = content?.current || 0
|
const slideIndex = content?.current || 0
|
||||||
const type = content?.animation // 上下动作
|
const type = content?.animation // 上下动作
|
||||||
|
@ -148,14 +149,4 @@ export default () => {
|
||||||
window.close() // 关闭窗口
|
window.close() // 关闭窗口
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
// setTimeout(async () => {
|
|
||||||
// emitter.emit('opengridPic',{arr:['https://prev.ysaix.com:7868/src/assets/images/homecard4.jpg']})
|
|
||||||
// }, 3000)
|
|
||||||
|
|
||||||
// setTimeout(async () => {
|
|
||||||
// emitter.emit('closegridPic')
|
|
||||||
// }, 6000)
|
|
||||||
// setTimeout(async () => {
|
|
||||||
// emitter.emit('opengridPic',{arr:['https://prev.ysaix.com:7868/src/assets/images/homecard4.jpg','https://prev.ysaix.com:7868/src/assets/images/homecard4.jpg']})
|
|
||||||
// }, 9000)
|
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="whiteboart-container" :style="{ height: height + 'px' }">
|
<div class="whiteboart-container" :style="{ height: height + 'px' }">
|
||||||
<div class="canvasBox" ref="box" @mouseleave="handleMouseLeave" ></div>
|
<div class="canvasBox" ref="box" @mouseenter.capture="handleMouseEnter" @mouseleave.capture="handleMouseLeave"></div>
|
||||||
|
|
||||||
<div class="footerLeft" @click.stop
|
<div class="footerLeft" @click.stop
|
||||||
:style="type == 'design' ? ['top: 10px', 'justify-content: space-between'] : ['bottom: 10px', 'justify-content: center']">
|
:style="type == 'design' ? ['top: 10px', 'justify-content: space-between'] : ['bottom: 10px', 'justify-content: center']">
|
||||||
|
@ -278,7 +278,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, getCurrentInstance, watch, toRaw, nextTick, computed, reactive, defineProps, defineEmits } from 'vue'
|
import { onMounted, onBeforeUnmount, ref, getCurrentInstance, watch, toRaw, nextTick, computed, reactive, defineProps, defineEmits } from 'vue'
|
||||||
import TinyWhiteboard from 'whiteboard_lyc'
|
import TinyWhiteboard from 'whiteboard_lyc'
|
||||||
import ColorPicker from './components/ColorPicker.vue'
|
import ColorPicker from './components/ColorPicker.vue'
|
||||||
import {
|
import {
|
||||||
|
@ -791,6 +791,25 @@ const init = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const isMyCanvas = ref(false); // 鼠标 是否进入画布判断
|
||||||
|
const handleKeyDown=(event)=> {
|
||||||
|
// console.log('键盘按键被按下:', event.key);
|
||||||
|
// console.log(isMyCanvas.value,'??????????')
|
||||||
|
if(isMyCanvas.value == false){
|
||||||
|
event.stopPropagation();
|
||||||
|
// console.log('键盘事件被捕获,已阻止冒泡:', event.key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 鼠标进入事件
|
||||||
|
*/
|
||||||
|
const handleMouseEnter = () => {
|
||||||
|
console.log('进入白板')
|
||||||
|
isMyCanvas.value = true;
|
||||||
|
document.addEventListener('keydown', handleKeyDown, true);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 课堂展示-鼠标离开白板监听事件:该事件是避免,选中状态,在其他地方点击、后退、删除等事件,会删除白板内选中的元素
|
* 课堂展示-鼠标离开白板监听事件:该事件是避免,选中状态,在其他地方点击、后退、删除等事件,会删除白板内选中的元素
|
||||||
*/
|
*/
|
||||||
|
@ -798,7 +817,10 @@ const handleMouseLeave = () => {
|
||||||
console.log('离开白板')
|
console.log('离开白板')
|
||||||
// 清除激活项--点击事件的激活项
|
// 清除激活项--点击事件的激活项
|
||||||
app.cancelActiveElement()
|
app.cancelActiveElement()
|
||||||
// TODO 缺失点击拖动范围的取消激活项……
|
// 阻止 点击拖动范围的取消激活项……
|
||||||
|
isMyCanvas.value = false;
|
||||||
|
// 确保事件处理函数在组件挂载后绑定
|
||||||
|
document.addEventListener('keydown', handleKeyDown, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 暴露方法
|
// 暴露方法
|
||||||
|
|
Loading…
Reference in New Issue