feat: Electron Demo

This commit is contained in:
younglei 2022-06-14 20:56:24 +08:00
parent c9188fd2f9
commit b6a24b71eb
2 changed files with 36 additions and 2 deletions

View File

@ -5,8 +5,18 @@ import HelloWorld from './components/HelloWorld.vue'
</script> </script>
<template> <template>
<img alt="Vue logo" src="./assets/vue.png" /> <div class="logo-box">
<img style="height:140px;" src="./assets/electron.png" >
<span/>
<img style="height:140px;" src="./assets/vite.svg" >
<span/>
<img style="height:140px;" src="./assets/vue.png" >
</div>
<HelloWorld msg="Hello Vue 3 + TypeScript + Vite" /> <HelloWorld msg="Hello Vue 3 + TypeScript + Vite" />
<div class="static-public">
Place static files into the <code>/public</code> folder
<img style="width:77px;" :src="'./node.png'" >
</div>
</template> </template>
<style> <style>
@ -18,4 +28,25 @@ import HelloWorld from './components/HelloWorld.vue'
color: #2c3e50; color: #2c3e50;
margin-top: 60px; margin-top: 60px;
} }
.logo-box {
display: flex;
width: 100%;
justify-content: center;
}
.logo-box span {
width: 74px;
}
.static-public {
display: flex;
align-items: center;
justify-content: center;
}
.static-public code {
background-color: #eee;
padding: 2px 4px;
margin: 0 4px;
border-radius: 4px;
color: #304455;
}
</style> </style>

View File

@ -1,4 +1,7 @@
import { createApp } from 'vue' import { createApp } from 'vue'
import App from './App.vue' import App from './App.vue'
import './samples/node-api'
createApp(App).mount('#app') createApp(App)
.mount('#app')
.$nextTick(window.removeLoading)