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