Created
July 11, 2019 14:58
-
-
Save ThomasKruegl/77cbd23c34ecd05d6d234a2a59acc455 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> | |
<div :class="isSmall ? 'small' : 'large'" | |
@click="resize()" | |
class="other-styles"></div> | |
<div class="other-styles"></div> | |
<div class="other-styles"></div> | |
<div class="other-styles"></div> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: "Foo", | |
data: function () { | |
return { | |
isSmall: false | |
}; | |
}, | |
methods: { | |
resize () { | |
this.isSmall = !this.isSmall; | |
} | |
} | |
}; | |
</script> | |
<style scoped> | |
.small { | |
width: 100px; | |
} | |
.large { | |
width: 500px; | |
} | |
.other-styles { | |
background-color: blue; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment