[Vuejs]-Vue v-model does not seem to be working in modal

0👍

Upd.

According to your comments to my answer you are using v-for and you can’t use this.job within your method. You should give us more code to see the whole picture.

Upd.2

You have showed more code but I didn’t see any v-for so I am confused. You can try to use something like this if job is a property of appData.jobs:

        showPriceJob: function (job) {
            this.appData.jobs.job = Object.assign({}, job);
            this.appData.jobs.job = parseFloat(this.appData.jobs.job.price);
            $('#mdlPriceJob').modal('show');
        },

But I’m not sure about this because I don’t see where job is declared.

Upd.3

Oh! Wait! You have this code:

data: appData.jobs, but data should be in this format:

data: function(){
    return {
        appData: {
            jobs: [],
        },
    }
},

Or show me what is your appData.jobs variable is.

Leave a comment