diff --git a/electron/config/config.default.js b/electron/config/config.default.js
index 5ae2766..cbcb199 100644
--- a/electron/config/config.default.js
+++ b/electron/config/config.default.js
@@ -47,8 +47,8 @@ module.exports = (appInfo) => {
title: 'EE框架',
width: 980,
height: 650,
- minWidth: 800,
- minHeight: 650,
+ minWidth: 400,
+ minHeight: 300,
webPreferences: {
webSecurity: false,
contextIsolation: false, // false -> 可在渲染进程中使用electron的api,true->需要bridge.js(contextBridge)
diff --git a/electron/controller/effect.js b/electron/controller/effect.js
index 6508e49..039850d 100644
--- a/electron/controller/effect.js
+++ b/electron/controller/effect.js
@@ -3,6 +3,7 @@
const { Controller } = require('ee-core');
const { dialog } = require('electron');
const _ = require('lodash');
+const CoreWindow = require('ee-core/electron/window');
/**
* 特效 - 功能demo
@@ -17,7 +18,7 @@ class EffectController extends Controller {
/**
* 选择文件
*/
- selectFile () {
+ selectFile() {
const filePaths = dialog.showOpenDialogSync({
properties: ['openFile']
});
@@ -27,6 +28,42 @@ class EffectController extends Controller {
}
return filePaths[0];
+ }
+
+ /**
+ * login window
+ */
+ loginWindow(args) {
+ const { width, height } = args;
+ const win = CoreWindow.getMainWindow();
+
+ const size = {
+ width: width || 400,
+ height: height || 300
+ }
+ win.setSize(size.width, size.height);
+ win.setResizable(true);
+ win.center();
+ win.show();
+ win.focus();
+ }
+
+ /**
+ * restore window
+ */
+ restoreWindow(args) {
+ const { width, height } = args;
+ const win = CoreWindow.getMainWindow();
+
+ const size = {
+ width: width || 980,
+ height: height || 650
+ }
+ win.setSize(size.width, size.height);
+ win.setResizable(true);
+ win.center();
+ win.show();
+ win.focus();
}
}
diff --git a/frontend/src/api/main.js b/frontend/src/api/main.js
index 6df32c9..3ab08c6 100644
--- a/frontend/src/api/main.js
+++ b/frontend/src/api/main.js
@@ -51,6 +51,8 @@ const ipcApiRoute = {
// effect
selectFile: 'controller.effect.selectFile',
+ loginWindow: 'controller.effect.loginWindow',
+ restoreWindow: 'controller.effect.restoreWindow',
}
/**
diff --git a/frontend/src/assets/login.png b/frontend/src/assets/login.png
new file mode 100644
index 0000000..5882c86
Binary files /dev/null and b/frontend/src/assets/login.png differ
diff --git a/frontend/src/router/routerMap.js b/frontend/src/router/routerMap.js
index 32fabe3..ba9ace6 100644
--- a/frontend/src/router/routerMap.js
+++ b/frontend/src/router/routerMap.js
@@ -148,6 +148,11 @@ const constantRouterMap = [
name: 'EffectVideoIndex',
component: () => import('@/views/effect/video/Index.vue')
},
+ {
+ path: '/effect/login/index',
+ name: 'EffectLoginIndex',
+ component: () => import('@/views/effect/login/Index.vue')
+ }
]
},
]
@@ -159,7 +164,12 @@ const constantRouterMap = [
path: 'subwindow',
name: 'SpecialSubwindowIpc',
component: () => import('@/views/os/subwindow/Ipc.vue')
- }
+ },
+ {
+ path: '/login',
+ name: 'SpecialLoginWindow',
+ component: () => import('@/views/effect/login/Window.vue')
+ },
]
},
]
diff --git a/frontend/src/router/subMenu.js b/frontend/src/router/subMenu.js
index fd18143..063cfe5 100644
--- a/frontend/src/router/subMenu.js
+++ b/frontend/src/router/subMenu.js
@@ -128,6 +128,12 @@ export default {
title: '视频播放器',
pageName: 'EffectVideoIndex',
params: {}
- }
+ },
+ 'menu_110' : {
+ icon: 'profile',
+ title: '登录',
+ pageName: 'EffectLoginIndex',
+ params: {}
+ }
}
}
diff --git a/frontend/src/views/effect/login/Index.vue b/frontend/src/views/effect/login/Index.vue
new file mode 100644
index 0000000..420797f
--- /dev/null
+++ b/frontend/src/views/effect/login/Index.vue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/effect/login/Window.vue b/frontend/src/views/effect/login/Window.vue
new file mode 100644
index 0000000..e57da05
--- /dev/null
+++ b/frontend/src/views/effect/login/Window.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/os/file/Pic.vue b/frontend/src/views/os/file/Pic.vue
index 51fe399..10dcb37 100644
--- a/frontend/src/views/os/file/Pic.vue
+++ b/frontend/src/views/os/file/Pic.vue
@@ -38,16 +38,16 @@ export default {
\ No newline at end of file