0👍
Some thing might be missing in your second block but i assume that you successfully can use true or false value as isSideBarOpen. All you need to do is to use style binding(you can also use class binding but you need to define specific class for padding right) Here is what you need:
<div id="app" :style="(isSideBarOpen) ? 'padding-right: 10px;' : ''">
/* code */
</div>
- [Vuejs]-The component runs on all pages without being called – Vue Nuxtjs
- [Vuejs]-Vue – How to pass data to child component after route is entered
Source:stackexchange.com