提交 cd5899bd 编写于 作者: 璃白.'s avatar 璃白. 🌻

fix:适配windows

上级 bc8fb197
......@@ -29,7 +29,7 @@ module.exports = () => {
backgroundThrottling: false,
contextIsolation: false,
webviewTag: true,
devTools: true,
devTools: false,
nodeIntegration: true, // 在网页中集成Node
preload: `${path.resolve(__dirname, "./preload.js")}`
}
......
......@@ -417,6 +417,7 @@ class Listener {
windowMoveInit(win) {
let hasInit = false;
ipcMain.on("window-move", () => {
let bounds = win.getBounds();
if (!hasInit) {
hasInit = true;
ioHook.start(false);
......@@ -432,7 +433,9 @@ class Listener {
winStartPosition.x + cursorPosition.x - mouseStartPosition.x;
const dy =
winStartPosition.y + cursorPosition.y - mouseStartPosition.y;
win.setPosition(parseInt(dx), parseInt(dy));
bounds.x = parseInt(dx);
bounds.y = parseInt(dy);
win.setBounds(bounds);
});
ioHook.on("mouseup", e => {
......
<template>
<div id="app" @mousedown="drag">
<a-layout id="components-layout">
<a-layout id="components-layout" :class="[{ mac: isMac }]">
<div v-if="!searchType" class="rubick-select">
<div v-if="selected" class="tag-container">
<template v-if="isWebview">
......@@ -488,6 +488,9 @@ export default {
"userInfo",
"pluginLoading"
]),
isMac() {
return commonConst.macOS()
},
isWebview() {
return this.pluginInfo.subType === "webview";
},
......@@ -546,9 +549,11 @@ body {
#components-layout {
overflow: auto;
-webkit-app-region: drag;
// margin-top: 14px;
background: #fff;
&.mac {
-webkit-app-region: drag;
}
::-webkit-scrollbar {
width: 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册