mirror of
https://github.com/rubickCenter/rubick
synced 2025-07-19 06:09:41 +08:00
格式化main.js
This commit is contained in:
parent
db12d66ff7
commit
fb6006d96b
@ -1,18 +1,18 @@
|
|||||||
import Vue from 'vue'
|
import Vue from "vue";
|
||||||
import axios from 'axios'
|
import axios from "axios";
|
||||||
import ioHook from 'iohook';
|
import ioHook from "iohook";
|
||||||
import {ipcRenderer, remote} from 'electron';
|
import { ipcRenderer, remote } from "electron";
|
||||||
import App from './App'
|
import App from "./App";
|
||||||
import router from './router'
|
import router from "./router";
|
||||||
import store from './store'
|
import store from "./store";
|
||||||
import Antd from 'ant-design-vue';
|
import Antd from "ant-design-vue";
|
||||||
|
|
||||||
import './assets/ant-reset.less';
|
import "./assets/ant-reset.less";
|
||||||
|
|
||||||
const opConfig = remote.getGlobal('opConfig');
|
const opConfig = remote.getGlobal("opConfig");
|
||||||
|
|
||||||
if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
|
if (!process.env.IS_WEB) Vue.use(require("vue-electron"));
|
||||||
Vue.http = Vue.prototype.$http = axios
|
Vue.http = Vue.prototype.$http = axios;
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
Vue.use(Antd);
|
Vue.use(Antd);
|
||||||
@ -22,25 +22,25 @@ new Vue({
|
|||||||
components: { App },
|
components: { App },
|
||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
template: '<App/>'
|
template: "<App/>",
|
||||||
}).$mount('#app');
|
}).$mount("#app");
|
||||||
|
|
||||||
ioHook.start(false);
|
ioHook.start(false);
|
||||||
|
|
||||||
let down_time = 0;
|
let down_time = 0;
|
||||||
let isPress = false;
|
let isPress = false;
|
||||||
ioHook.on('mousedown', (e) => {
|
ioHook.on("mousedown", (e) => {
|
||||||
if (e.button === 1) return;
|
if (e.button === 1) return;
|
||||||
isPress = true;
|
isPress = true;
|
||||||
down_time = Date.now();
|
down_time = Date.now();
|
||||||
const config = opConfig.get();
|
const config = opConfig.get();
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
if (isPress) {
|
if (isPress) {
|
||||||
ipcRenderer.send('right-down');
|
ipcRenderer.send("right-down");
|
||||||
}
|
}
|
||||||
}, config.superPanel.mouseDownTime);
|
}, config.superPanel.mouseDownTime);
|
||||||
})
|
});
|
||||||
ioHook.on('mouseup', (e) => {
|
ioHook.on("mouseup", (e) => {
|
||||||
if (e.button === 1) return;
|
if (e.button === 1) return;
|
||||||
isPress = false;
|
isPress = false;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user