Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into zdg_dev
This commit is contained in:
commit
c5e1e00190
|
@ -2,7 +2,7 @@
|
|||
* @description 公共监听器
|
||||
*/
|
||||
|
||||
import { watch } from 'vue'
|
||||
import { watch, render } from 'vue'
|
||||
import { PPTApi } from './index'
|
||||
import * as store from '../store'
|
||||
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
||||
|
@ -99,6 +99,7 @@ export default () => {
|
|||
}
|
||||
break
|
||||
case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页
|
||||
render(null, document.body) //移除弹窗
|
||||
emitter.emit('closegridPic') //如果有推图片窗口 就关闭
|
||||
const slideIndex = content?.current || 0
|
||||
const type = content?.animation // 上下动作
|
||||
|
@ -148,14 +149,4 @@ export default () => {
|
|||
window.close() // 关闭窗口
|
||||
}, 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>
|
||||
<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
|
||||
:style="type == 'design' ? ['top: 10px', 'justify-content: space-between'] : ['bottom: 10px', 'justify-content: center']">
|
||||
|
@ -278,7 +278,7 @@
|
|||
</template>
|
||||
|
||||
<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 ColorPicker from './components/ColorPicker.vue'
|
||||
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('离开白板')
|
||||
// 清除激活项--点击事件的激活项
|
||||
app.cancelActiveElement()
|
||||
// TODO 缺失点击拖动范围的取消激活项……
|
||||
// 阻止 点击拖动范围的取消激活项……
|
||||
isMyCanvas.value = false;
|
||||
// 确保事件处理函数在组件挂载后绑定
|
||||
document.addEventListener('keydown', handleKeyDown, true);
|
||||
};
|
||||
|
||||
// 暴露方法
|
||||
|
|
Loading…
Reference in New Issue