ppt 上课优化

This commit is contained in:
zdg 2024-11-01 12:54:01 +08:00
parent c3d6c2a57b
commit 0fcaf3f3e7
3 changed files with 37 additions and 27 deletions

View File

@ -129,7 +129,7 @@ const sendHomework = (row,type) => {
} }
// //
const closeHomework = async() => { const closeHomework = async() => {
ipcMsgSend('tool-sphere:set:ignore', true) // ipcMsgSend('tool-sphere:set:ignore', true)
} }

View File

@ -74,6 +74,7 @@ const list = computed(() => props.data.map((o,i) => {
onMounted(() => { onMounted(() => {
posBtnAll = btnRef.value.getBoundingClientRect() posBtnAll = btnRef.value.getBoundingClientRect()
hPost.value = Math.round(posBtnAll.height) hPost.value = Math.round(posBtnAll.height)
// btnRef.value.style.marginTop = -hPost.value / 2 + 'px'
curNode = sessionStore?.get?.('subject.curNode') curNode = sessionStore?.get?.('subject.curNode')
}) })
// === === // === ===
@ -101,7 +102,10 @@ const clickHandel = (o, e) => {
emit('change', o) emit('change', o)
} }
const closeActive = () =>{ const closeActive = () =>{
isVisible.value = false if (isVisible.value) { //
isVisible.value = false
emit('change', { prop: 'close' })
}
} }
defineExpose({closeActive}) defineExpose({closeActive})
</script> </script>
@ -111,8 +115,8 @@ defineExpose({closeActive})
position: fixed; position: fixed;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
z-index: 1;
right: 10px; right: 10px;
//min-height: 40vh;
min-width: 4em; min-width: 4em;
border-radius: 4em; border-radius: 4em;
background-color: rgba(18,18,18,0.3); background-color: rgba(18,18,18,0.3);

View File

@ -1,5 +1,7 @@
<template> <template>
<div class="warp-all"> <div class="warp-all">
<!-- 遮罩层 -->
<div class="mask" v-show="isMask" @click="maskChange(true)"></div>
<!-- 画板 --> <!-- 画板 -->
<board-vue v-model="tabActive" v-show="isShow" ref="boardVueRef"></board-vue> <board-vue v-model="tabActive" v-show="isShow" ref="boardVueRef"></board-vue>
@ -62,7 +64,8 @@ const isDrag = ref(false) // 开始拖拽
const dragtime = ref(0) // - const dragtime = ref(0) // -
const isShow = ref(false) // - const isShow = ref(false) // -
const isOver = ref(false) // const isOver = ref(false) //
const isOpenBook = ref(false) const isOpenBook = ref(false) // pdf
const isMask = ref(false) //
const toolStore = useToolState() // const toolStore = useToolState() //
const boardVueRef=ref(null) // ref const boardVueRef=ref(null) // ref
const upvoteRef = ref(null) // ref const upvoteRef = ref(null) // ref
@ -93,7 +96,7 @@ onMounted(async() => {
// window.test1 = toolStore // window.test1 = toolStore
getClassInfo() // ex3 getClassInfo() // ex3
resetStatus() // - resetStatus() // -
console.log(sideVueRef.value.isVisible)
}) })
// ==== === // ==== ===
@ -143,7 +146,7 @@ const logoHandle = (e,t) => {
// -穿 // -穿
const mouseChange = (bool) => { const mouseChange = (bool) => {
let resBool = false let resBool = false
console.log('mouseChange:', bool, resBool) // console.log('mouseChange:', bool, resBool)
if (!bool) return setIgnore(resBool) // 穿 if (!bool) return setIgnore(resBool) // 穿
if (tabActive.value == 'select') resBool = !!bool if (tabActive.value == 'select') resBool = !!bool
else { else {
@ -152,12 +155,10 @@ const mouseChange = (bool) => {
const isPdf = !resBool && toolStore.isPdfWin const isPdf = !resBool && toolStore.isPdfWin
if (isPdf) resBool = true if (isPdf) resBool = true
} }
console.log('mouseChange:', bool, resBool) // console.log('mouseChange:', bool, resBool)
setIgnore(resBool) setIgnore(resBool)
} }
const touchChange = (e) => {
console.log(e)
}
// im-chat: {type, data} // im-chat: {type, data}
const chatChange = (type, data, ...args) => { const chatChange = (type, data, ...args) => {
if (type == 'createGroup') { // - if (type == 'createGroup') { // -
@ -189,14 +190,6 @@ const setIgnore = (bool) => {ipcMsgSend('tool-sphere:set:ignore', bool)}
// : | // : |
const resetStatus = () => { const resetStatus = () => {
if (toolStore.isToolWin) return // - if (toolStore.isToolWin) return // -
// -
// ipcMain?.removeHandler('tool-sphere:reset') //
// ipcMain?.handle?.('tool-sphere:reset', () => {
// setTimeout(() => {
// boardVueRef.value.handleMode(tabActive.value)
// mouseChange(1)
// }, 500)
// })
toolStore.isToolWin = true // toolStore.isToolWin = true //
} }
// : // :
@ -206,15 +199,10 @@ const sideMouse = e => {
setIgnore(false) // -穿 setIgnore(false) // -穿
return return
} }
mouseChange(type == 'mouseleave') //
// // const bool = isMask.value && type =='mouseleave'
// if (type == 'mouseleave') { if (bool) mouseChange(false) // 穿
// timingSide = setTimeout(() => { else mouseChange(type == 'mouseleave')
// sideVueRef.value.closeActive()
// }, 500)
// } else { //
// if (!!timingSide) clearTimeout(timingSide)
// }
} }
// : // :
const sideChange = async o => { const sideChange = async o => {
@ -230,7 +218,11 @@ const sideChange = async o => {
isOpenBook.value = true isOpenBook.value = true
} }
break break
case 'close': //
maskChange(false)
break
case 'resource': // case 'resource': //
isMask.value = !isMask.value
break break
case 'interact': // case 'interact': //
break break
@ -267,6 +259,13 @@ const sideChange = async o => {
} }
} }
// -
const maskChange = (bool) => {
isMask.value = false
bool && sideVueRef.value.closeActive() //
mouseChange(true) // 穿
}
// === === // === ===
watchEffect(() => { watchEffect(() => {
if (isOver.value) return // , if (isOver.value) return // ,
@ -286,6 +285,12 @@ watchEffect(() => {
.warp-all{ .warp-all{
position: relative; position: relative;
} }
//
.mask{
position: fixed;
inset: 0;
background: rgba(1, 1, 1, 0.3);
}
// //
.tool-bottom-all{ .tool-bottom-all{
// width: 45vw; // width: 45vw;
@ -328,6 +333,7 @@ watchEffect(() => {
} }
} }
} }
//
.a-fade-leave-active,.a-fade-enter-active{ .a-fade-leave-active,.a-fade-enter-active{
transition: all .3s; transition: all .3s;
} }