How element-ui input passes in custom parameters while retaining the default parameters in the @ change event

<el-input-number class="ipt"
     v-model="formData.roomAreaSelfuse.value"
     :controls="false"
     :precision="2"
     controls-position="right"
     @change="countTotalArea("roomAreaSelfuse")"></el-input-number>

for example, the @ change event on the document has default parameters, and the default parameters are the old value and the new value, respectively. Now I want to input this custom parameter while keeping the default parameter, which equals to three parameters in my countTotalArea method, oldval,newval and name. How to solve it? the methods that have seen scope on the Internet and so on are not effective.


@ change= "countTotalArea ($event,'roomAreaSelfuse')"


The default parameter @ change on the

document is the value of input. There is no such thing as
@ change= "countTotalArea ($event,'roomAreaSelfuse')"

.
countTotalArea(val,str) {
    //  roomAreaSelfuse
    // val input  str
}

clipboard.png


change should have only one default callback parameter, which can be written as

@change="val => countTotalArea(val, 'roomAreaSelfuse')"

of course, multiple callback parameters are written in the same way

 @change="(oldval, newval) => countTotalArea(oldval, newval, 'roomAreaSelfuse')"

@ change= "((newVal, oldVal) = > {countTotalArea (newVal, oldVal, 'roomAreaSelfuse')})

Menu