Skip to content

Instantly share code, notes, and snippets.

@brunokunace
Last active April 24, 2018 02:23
Show Gist options
  • Save brunokunace/a5f4b4a18d52566f6af29c9a7baf7e64 to your computer and use it in GitHub Desktop.
Save brunokunace/a5f4b4a18d52566f6af29c9a7baf7e64 to your computer and use it in GitHub Desktop.
how change the a.selector background style
<template lang="pug>
section(id="main")
a(href="#" @click="ModalShow" :class="{'selector' : sectionModal}")
span
i(class="fa fa-bar-chart")
span Open section modal
<modal v-if="sectionModal">
h1 hello my friend!!
button(class="button is-info is-large modal-button" @click="closeModal") Close
</modal>
</template>
<script>
import Jwtdecode from 'jwt-decode'
import Modal from 'layout/modal/BaseModal.vue'
export default {
data: function() {
return {
sectionModal: false,
}
},
components: {
'modal': Modal,
},
methods: {
ModalShow: function() {
this.sectionModal = true;
},
closeModal: function() {
this.sectionModal = false;
}
},
mounted(){
this.user = JwtDecode(localStorage.getItem('token'))
}
}
</script>
<style scoped>
.selector {
background-color: red;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment