<template>
	<div id="app" class="fs16">
		 <!--name="router-fade" mode="out-in"-->
		<!--<transition>-->
			<router-view></router-view>
		<!--</transition>-->
		<loading-md></loading-md>
		<nav-md></nav-md>
	</div>
</template>

<script>
	import { mapState, mapMutations } from 'vuex'

	export default {
		name: 'app',

		//computed: {
		//  ...mapState({
		//    isLoading: state => state.isLoading
		//  })
		//},
		mounted() {
			this.INIT();
			if(window.plus) {
				setTimeout(function() { //解决callback与plusready事件的执行时机问题(典型案例:showWaiting,closeWaiting)
					plus.navigator.setStatusBarBackground('#006c3d');
					plus.screen.lockOrientation("portrait-primary");
				}, 0);
			} else {
				document.addEventListener("plusready", function() {
					plus.navigator.setStatusBarBackground('#006c3d');
					plus.screen.lockOrientation("portrait-primary");
				}, false);
			}
			
		},
		methods: {
			...mapMutations([
				'INIT'
			])
		}
	}
</script>

<style lang="less">
	@import url("./assets/config");
	@import url("./assets/common.less");
	#app {
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;

		width: 100%;
		max-width: 1080px;
		height: 100%;
		padding-left:@leftL;
		margin: 0 auto;
	}
</style>