<el-button type="primary" @click="btn1" :data-value="btnarray.btn1" native-type="button"></el-button>
data() {
return {
btnarray:{
btn1:"",
btn2:""
}
}
},
if you want to assign a value to the button, get the value of the button when you click it. But why do you get this value sometimes and undefined
sometimes?sometimes the result is this:
: