the drop-down box of the category cannot complete the selection and report an error when selecting the category
error message:
related Code:
<Cascader :data="dataGoodsCategoryMenu" trigger="hover" change-on-select v-model="dataGoodsCategoryMenu"
placeholder="" @on-change="changeSelect"></Cascader>
loadDataGoodsCategory(){
//
var _this = this;
Util.comAjax().typeList({
data: {},
type: "post",
async: true
}, this,
function (res) {
let categoryArr = [];
console.log(res.data)
res.data.map((item) => {
let categoryObj = {};
categoryObj.value = item.id;
categoryObj.label = item.name;
categoryArr.push(categoryObj);
});
_this.dataGoodsCategoryMenu = categoryArr;
_this.dataGoodsCategoryMenu.push({
value: 0,
label: "",
});
_this.loading = false;
},
function () {
_this.loading = false;
}
);
},
changeSelect(value,selectedData) {
console.log(selectedData)
}
ask the boss to take a look at it