Created
March 20, 2018 10:03
-
-
Save nulpatrol/cc34a36a640ca5b28646ac998c88fd0c to your computer and use it in GitHub Desktop.
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 v-if="!$route.name.includes('loginVue')"> | |
<div class="container-left"> | |
<div class="col-md-12 events-wrap"> | |
<router-view :name="getRVName" /> | |
</div> | |
</div> | |
<div class="container-right" v-if="!isMobile"> | |
<transition name="fade"><router-view name="rightContainer" /></transition> | |
</div> | |
</div> | |
<div v-else> | |
<div class="container"> | |
<router-view name="leftContainer" /> | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { | |
windowWidth: $(window).width(), | |
}; | |
}, | |
computed: { | |
getRVName() { | |
if (this.isMobile) { | |
return 'mobile'; | |
} | |
return 'leftContainer'; | |
}, | |
isMobile() { | |
return this.windowWidth <= 1023; | |
}, | |
}, | |
mounted() { | |
window.onresize = (e) => { | |
this.windowWidth = e.currentTarget.innerWidth; | |
}; | |
}, | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment