Files
erp_sb/electron-vue-template
zhangzijienbplus 3a76aaa3c0 feat(client): 实现用户数据隔离与设备绑定优化- 添加用户会话ID构建逻辑,确保数据按用户隔离- 优化设备绑定流程,支持设备状态更新和绑定时间同步- 实现用户缓存清理功能,仅清除当前用户的数据- 增强客户端账号删除逻辑,级联删除相关数据
- 调整设备在线查询逻辑,确保只返回活跃绑定的设备
- 优化试用期逻辑,精确计算过期时间和类型- 添加账号管理弹窗和相关状态注入
-修复跟卖精灵按钮加载状态显示问题
- 增强文件上传区域UI,显示选中文件名
- 调整分页组件样式,优化界面展示效果- 优化反馈日志存储路径逻辑,默认使用用户目录
- 移除冗余代码和无用导入,提升代码整洁度
2025-10-24 13:43:46 +08:00
..
1
2025-10-09 11:18:26 +08:00
2025-09-22 11:51:16 +08:00
1
2025-10-10 15:37:57 +08:00

Electron Vue Template

image

A simple starter template for a Vue3 + Electron TypeScript based application, including ViteJS and Electron Builder.

About

This template utilizes ViteJS for building and serving your (Vue powered) front-end process, it provides Hot Reloads (HMR) to make development fast and easy

Building the Electron (main) process is done with Electron Builder, which makes your application easily distributable and supports cross-platform compilation 😎

Getting started

Click the green Use this template button on top of the repository, and clone your own newly created repository.

Or..

Clone this repository: git clone git@github.com:Deluze/electron-vue-template.git

Install dependencies

npm install

Start developing ⚒️

npm run dev

Additional Commands

npm run dev # starts application with hot reload
npm run build # builds application, distributable files can be found in "dist" folder

# OR

npm run build:win # uses windows as build target
npm run build:mac # uses mac as build target
npm run build:linux # uses linux as build target

Optional configuration options can be found in the Electron Builder CLI docs.

Project Structure

- scripts/ # all the scripts used to build or serve your application, change as you like.
- src/
  - main/ # Main thread (Electron application source)
  - renderer/ # Renderer thread (VueJS application source)

Using static files

If you have any files that you want to copy over to the app directory after installation, you will need to add those files in your src/main/static directory.

Files in said directory are only accessible to the main process, similar to src/renderer/assets only being accessible to the renderer process. Besides that, the concept is the same as to what you're used to in your other front-end projects.

Referencing static files from your main process

/* Assumes src/main/static/myFile.txt exists */

import {app} from 'electron';
import {join} from 'path';
import {readFileSync} from 'fs';

const path = join(app.getAppPath(), 'static', 'myFile.txt');
const buffer = readFileSync(path);