coder_uzb
425
2
Vue

call init in vue component?

Posted 1 year ago by coder_uzb

Hi. I have main.js

var RATEYO = {
        selector: $('.rateYo'),
        init:function(){
            this.selector.rateYo({
                rating: 2,
                fullStar: true,
                ratedFill: '#CA0828',
                starWidth: '16px',
                readOnly: true
            });
            var normalFill = this.selector.rateYo("option", "fullStar"); //returns true
        // Setter
            this.selector.rateYo("option", "fullStar", true); //returns a jQuery Element    
        }
    }   
        
    RATEYO.init();

My question how can I call or use RATEYO.init() in vue component when I change router-link?

Please sign in or create an account to participate in this conversation.