generated from electron-vite/electron-vite-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
339 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,21 @@ | ||
# electron-vite-vue | ||
# Memory-Desktop | ||
|
||
🥳 Really simple `Electron` + `Vue` + `Vite` boilerplate. | ||
|
||
<!-- [![awesome-vite](https://awesome.re/mentioned-badge.svg)](https://github.com/vitejs/awesome-vite) --> | ||
<!-- [![Netlify Status](https://api.netlify.com/api/v1/badges/ae3863e3-1aec-4eb1-8f9f-1890af56929d/deploy-status)](https://app.netlify.com/sites/electron-vite/deploys) --> | ||
<!-- [![GitHub license](https://img.shields.io/github/license/caoxiemeihao/electron-vite-vue)](https://github.com/electron-vite/electron-vite-vue/blob/main/LICENSE) --> | ||
<!-- [![GitHub stars](https://img.shields.io/github/stars/caoxiemeihao/electron-vite-vue?color=fa6470)](https://github.com/electron-vite/electron-vite-vue) --> | ||
<!-- [![GitHub forks](https://img.shields.io/github/forks/caoxiemeihao/electron-vite-vue)](https://github.com/electron-vite/electron-vite-vue) --> | ||
[![GitHub Build](https://github.com/electron-vite/electron-vite-vue/actions/workflows/build.yml/badge.svg)](https://github.com/electron-vite/electron-vite-vue/actions/workflows/build.yml) | ||
[![GitHub Discord](https://img.shields.io/badge/chat-discord-blue?logo=discord)](https://discord.gg/sRqjYpEAUK) | ||
|
||
## Features | ||
A Desktop App For Upload Image To Github | ||
|
||
📦 Out of the box | ||
🎯 Based on the official [template-vue-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-vue-ts), less invasive | ||
🌱 Extensible, really simple directory structure | ||
💪 Support using Node.js API in Electron-Renderer | ||
🔩 Support C/C++ native addons | ||
🖥 It's easy to implement multiple windows | ||
|
||
## Quick Setup | ||
|
||
```sh | ||
# clone the project | ||
git clone https://github.com/electron-vite/electron-vite-vue.git | ||
## Download | ||
|
||
# enter the project directory | ||
cd electron-vite-vue | ||
[Click Here🤟](https://github.com/FuShaoLei/memory-desktop/releases) | ||
|
||
# install dependency | ||
npm install | ||
## ScreenShot | ||
|
||
# develop | ||
npm run dev | ||
``` | ||
![](./screenshot/img1.png) | ||
|
||
## Debug | ||
![](./screenshot/img2.png) | ||
|
||
![electron-vite-react-debug.gif](https://github.com/electron-vite/electron-vite-react/blob/main/electron-vite-react-debug.gif?raw=true) | ||
## Thanks | ||
|
||
## Directory | ||
|
||
```diff | ||
+ ├─┬ electron | ||
+ │ ├─┬ main | ||
+ │ │ └── index.ts entry of Electron-Main | ||
+ │ └─┬ preload | ||
+ │ └── index.ts entry of Preload-Scripts | ||
├─┬ src | ||
│ └── main.ts entry of Electron-Renderer | ||
├── index.html | ||
├── package.json | ||
└── vite.config.ts | ||
``` | ||
|
||
<!-- | ||
## Be aware | ||
🚨 By default, this template integrates Node.js in the Renderer process. If you don't need it, you just remove the option below. [Because it will modify the default config of Vite](https://github.com/electron-vite/vite-plugin-electron-renderer#config-presets-opinionated). | ||
```diff | ||
# vite.config.ts | ||
export default { | ||
plugins: [ | ||
- // Use Node.js API in the Renderer-process | ||
- renderer({ | ||
- nodeIntegration: true, | ||
- }), | ||
], | ||
} | ||
``` | ||
--> | ||
|
||
## FAQ | ||
|
||
- [C/C++ addons, Node.js modules - Pre-Bundling](https://github.com/electron-vite/vite-plugin-electron-renderer#dependency-pre-bundling) | ||
- [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron-renderer#dependencies-vs-devdependencies) | ||
- [electron-vite-vue](https://github.com/electron-vite/electron-vite-vue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<template> | ||
<div> | ||
<el-form label-width="170px" :rules="settingsFormRules" :model="settingsForm" ref="settingsFormRef"> | ||
<el-form-item label="Token" prop="token"> | ||
<el-input v-model="settingsForm.token" clearable style="width: 400px;margin-right: 10px"></el-input> | ||
</el-form-item> | ||
|
||
<el-form-item label="User" prop="name"> | ||
<el-input v-model="settingsForm.name" clearable style="width: 400px"></el-input> | ||
</el-form-item> | ||
<el-form-item label="Repo" prop="repo"> | ||
<el-input v-model="settingsForm.repo" clearable style="width: 400px"></el-input> | ||
</el-form-item> | ||
<el-form-item label="Branch" prop="repo"> | ||
<el-input v-model="settingsForm.branch" clearable style="width: 400px"></el-input> | ||
</el-form-item> | ||
</el-form> | ||
</div> | ||
</template> | ||
<script setup="GithubSettings"> | ||
import {ref, defineExpose} from "vue"; | ||
import {useSettingsStore} from "../stores/settingsData.js"; | ||
const settingsFormRef = ref() | ||
let settingsForm = ref( | ||
{ | ||
token: "", | ||
name: "", | ||
repo: "", | ||
branch:"" | ||
} | ||
) | ||
const settingsFormRules = ref({ | ||
token: [{required: true, message: 'Please input Token',trigger: 'blur'}], | ||
name: [{required: true, message: 'Please input User Name',trigger: 'blur'}], | ||
repo: [{required: true, message: 'Please input Repo Name',trigger: 'blur'}], | ||
branch: [{required: true, message: 'Please input Repo Name',trigger: 'blur'}] | ||
}) | ||
function init() { | ||
settingsForm.value = {...useSettingsStore().githubSettings} | ||
} | ||
function updateSettingsData() { | ||
settingsFormRef.value.validate((valid, fields) => { | ||
if (valid) { | ||
useSettingsStore().setGithubSettings(settingsForm.value) | ||
} | ||
}) | ||
} | ||
defineExpose({ | ||
init, | ||
updateSettingsData | ||
}) | ||
</script> | ||
<style scoped> | ||
</style> |
Oops, something went wrong.