[Vuejs]-If you have multiple copies of a Component how do you trigger changes to them individually?

0👍

I solved the issue by creating a class object as a computed property. by default it flagged the class as disabled. I then used if statements to verify the name attached to each component, if true a flag would flip to true for that specific instance of the class. then finally a check to confirm that if the flag was set to true then activate the class. I’m sure there are more efficient ways, if you have one please share.

if(this.name === "Keywords" && this.view === "getViewCreateKeywords") {
        this.isActive = true;
    }

    if(this.name === "Listing" && this.view === "getViewCreateListing") {
        this.isActive = true;
    }

    if(this.name === "Backend" && this.view === "getViewCreateSummary") {
        this.isActive = true;
    }

    if(this.isActive) {
        return {
            disabled: this.isDisabled = false
        }
    }

    return {
        disabled: this.isDisabled = true
    }

Leave a comment