[Vuejs]-Is it possible to change the value of a prop in a vue component from methods

0👍

Try it

export default {
    props:['item','next'],
    data: function() {
        bookDetail:'',
        sameauthorbooks: this.next,
    },
    methods: {
        changeBook(item) {
            this.bookDetail = item;
        }
    },
    created() {
        this.bookDetail = this.item;
    }
}

Leave a comment