initial effect:
:
but my reset button clears the assignment to input. Why did you pick a random one and go up with all the values?
Code:
page(
data: {
inputValue: "",
inputdata: "",
workselect: "",
moneyselect: "",
sexselect: "",
workplacename: "",
moneybtnname: "",
sexname: "",
},
//
resetBtn() {
this.setData({
sexselect: "",
workselect: "",
moneyselect: "",
inputValue: "",
inputdata: "",
})
},
//
sexbtn(e) {
let id = e.currentTarget.dataset.id;
let name = e.currentTarget.dataset.name;
this.setData({
sexselect: id,
sexname: name,
})
this.data.inputdata = this.data.workplacename + "," + this.data.sexname + "," + this.data.moneybtnname;
this.setData({
inputValue: this.data.inputdata,
})
},
)
ask the great god for advice. Thank you.