zoukankan      html  css  js  c++  java
  • easyui 布局标题纵向排列

        (function($){
                     var buttonDir = {north:'down',south:'up',east:'left',west:'right'};
                        $.extend($.fn.layout.paneldefaults,{
                            onBeforeCollapse:function(){
                                var popts = $(this).panel('options');
                                var dir = popts.region;
                                var btnDir = buttonDir[dir];
                                if(!btnDir) return false;
                    
                                setTimeout(function(){
                                    var pDiv = $('.layout-button-'+btnDir).closest('.layout-expand').css({
                                        textAlign:'center',lineHeight:'18px',fontWeight:'bold'
                                    });
                    
                                    if(popts.title){
                                         var vtitle = popts.title;
                                        if(dir == "east" || dir == "west"){
                                            var vTitle = popts.title.split('').join('<br/>');
                                            pDiv.find('.panel-body').html(vTitle);
                                        }else{
                                            $('.layout-button-'+btnDir).closest('.layout-expand').find('.panel-title')
                                            .css({textAlign:'left'})
                                            .html(vTitle)
                                        }
                                         
                                    }   
                                },100);
                                 
                            }
                        });
                    })(jQuery);

  • 相关阅读:
    pyinstaller安装和使用
    django项目结构和运行项目
    安装django and 创建项目
    浅谈网络请求基础(理论篇)
    浅谈爬虫初识
    判断是否AVL平衡二叉书
    用递归方法判断两棵树是否相等
    广度优先搜索求树的深度
    堆排序
    归并排序
  • 原文地址:https://www.cnblogs.com/ckaifeng/p/5018335.html
Copyright © 2011-2022 走看看