How to replace the value of vue.js onclick function after calculation?

it works when I write the event directly on click,

@click="diary.ispraise=1-diary.ispraise,diary.countpraise+=2*diary.ispraise-1" 

when changing to a function to pass a value, I don"t know how to write it. I"d like to ask for advice. no, no, no.

@click="myPra(diary.ispraise,diary.countpraise)"

js:

myPra:function(a,b){
                        a=1-a;
                        b+=2*a-1;
                    }
May.01,2021

you can't pass a value directly

@click="myPra(diary)"
myPra:function(diary){
    diary.ispraise=1-diary.ispraise;
    diary.countpraise+=2*diary.ispraise-1;
}

@ click= "myPra (diary.ispraise,diary.countpraise)" so there is no problem.
only if you make sure that you already have the diary object in your data data, and that you already have the two attributes ispraise,countpraise in the diary object

.

data: {

diary:{
    ispraise: ,
    countpraise:  
}
If you bind in this way again in the

}
page, there will be no error.
@ click= "myPra (diary.ispraise,diary.countpraise)"

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea9b2e-47d3f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea9b2e-47d3f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?