first
This commit is contained in:
54
src/main.js
Normal file
54
src/main.js
Normal file
@ -0,0 +1,54 @@
|
||||
import { createApp } from "vue";
|
||||
import "./styles.css";
|
||||
import App from "./AppHyperSpectral.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 {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";
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// app.use(BootstrapVueIcons);
|
||||
app.mount("#app");
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user