Commit 7c4ec59325b629f638f08521c15c700cf85a8aad

Authored by BigBoss
1 parent 6cba581301
Exists in master

修改逻辑

Showing 1 changed file with 5 additions and 9 deletions   Show diff stats
src/pages/cart/cart.vue
... ... @@ -26,7 +26,7 @@
26 26 >
27 27 <view
28 28 v-bind:class="childIsOpenArr[index]? 'partentChecked':'partentCheck'"
29   - @click="childClick(childIsOpenArr[index],index)"
  29 + @click="childClick(index)"
30 30 >
31 31 <span class="correct"></span>
32 32 </view>
... ... @@ -181,17 +181,13 @@ export default {
181 181 }
182 182 },
183 183 //单选按钮
184   - childClick(type,index){
185   - if(type){
186   - this.childIsOpenArr[index] = false
187   - this.pIsoPen = false
188   - }else{
189   - this.childIsOpenArr[index] = true
190   - }
  184 + childClick(index){
  185 + this.childIsOpenArr[index] = !this.childIsOpenArr[index]
191 186 if(this.childIsOpenArr.find(item => item == false)==undefined){
192 187 this.pIsoPen = true
  188 + }else{
  189 + this.pIsoPen = false
193 190 }
194   - console.log(this.childIsOpenArr)
195 191 },
196 192 //修改购物车
197 193 chooseCartModi(mp_id,sk_id,price,pid,num,cart_id,index){
... ...