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