Compare commits
2 Commits
529197c9dc
...
f057320625
Author | SHA1 | Date |
---|---|---|
朱浩 | f057320625 | |
朱浩 | 2f4d48a8c0 |
|
@ -115,7 +115,7 @@ export function toolWindow({url, isFile, isConsole, option={}}) {
|
||||||
}
|
}
|
||||||
// 创建-新窗口
|
// 创建-新窗口
|
||||||
let win = new Remote.BrowserWindow(config)
|
let win = new Remote.BrowserWindow(config)
|
||||||
if (!!isFile) win.loadFile(urlAll,{hash: url}) // 加载文件
|
if (!isDev) win.loadFile(urlAll,{hash: url}) // 加载文件
|
||||||
else win.loadURL(urlAll) // 加载url
|
else win.loadURL(urlAll) // 加载url
|
||||||
win.once('ready-to-show', () => {resolve(win)})
|
win.once('ready-to-show', () => {resolve(win)})
|
||||||
// 主窗口关闭事件
|
// 主窗口关闭事件
|
||||||
|
|
|
@ -36,7 +36,7 @@ import { ref, onMounted, watch, reactive } from 'vue'
|
||||||
import * as pdfjsLib from 'pdfjs-dist/legacy/build/pdf'
|
import * as pdfjsLib from 'pdfjs-dist/legacy/build/pdf'
|
||||||
pdfjsLib.GlobalWorkerOptions.workerSrc = '/lib/build/pdf.worker.mjs'
|
pdfjsLib.GlobalWorkerOptions.workerSrc = '/lib/build/pdf.worker.mjs'
|
||||||
import pdfCanvas from '@/components/pdf/index.vue'
|
import pdfCanvas from '@/components/pdf/index.vue'
|
||||||
const { ipcRenderer } = require('electron')
|
const { ipcRenderer } = window.electron || {}
|
||||||
// 传过去的参数
|
// 传过去的参数
|
||||||
const pdfObj = reactive({
|
const pdfObj = reactive({
|
||||||
numberOfPdf: 2, //显示几页
|
numberOfPdf: 2, //显示几页
|
||||||
|
|
Loading…
Reference in New Issue