const tray = new Tray(icon) const contextMenu = [ { label: '退出', click: function () { app.exit() } } ] const menu = Menu.buildFromTemplate(contextMenu) tray.setToolTip('EC编程俱乐部') tray.setContextMenu(menu) tray.on('click', () => { // 使窗口显示在任务栏中 mainWindow.s...
二、隐藏头部菜单栏 import { app,Menu, BrowserWindow } from 'electron' // 隐藏应用菜单 Menu.setApplicationMenu(null); 也可以通过配置参数frame:false实现整体隐藏 function createWindow() { win = new BrowserWindow({ icon: path.join(process.env.VITE_PUBLIC, 'electron-vite.svg'), frame: false, /...
* Electron多窗口管理器 * @author Andy Q:282310962*/const { app, BrowserWindow, ipcMain, Menu, Tray, dialog, globalShortcut }= require('electron')//const { loadEnv } = require('vite')const { join } = require('path')//根目录路径process.env.ROOT = join(__dirname, '../../') co...
const tray = new Tray(icon) const contextMenu = [ { label: '退出', click: function () { app.exit() } } ] const menu = Menu.buildFromTemplate(contextMenu) tray.setToolTip('EC编程俱乐部') tray.setContextMenu(menu) tray.on('click', () => { // 使窗口显示在任务栏中 mainWindow.s...
一、安装依赖 npm install axios 二、封装通用请求工具 src/utils/request.ts import axios from 'axios' import { ElNotification , ElMessageBox, ElMessage, ElLoading } from 'element-plus' import { getToken } from '@/utils/auth' import errorCode from '@/utils/errorCode' ...
<el-container> <div class="layout__left"> <el-aside class="the-menu"> <el-menu default-active="1" class="el-menu-vertical-demo" router > <el-menu-item index="/"> <div class="IconItem"> <el-icon><i-ep-home-filled /></el-icon> </div> <span>主页</span> </el-menu-item...
* @desc 国际化语言配置(主模板)*/exportdefault{'layout__main-menu__home': '首页','layout__main-menu__home_dashboard': '控制台','layout__main-menu__home_breadcrumbs': '自定义面包屑导航','layout__main-menu__home_breadcrumbs-link': 'https://cn.vitejs.dev/','layout__main-menu__hom...
import { app, BrowserWindow, ipcMain, Menu, Tray } from "electron"; import path from "path"; interface IWindowsCfg { id: number | null; title: string; width: number | null; height: number | null; minWidth: number | null; minHeight: number | null; ...
</el-dropdown-menu> </template> </el-dropdown> ... </template> <template #wbtn> <MsgMenu /> <a class="menu" title="换肤" @click="handleSkinWin"><i class="iconfont el-icon-magic-stick"></i></a> <a class="menu" :class="{'on': isAlwaysOnTop}" :title="isAlwaysOnTop ?
constdeskMenu=[{uid:'d137f210-507e-7e8e-1950-9deefac27e48',list:[{imgico:markRaw(Today),size:'2x2'},{label:'日历',imgico:markRaw(Calendar3x3),size:'3x3'},{label:'Electron32',imgico:'/electron.svg',link:'https://www.electronjs.org/'},// ...]},{uid:'g270f210-207e-6e8...