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);

  • 相关阅读:
    装饰器
    返回函数
    用Token令牌维护微服务之间的通信安全的实现
    用Windbg来分析.Net程序的dump
    Windows下docker的安装,将ASP.NET Core程序部署在Linux和Docker中
    StackExchange.Redis学习笔记(五) 发布和订阅
    StackExchange.Redis学习笔记(四) 事务控制和Batch批量操作
    StackExchange.Redis学习笔记(三) 数据库及密码配置 GetServer函数
    StackExchange.Redis学习笔记(二) Redis查询 五种数据类型的应用
    Task及Mvc的异步控制器 使用探索
  • 原文地址:https://www.cnblogs.com/ckaifeng/p/5018335.html
Copyright © 2011-2022 走看看