Last active
April 24, 2018 02:23
-
-
Save brunokunace/a5f4b4a18d52566f6af29c9a7baf7e64 to your computer and use it in GitHub Desktop.
how change the a.selector background style
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 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