zdg #72
|
@ -172,11 +172,13 @@ onMounted(async () => {
|
|||
fabriccanvas.value = new fabric.Canvas('pdf-fabric')
|
||||
fabriccanvas.value.setWidth(595)
|
||||
fabriccanvas.value.isDrawingMode = true
|
||||
fabriccanvas.value.freeDrawingBrush.color = 'red'
|
||||
fabriccanvas.value.freeDrawingBrush.color = '#A33AFE'
|
||||
fabriccanvas.value.freeDrawingCursor = 'default'
|
||||
|
||||
fabriccanvas1.value = new fabric.Canvas('pdf-fabric1')
|
||||
fabriccanvas1.value.isDrawingMode = true
|
||||
fabriccanvas1.value.freeDrawingBrush.color = 'red'
|
||||
fabriccanvas1.value.freeDrawingBrush.color = '#A33AFE'
|
||||
fabriccanvas1.value.freeDrawingCursor = 'default'
|
||||
fabriccanvas1.value.setWidth(595)
|
||||
emit('update:numPagesTotal', pdf.numPages)
|
||||
initPdf()
|
||||
|
|
|
@ -158,10 +158,19 @@ const eventHandles = (type, win) => {
|
|||
publicMethods(on) // 加载公共方法
|
||||
break}
|
||||
case 'open-PDF': {
|
||||
// 最小化窗口
|
||||
Remote.ipcMain.once('open-PDF:minimize', () => {win.minimize()})
|
||||
// 最小化窗口 minimize()
|
||||
Remote.ipcMain.once('open-PDF:minimize', () => {win.destroy()})
|
||||
break}
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const taskHandles = () => {
|
||||
// // 设置任务栏上下文菜单
|
||||
// const contextMenu = new Remote.Menu()
|
||||
// contextMenu.append(new Remote.MenuItem({
|
||||
// label: '关闭',
|
||||
// click: () => {Remote.app.quit()}
|
||||
// }))
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<el-button class="btn" @click="handleOutLink('gk')">高考研读</el-button>
|
||||
<el-button class="btn" @click="handleOutLink('aiModel')">教学大模型</el-button>
|
||||
</div>
|
||||
<el-button type="primary" class="to-class-btn">
|
||||
<el-button type="primary" class="to-class-btn" @click="openLesson">
|
||||
<i class="iconfont icon-lingdang"></i>上课</el-button>
|
||||
</div>
|
||||
<div class="prepare-body-header">
|
||||
|
@ -260,10 +260,13 @@ export default {
|
|||
cookieData: {...(configObj.data)}
|
||||
})
|
||||
},
|
||||
// 打开PDF-课件
|
||||
navtoPdf() {
|
||||
const params = { url: '/classBegins/index' }
|
||||
createWindow('open-PDF', params)
|
||||
|
||||
createWindow('open-PDF', { url: '/classBegins/index' })
|
||||
},
|
||||
// 上课-工具类悬浮
|
||||
openLesson() {
|
||||
createWindow('tool-sphere', { url: '/tool/sphere' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<!-- 上传弹窗 -->
|
||||
<uploadDialog v-model="isDialogOpen" @submitFile="submitFile" />
|
||||
<el-button @click="testClick">测试</el-button>
|
||||
<!-- <el-button @click="testClick">测试</el-button> -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
@ -42,8 +42,7 @@ onMounted(async () => {
|
|||
// console.log('消息返回:', res)
|
||||
})
|
||||
const testClick = async() => {
|
||||
const params = { url: '/tool/sphere' }
|
||||
const win = await createWindow('tool-sphere', params)
|
||||
const win = await createWindow('tool-sphere', { url: '/tool/sphere' })
|
||||
console.log('消息返回:', win)
|
||||
}
|
||||
// 查询
|
||||
|
|
|
@ -6,12 +6,13 @@
|
|||
// 功能说明:画板
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { FabricVue } from '@/plugins/fabric'
|
||||
import { useBoardStore } from '@/store/modules/draw'
|
||||
import { useBoardStore, useDrawStore } from '@/store/modules/draw'
|
||||
const canvasRef = ref(null)
|
||||
|
||||
onMounted(async() => {
|
||||
if (canvasRef.value) {
|
||||
useBoardStore().backgroundColor = 'transparent'
|
||||
useDrawStore().drawColors = ['red']
|
||||
const option = { freeDrawingCursor: 'default' }
|
||||
await FabricVue.initCanvas(canvasRef.value, option)
|
||||
// FabricVue.canvas.backgroundColor = 'transparent'
|
||||
|
|
Loading…
Reference in New Issue