no message
This commit is contained in:
parent
65393b7809
commit
bc3b72fafe
22
electron/electron.js
vendored
22
electron/electron.js
vendored
@ -112,16 +112,16 @@ function createMainWindow() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param args {path, hash, title, titleFixed, force, userAgent, config, webPreferences}
|
||||
*/
|
||||
function createSubWindow(args) {
|
||||
if (!args) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof args !== "object") {
|
||||
args = {
|
||||
path: args,
|
||||
config: {},
|
||||
}
|
||||
if (!utils.isJson(args)) {
|
||||
args = {path: args, config: {}}
|
||||
}
|
||||
|
||||
let name = args.name || "auto_" + utils.randomString(6);
|
||||
@ -134,27 +134,25 @@ function createSubWindow(args) {
|
||||
}
|
||||
} else {
|
||||
let config = args.config || {};
|
||||
if (typeof args.title !== "undefined") {
|
||||
config.title = args.title;
|
||||
}
|
||||
let webPreferences = args.webPreferences || {};
|
||||
browser = new BrowserWindow(Object.assign({
|
||||
width: 1280,
|
||||
height: 800,
|
||||
center: true,
|
||||
parent: mainWindow,
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
webPreferences: Object.assign({
|
||||
preload: path.join(__dirname, 'electron-preload.js'),
|
||||
devTools: args.devTools !== false,
|
||||
webSecurity: true,
|
||||
nodeIntegration: true,
|
||||
nodeIntegrationInSubFrames: true,
|
||||
contextIsolation: true,
|
||||
nativeWindowOpen: true
|
||||
},
|
||||
}, webPreferences),
|
||||
}, config))
|
||||
|
||||
browser.on('page-title-updated', (event, title) => {
|
||||
if (title == "index.html" || args.titleFixed === true) {
|
||||
if (title == "index.html" || config.titleFixed === true) {
|
||||
event.preventDefault()
|
||||
}
|
||||
})
|
||||
|
@ -63,7 +63,7 @@
|
||||
"stylus-loader": "^6.2.0",
|
||||
"tinymce": "^5.10.3",
|
||||
"tui-calendar-hi": "^1.15.1-5",
|
||||
"view-design-hi": "^4.7.0-12",
|
||||
"view-design-hi": "^4.7.0-15",
|
||||
"vue": "^2.6.14",
|
||||
"vue-clipboard2": "^0.3.3",
|
||||
"vue-emoji-picker": "^1.0.3",
|
||||
|
@ -214,12 +214,12 @@ export default {
|
||||
viewFile() {
|
||||
if (this.$Electron) {
|
||||
this.$Electron.sendMessage('windowRouter', {
|
||||
title: `${this.msgData.msg.name} (${$A.bytesToSize(this.msgData.msg.size)})`,
|
||||
titleFixed: true,
|
||||
name: 'file-msg-' + this.msgData.id,
|
||||
path: "/single/file/msg/" + this.msgData.id,
|
||||
force: false,
|
||||
config: {
|
||||
title: `${this.msgData.msg.name} (${$A.bytesToSize(this.msgData.msg.size)})`,
|
||||
titleFixed: true,
|
||||
parent: null,
|
||||
width: Math.min(window.screen.availWidth, 1440),
|
||||
height: Math.min(window.screen.availHeight, 900),
|
||||
|
@ -1116,6 +1116,8 @@ export default {
|
||||
|
||||
openNewWin() {
|
||||
let config = {
|
||||
title: this.taskDetail.name,
|
||||
titleFixed: true,
|
||||
parent: null,
|
||||
width: Math.min(window.screen.availWidth, this.$el.clientWidth + 72),
|
||||
height: Math.min(window.screen.availHeight, this.$el.clientHeight + 72),
|
||||
@ -1127,8 +1129,6 @@ export default {
|
||||
config.minHeight = 600;
|
||||
}
|
||||
this.$Electron.sendMessage('windowRouter', {
|
||||
title: this.taskDetail.name,
|
||||
titleFixed: true,
|
||||
name: 'task-' + this.taskDetail.id,
|
||||
path: "/single/task/" + this.taskDetail.id,
|
||||
force: false,
|
||||
@ -1162,12 +1162,12 @@ export default {
|
||||
viewFile(file) {
|
||||
if (this.$Electron) {
|
||||
this.$Electron.sendMessage('windowRouter', {
|
||||
title: `${file.name} (${$A.bytesToSize(file.size)})`,
|
||||
titleFixed: true,
|
||||
name: 'file-task-' + file.id,
|
||||
path: "/single/file/task/" + file.id,
|
||||
force: false,
|
||||
config: {
|
||||
title: `${file.name} (${$A.bytesToSize(file.size)})`,
|
||||
titleFixed: true,
|
||||
parent: null,
|
||||
width: Math.min(window.screen.availWidth, 1440),
|
||||
height: Math.min(window.screen.availHeight, 900),
|
||||
|
@ -855,13 +855,13 @@ export default {
|
||||
|
||||
openSingle(item) {
|
||||
this.$Electron.sendMessage('windowRouter', {
|
||||
title: this.formatName(item),
|
||||
titleFixed: true,
|
||||
userAgent: "/hideenOfficeTitle/",
|
||||
name: 'file-' + item.id,
|
||||
path: "/single/file/" + item.id,
|
||||
userAgent: "/hideenOfficeTitle/",
|
||||
force: false, // 如果窗口已存在不重新加载
|
||||
config: {
|
||||
title: this.formatName(item),
|
||||
titleFixed: true,
|
||||
parent: null,
|
||||
width: Math.min(window.screen.availWidth, 1440),
|
||||
height: Math.min(window.screen.availHeight, 900),
|
||||
|
@ -597,8 +597,7 @@
|
||||
.project-table {
|
||||
height: 100%;
|
||||
margin-top: 18px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
overflow: auto;
|
||||
.task-row {
|
||||
background-color: #ffffff;
|
||||
border-bottom: 1px solid #F4F4F5;
|
||||
@ -631,6 +630,7 @@
|
||||
}
|
||||
.project-table-head,
|
||||
.project-table-body {
|
||||
min-width: 800px;
|
||||
margin: 0 32px 12px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #F4F4F5;
|
||||
|
Loading…
x
Reference in New Issue
Block a user