Compare commits
11 Commits
Author | SHA1 | Date |
---|---|---|
baigl | 53ccb2236e | |
白了个白 | 00119e4a49 | |
白了个白 | 4bbe89ed31 | |
zhangxuelin | 49e16c458f | |
zhangxuelin | 5fb447d5e6 | |
yangws | 9aa17ed786 | |
小杨 | 2a7fbc3577 | |
白了个白 | ccbafea3d4 | |
白了个白 | 1f9111a89d | |
白了个白 | 1a3598d7c0 | |
白了个白 | 2fdd997c5e |
|
@ -89,8 +89,6 @@ import ButtonGroup from '../../../../components/ButtonGroup.vue'
|
|||
import Popover from '../../../../components/Popover.vue'
|
||||
import NumberInput from '../../../../components/NumberInput.vue'
|
||||
import { PPTApi } from '../../../../api'
|
||||
import { Console } from 'node:console'
|
||||
import { x64 } from 'crypto-js'
|
||||
const shapeClipPathOptions = CLIPPATHS
|
||||
const ratioClipOptions = [
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="whiteboart-container" :style="{ height: height + 'px' }">
|
||||
<div class="canvasBox" ref="box"></div>
|
||||
<div class="canvasBox" ref="box" @mouseleave="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, watch, toRaw, nextTick, computed, reactive, defineProps, defineEmits } from 'vue'
|
||||
import { onMounted, ref, getCurrentInstance, watch, toRaw, nextTick, computed, reactive, defineProps, defineEmits } from 'vue'
|
||||
import TinyWhiteboard from 'whiteboard_lyc'
|
||||
import ColorPicker from './components/ColorPicker.vue'
|
||||
import {
|
||||
|
@ -305,6 +305,7 @@ import { fontFamilyList, fontSizeList } from './constants'
|
|||
|
||||
const borderImg = new URL('../../../src/assets/images/borderwidth.png', import.meta.url).href
|
||||
const pointerImg = new URL('../../../src/assets/images/mouse-pointer.png', import.meta.url).href
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
|
@ -507,10 +508,6 @@ const backToCenter = () => {
|
|||
app.scrollToCenter()
|
||||
}
|
||||
|
||||
const cancelActiveElement = () =>{
|
||||
app.cancelActiveElement()
|
||||
}
|
||||
|
||||
|
||||
// 显示全部
|
||||
const showFit = () => {
|
||||
|
@ -716,6 +713,13 @@ watch(() => props.data, (newVal) => {
|
|||
|
||||
// dom元素挂载完成
|
||||
onMounted(() => {
|
||||
init();
|
||||
})
|
||||
|
||||
/**
|
||||
* 初始化画布内容
|
||||
*/
|
||||
const init = () => {
|
||||
// 创建实例
|
||||
app = new TinyWhiteboard({
|
||||
container: box.value,
|
||||
|
@ -737,6 +741,7 @@ onMounted(() => {
|
|||
})
|
||||
// 监听元素激活事件
|
||||
app.on('activeElementChange', element => {
|
||||
console.log('点击元素 监听 activeElementChange-----------')
|
||||
if (activeElement.value) {
|
||||
activeElement.value.off('elementRotateChange', onElementRotateChange)
|
||||
}
|
||||
|
@ -784,7 +789,17 @@ onMounted(() => {
|
|||
app.resize()
|
||||
}, 300)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 课堂展示-鼠标离开白板监听事件:该事件是避免,选中状态,在其他地方点击、后退、删除等事件,会删除白板内选中的元素
|
||||
*/
|
||||
const handleMouseLeave = () => {
|
||||
console.log('离开白板')
|
||||
// 清除激活项--点击事件的激活项
|
||||
app.cancelActiveElement()
|
||||
// TODO 缺失点击拖动范围的取消激活项……
|
||||
};
|
||||
|
||||
// 暴露方法
|
||||
defineExpose({
|
||||
|
@ -795,7 +810,6 @@ defineExpose({
|
|||
getCanvasBase64,
|
||||
setCanvasData,
|
||||
getCanvasBlob,
|
||||
cancelActiveElement
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -68,8 +68,7 @@
|
|||
</div>
|
||||
<div v-if="(currentRow.worktype == '课堂展示' || classWorkForm.worktype == '课堂展示') && currentRow.id>0" class="page-center">
|
||||
<div v-loading="boardLoading" class="board-wrap" style="height: 100%; flex: 1; overflow: hidden;">
|
||||
<!-- <whiteboard v-if="isShowBoard" ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="whiteboardObj"/> -->
|
||||
<whiteboard ref="boardref" height="100%" width="100%" :isShowSave="false" :data="classWorkForm.whiteboardObj"/>
|
||||
<whiteboard ref="boardref" height="100%" width="100%" :isShowSave="false" :data="classWorkForm.whiteboardObj" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="(currentRow.worktype == '常规作业' || classWorkForm.worktype == '常规作业')&& currentRow.id>0" class="page-center">
|
||||
|
@ -815,6 +814,7 @@ const editWork = async (cform) =>{
|
|||
let res = await updateClasswork(cform);
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('更新成功');
|
||||
taskList.value = []
|
||||
// 清空左侧 选中的布置列表 并刷新列表
|
||||
if(isShow.value){
|
||||
currentRow.value.id = 1;
|
||||
|
|
|
@ -206,7 +206,7 @@ export default {
|
|||
width: 200px;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
left: 150px;
|
||||
left: 100px;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
append-to-body
|
||||
@opened="modalOpened"
|
||||
@close="closeDialog"
|
||||
width="100px"
|
||||
>
|
||||
<CropperImage
|
||||
ref="cropper"
|
||||
|
|
Loading…
Reference in New Issue