closeCarUserListindexs thisnewArrangeData = thisnewArrangeDatamapitem index = return item carUserBtnShow true carUserRealName true 怎么判断indexs与index相等
要判断indexs与index是否相等,可以使用条件语句进行判断。以下是一种可能的实现方式:
closeCarUserList(indexs) { this.newArrangeData = this.newArrangeData.map((item, index) => { if (indexs === index) { return { ...item, carUserBtnShow: true, carUserRealName: true } } else { return item; } }) }
原文地址: https://www.cveoy.top/t/topic/iwvW 著作权归作者所有。请勿转载和采集!