<div class="downdiv" v-for="item in accountList"> <div class="down_time" onclick="show(this)"> <div class="times" style=" 39%;padding-left: 2%">{{item.count.doDate}} {{item.count.week}}</div> <div class="times" style=" 55%"> <span style="color: #ec8a17">本金:</span> <span>{{item.count.principal}}</span> <span style="color: #42aeec">佣金:</span> <span>{{item.count.commission}}</span> </div> </div> <div class="down_account" v-for="account,index in item.alist"> <div class="a_left"> <div class="a_left_img"> <img src="img/tao.jpg" style=" 100%;height: 100%"> </div> <div class="a_left_info"> <div class="a_left_info_up"> {{account.platformName}} </div> <div class="a_left_info_down"> <span>{{account.hourTime}}</span> <span>{{account.goods}}</span> </div> </div> </div> <div class="a_right"> <div class="a_right_up"> <div class="ben_info">-{{account.principal}}</div> <div class="ben_img" style=" border: 1px solid #ff640e; color:#ff640e;">本</div> </div> <div class="a_right_down"> <div class="yong_info">+{{account.commission}}</div> <div class="yong_img" style=" border: 1px solid #4ea5ff; color:#4ea5ff;">佣</div> </div> </div> </div> </div>
accountList 结构:List<Map<String,Object>>
map中的Object存了两种形式;一种是对象Map<String,AccountCount>,另一种是对象集合Map<String,List<AccountVo>>
js:
<script type="text/javascript" src="js/jQueryRotate.js"></script>//旋转插件
1、下载地址:https://www.jb51.net/jiaoben/554113.html
function shou(obj) { var showState = $(obj).siblings(); //第三个子元素的子元素 var roimg = $(obj).children(":eq(2)").children(); if(showState.is(':hidden')){ //如果当前隐藏 showState.show(); //那么就显示div $(obj).children('img').rotate(0); roimg.rotate(0); }else{ //否则 showState.hide(); //就隐藏div roimg.rotate(90); //$(".roimg").rotate(90);//顺时针旋转90度 } }