Change directory of vue multi-page entries

This commit is contained in:
kPherox 2019-04-09 22:52:07 +09:00
parent 6269d07d01
commit d03764140e
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
8 changed files with 23 additions and 23 deletions

View File

@ -1,8 +0,0 @@
import Vue from 'vue'
import About from './About.vue'
Vue.config.productionTip = false
new Vue({
render: h => h(About),
}).$mount('#app')

10
src/entries/_mount.ts Normal file
View File

@ -0,0 +1,10 @@
import Vue, { VueConstructor } from 'vue'
import '@/components/_globals'
Vue.config.productionTip = false
export default function(render: VueConstructor) {
new Vue({
render: h => h(render),
}).$mount('#app')
}

4
src/entries/about.ts Normal file
View File

@ -0,0 +1,4 @@
import vueMount from './_mount'
import About from '@/views/About.vue'
vueMount(About)

4
src/entries/main.ts Normal file
View File

@ -0,0 +1,4 @@
import vueMount from './_mount'
import App from '@/views/App.vue'
vueMount(App)

View File

@ -1,8 +0,0 @@
import Vue from 'vue'
import Index from './Index.vue'
Vue.config.productionTip = false
new Vue({
render: h => h(Index),
}).$mount('#app')

View File

@ -6,9 +6,9 @@
</div>
<p id="app-name">{{ productName }}</p>
<p id="web-site">
<a :href="homePage">
<BaseLink :href="homePage">
Web site
</a>
</BaseLink>
</p>
</div>
<dl class="version">
@ -55,7 +55,7 @@ dl.version {
grid-auto-rows: 1.5em;
text-align: left;
-webkit-app-region: no-drag;
user-select: all;
user-select: text;
padding: .5em;
dt, dd {
margin-left: 0;
@ -83,7 +83,6 @@ export default class About extends Vue {
constructor() {
super()
let { productName, homePage, copyright, codeName, versions } = ipcRenderer.sendSync('thedesk-info')
console.log(versions)
this.productName = productName
this.homePage = homePage
this.copyright = copyright

View File

@ -5,13 +5,12 @@ const { appId, copyright } = require("./info.json")
module.exports = {
pages: {
index: {
entry: 'src/index/main.ts',
entry: 'src/entries/main.ts',
template: 'public/index.html',
title: productName,
},
about: {
entry: 'src/about/main.ts',
template: 'public/index.html',
entry: 'src/entries/about.ts',
title: `About`,
},
},