mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
display of eye-icon fixed
This commit is contained in:
parent
d009d09215
commit
c1a845e3e1
@ -3,29 +3,17 @@
|
||||
<div class="confidential-content blur">
|
||||
<slot name="confidential-content"></slot>
|
||||
</div>
|
||||
<i class="fa fa-eye toggle" aria-hidden="true"></i>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Confidential",
|
||||
computed : {
|
||||
getConfidentialInfo: function(){
|
||||
var infos = document.getElementsByClassName("confidential");
|
||||
return infos;
|
||||
},
|
||||
addToggles: function(){
|
||||
var infos = this.getConfidentialInfo;
|
||||
if(this.getConfidentialInfo !== null){
|
||||
for(var i=0; i < infos.length; i++){
|
||||
infos[i].insertAdjacentHTML('beforeend', '<i class="fa fa-eye toggle" v-on:click="toggleBlur" aria-hidden="true"></i>');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods : {
|
||||
toggleBlur: function(e){
|
||||
if(e.target.matches('.toggle')){
|
||||
console.log(e);
|
||||
e.target.previousElementSibling.classList.toggle("blur");
|
||||
e.target.classList.toggle("fa-eye");
|
||||
e.target.classList.toggle("fa-eye-slash");
|
||||
|
Loading…
x
Reference in New Issue
Block a user