Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div :style="css"></div>
- </template>
- <script>
- export default {
- computed: {
- css () {
- let width = window.innerWidth
- // ... mobile { ... styles }
- // ... desktop { ... styles }
- // ... if width is less than 700, return mobile
- // ... if width greater than 700, return desktop
- }
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement