66 lines
1.7 KiB
JavaScript
66 lines
1.7 KiB
JavaScript
import { createApp } from "vue";
|
|
import "./styles.css";
|
|
//import App from "./AppHyperSpectral.vue";
|
|
import App from "./App.vue";
|
|
import { appWindow } from "@tauri-apps/api/window";
|
|
import { LogicalSize } from "@tauri-apps/api/window";
|
|
import ElementPlus from "element-plus";
|
|
import "element-plus/dist/index.css";
|
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
import { createBootstrap } from "bootstrap-vue-next";
|
|
|
|
//
|
|
// // Add the necessary CSS
|
|
import "bootstrap/dist/css/bootstrap.css";
|
|
import "bootstrap-vue-next/dist/bootstrap-vue-next.css";
|
|
import ArcoVue from "@arco-design/web-vue";
|
|
|
|
import "@arco-design/web-vue/dist/arco.css";
|
|
import {
|
|
Draggable,
|
|
DraggablePlugin,
|
|
DraggableDirective,
|
|
} from "@braks/revue-draggable";
|
|
import KonamiCode from "vue3-konami-code";
|
|
import EventBus from "./eventBus.js";
|
|
import tauriApi from "./utils/tauriApi.js";
|
|
|
|
async function setWindowSize() {
|
|
// const primaryMonitor = await screen.primaryMonitor();
|
|
// const screenSize = primaryMonitor.size;
|
|
|
|
const newSize = new LogicalSize(800, 600);
|
|
await appWindow.setSize(newSize);
|
|
// appWindow.setSize(new Size(1000, 1000));
|
|
}
|
|
var app = createApp(App);
|
|
app.use(ElementPlus, {
|
|
locale: zhCn,
|
|
});
|
|
app.use(
|
|
createBootstrap({
|
|
components: true,
|
|
directives: true,
|
|
plugins: true,
|
|
icons: true,
|
|
})
|
|
);
|
|
app.use(ArcoVue);
|
|
app.use(DraggablePlugin);
|
|
app.use(KonamiCode, {
|
|
onKonamiCodeEntered: () => {
|
|
// 用户输入Konami Code后执行的代码
|
|
console.log("Konami Code 已输入!");
|
|
EventBus.emit("konamiactive");
|
|
},
|
|
});
|
|
// or
|
|
app.directive("draggable", DraggableDirective);
|
|
app.component("Draggable", Draggable);
|
|
|
|
// 注册全局 API
|
|
app.config.globalProperties.$tauriApi = tauriApi;
|
|
|
|
// app.use(BootstrapVueIcons);
|
|
app.mount("#app");
|