mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-11-04 03:08:25 +00:00 
			
		
		
		
	display of eye-icon fixed
This commit is contained in:
		@@ -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");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user