renderer: implements of default layout structure
This commit is contained in:
1 parent
422719d295
commit
378795f265
9 files changed
+69
-15
No files matched your search
+1
-1
@@ -61,7 +61,7 @@ function startRenderer () {
|
|||||||
setupMiddlewares (middlewares, devServer) {
|
setupMiddlewares (middlewares, devServer) {
|
||||||
devServer.app.use(webpackHotMiddleware(compiler, {
|
devServer.app.use(webpackHotMiddleware(compiler, {
|
||||||
log: false,
|
log: false,
|
||||||
heartbeat: 2500
|
heartbeat: 5000
|
||||||
}))
|
}))
|
||||||
devServer.middleware.waitUntilValid(() => {
|
devServer.middleware.waitUntilValid(() => {
|
||||||
resolve()
|
resolve()
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"app": {
|
"desc": {
|
||||||
"title": "Vutron"
|
"welcome": "Thank you for using Vutron. This cool template makes it easy to create a variety of cross-platform applications."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"desc": {
|
||||||
|
"welcome": "Vutron을 이용해주셔서 감사드립니다. 이 멋진 템플릿을 활용하면 다양한 크로스플랫폼 애플리케이션을 손쉽게 제작할 수 있습니다."
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
|
<script setup>
|
||||||
|
import { DefaultLayout } from './components/layout'
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<router-view />
|
<DefaultLayout>
|
||||||
|
<router-view />
|
||||||
|
</DefaultLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<script setup>
|
||||||
|
import HeaderLayout from './HeaderLayout'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<v-app>
|
||||||
|
<v-layout>
|
||||||
|
<HeaderLayout />
|
||||||
|
<v-main>
|
||||||
|
<slot />
|
||||||
|
</v-main>
|
||||||
|
</v-layout>
|
||||||
|
</v-app>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<template>
|
||||||
|
<v-app-bar
|
||||||
|
color="primary"
|
||||||
|
density="compact"
|
||||||
|
>
|
||||||
|
<v-app-bar-title>{{ $route.meta.title }}</v-app-bar-title>
|
||||||
|
</v-app-bar>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import DefaultLayout from './DefaultLayout.vue'
|
||||||
|
import HeaderLayout from './HeaderLayout.vue'
|
||||||
|
|
||||||
|
export {
|
||||||
|
DefaultLayout,
|
||||||
|
HeaderLayout
|
||||||
|
}
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
|
||||||
import { useTempStore } from '../../store/temp'
|
|
||||||
|
|
||||||
const test = ref(1)
|
|
||||||
const temp = useTempStore()
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<v-container>
|
||||||
Main Screen {{ test }}
|
<v-row
|
||||||
{{ temp.text }}
|
align="center"
|
||||||
</div>
|
class="text-center"
|
||||||
|
>
|
||||||
|
<v-col cols="12">
|
||||||
|
<v-img
|
||||||
|
class="ma-auto"
|
||||||
|
src="/static/vutron-logo.png"
|
||||||
|
width="600"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="12">
|
||||||
|
{{ $t('desc.welcome') }}
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
@@ -6,11 +6,17 @@ export default createRouter({
|
|||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: MainScreen
|
component: MainScreen,
|
||||||
|
meta: {
|
||||||
|
title: 'Main'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/error',
|
path: '/error',
|
||||||
component: ErrorScreen
|
component: ErrorScreen,
|
||||||
|
meta: {
|
||||||
|
title: 'Unknown error occurred'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/:pathMatch(.*)*',
|
path: '/:pathMatch(.*)*',
|
||||||
|
|||||||
Reference in new issue
Block a user