function(){
      if(elem.data('spread')){
        elem.data('spread', null)
        ul.removeClass('layui-show');
        arrow.html(icon.arrow[0]);
        a.find('.layui-icon').html(icon.branch[0]);
      } else {
        elem.data('spread', true);
        ul.addClass('layui-show');
        arrow.html(icon.arrow[1]);
        a.find('.layui-icon').html(icon.branch[1]);
      }
    }
function(){
      if(elem.data('spread')){
        elem.data('spread', null)
        ul.removeClass('layui-show');
        arrow.html(icon.arrow[0]);
        a.find('.layui-icon').html(icon.branch[0]);
      } else {
        elem.data('spread', true);
        ul.addClass('layui-show');
        arrow.html(icon.arrow[1]);
        a.find('.layui-icon').html(icon.branch[1]);
      }
    }
function ( ) { if ( elem . data ( 'spread' ) ) { elem . data ( 'spread' , null ) ul . removeClass ( 'layui-show' ) ; arrow . html ( icon . arrow [ 0 ] ) ; a . find ( '.layui-icon' ) . html ( icon . branch [ 0 ] ) ; } else { elem . data ( 'spread' , true ) ; ul . addClass ( 'layui-show' ) ; arrow . html ( icon . arrow [ 1 ] ) ; a . find ( '.layui-icon' ) . html ( icon . branch [ 1 ] ) ; } }
执行伸展
执行伸展