Router update to avoid if else check
parent
02f4924a4a
commit
093505e8d1
|
@ -1,6 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-93461466-1"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-93461466-1"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<Home v-if="$route.path === '/'" :theme="theme" @change-theme="changeTheme" />
|
<div>
|
||||||
<App v-else :theme="theme" @change-theme="changeTheme" />
|
<router-view></router-view>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Home from './Home.vue';
|
|
||||||
import App from './App.vue';
|
|
||||||
import EventBus from '@/AppEventBus';
|
import EventBus from '@/AppEventBus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -45,11 +44,11 @@ export default {
|
||||||
cloneLinkElement.setAttribute('id', id);
|
cloneLinkElement.setAttribute('id', id);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
}/*,
|
||||||
components: {
|
components: {
|
||||||
'App': App,
|
'App': App,
|
||||||
'Home': Home
|
'Home': Home
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
1613
src/router/index.js
1613
src/router/index.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue