From d03764140e276609d20188256511dee072b882e4 Mon Sep 17 00:00:00 2001 From: kPherox Date: Tue, 9 Apr 2019 22:52:07 +0900 Subject: [PATCH] Change directory of vue multi-page entries --- src/about/main.ts | 8 -------- src/entries/_mount.ts | 10 ++++++++++ src/entries/about.ts | 4 ++++ src/entries/main.ts | 4 ++++ src/index/main.ts | 8 -------- src/{about => views}/About.vue | 7 +++---- src/{index/Index.vue => views/App.vue} | 0 vue.config.js | 5 ++--- 8 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 src/about/main.ts create mode 100644 src/entries/_mount.ts create mode 100644 src/entries/about.ts create mode 100644 src/entries/main.ts delete mode 100644 src/index/main.ts rename src/{about => views}/About.vue (96%) rename src/{index/Index.vue => views/App.vue} (100%) diff --git a/src/about/main.ts b/src/about/main.ts deleted file mode 100644 index f9cf91fb..00000000 --- a/src/about/main.ts +++ /dev/null @@ -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') diff --git a/src/entries/_mount.ts b/src/entries/_mount.ts new file mode 100644 index 00000000..e2aa22f9 --- /dev/null +++ b/src/entries/_mount.ts @@ -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') +} \ No newline at end of file diff --git a/src/entries/about.ts b/src/entries/about.ts new file mode 100644 index 00000000..a9ffe969 --- /dev/null +++ b/src/entries/about.ts @@ -0,0 +1,4 @@ +import vueMount from './_mount' +import About from '@/views/About.vue' + +vueMount(About) \ No newline at end of file diff --git a/src/entries/main.ts b/src/entries/main.ts new file mode 100644 index 00000000..914a187f --- /dev/null +++ b/src/entries/main.ts @@ -0,0 +1,4 @@ +import vueMount from './_mount' +import App from '@/views/App.vue' + +vueMount(App) \ No newline at end of file diff --git a/src/index/main.ts b/src/index/main.ts deleted file mode 100644 index b28fa51a..00000000 --- a/src/index/main.ts +++ /dev/null @@ -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') diff --git a/src/about/About.vue b/src/views/About.vue similarity index 96% rename from src/about/About.vue rename to src/views/About.vue index f47c1d2c..3bb6b636 100644 --- a/src/about/About.vue +++ b/src/views/About.vue @@ -6,9 +6,9 @@

{{ productName }}

- + Web site - +

@@ -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 diff --git a/src/index/Index.vue b/src/views/App.vue similarity index 100% rename from src/index/Index.vue rename to src/views/App.vue diff --git a/vue.config.js b/vue.config.js index 19e9f59e..7e64eac2 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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`, }, },