<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>changeColor</title>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<style>
div { 100px;height: 100px;background: lightcoral;}
.changeColor {background: lightgreen;}
</style>
<body>
<section id="app">
<div :class="{changeColor}" @click="changeColor =! changeColor">
</div>
</section>
<script>
new Vue({
el: '#app',
data: {
changeColor: false
}
})
</script>
</body>
</html>