mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-09-02 04:27:52 +08:00
npm run dev:all :)
This commit is contained in:
26
src/render/App.vue
Normal file
26
src/render/App.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="logo-box">
|
||||
<img style="height:200px;" src="./assets/electron.png" alt="Electron logo">
|
||||
<img alt="Vue logo" src="./assets/logo.png" />
|
||||
</div>
|
||||
<HelloWorld msg="Hello Electron 9.0 + Vue 3.0 + Vite" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.logo-box {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
BIN
src/render/assets/electron.png
Normal file
BIN
src/render/assets/electron.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
BIN
src/render/assets/logo.png
Normal file
BIN
src/render/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
19
src/render/components/HelloWorld.vue
Normal file
19
src/render/components/HelloWorld.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<h1>{{ msg }}</h1>
|
||||
<button @click="count++">count is: {{ count }}</button>
|
||||
<p>Edit <code>components/HelloWorld.vue</code> to test hot module replacement.</p>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
count: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
8
src/render/index.css
Normal file
8
src/render/index.css
Normal file
@@ -0,0 +1,8 @@
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
13
src/render/index.html
Normal file
13
src/render/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
5
src/render/main.js
Normal file
5
src/render/main.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import './index.css'
|
||||
|
||||
createApp(App).mount('#app')
|
BIN
src/render/public/favicon.ico
Normal file
BIN
src/render/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Reference in New Issue
Block a user