Created
April 7, 2017 19:47
-
-
Save alonextou/72b3d2072dcf8eb6e91a6c4d77c27381 to your computer and use it in GitHub Desktop.
main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app"> | |
<component :is="DefaultLayout"> | |
<router-view></router-view> | |
</component> | |
</div> | |
</template> | |
<script> | |
import 'bootstrap' | |
import DefaultLayout from '@/components/DefaultLayout' | |
export default { | |
name: 'app', | |
mounted: function () { | |
var $loading = $('#ajaxLoading').hide() | |
$(document).ajaxStart(function () { | |
$loading.show() | |
}).ajaxStop(function () { | |
$loading.hide() | |
}) | |
}, | |
components: { | |
DefaultLayout | |
} | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<nav class="navbar navbar-default"> | |
<div class="container-fluid"> | |
<div class="navbar-header"> | |
<!-- Collapsed Hamburger --> | |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse"> | |
<span class="sr-only">Toggle Navigation</span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<a class="navbar-brand" href="#"> | |
Portal | |
</a> | |
</div> | |
<div class="collapse navbar-collapse" id="app-navbar-collapse"> | |
<!-- Left Side Of Navbar --> | |
<ul class="nav navbar-nav"> | |
<li class="dropdown"> | |
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Orders</a> | |
<ul class="dropdown-menu" role="menu"> | |
<li> | |
<router-link :to="{name: 'hotel-orders'}" class="dropdown-toggle" data-toggle="dropdown"> | |
Hotel Orders | |
</router-link> | |
</li> | |
<li> | |
<router-link :to="{name: 'transportation-orders'}" class="dropdown-toggle" data-toggle="dropdown"> | |
Transportation Orders | |
</router-link> | |
</li> | |
</ul> | |
<li> | |
<router-link :to="{name: 'transports'}"> | |
Transports | |
</router-link> | |
</li> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</nav> | |
<slot> | |
This will only be displayed if there is no content | |
to be distributed. | |
</slot> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'DefaultLayout' | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
import Vue from 'vue' | |
import App from './App' | |
import router from './router' | |
Vue.config.productionTip = false | |
/* eslint-disable no-new */ | |
new Vue({ | |
el: '#app', | |
router, | |
template: '<App/>', | |
components: { App } | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment