angular+adminlte使用心得

本文分享了在使用Angular集成AdminLTE时遇到的侧边栏动画问题及解决方案。通过调整JS代码,修复了菜单展开动画,并优化了菜单显示状态的处理,确保布局在各种情况下都能正常工作。
摘要由CSDN通过智能技术生成
今天用angular 集成adminLte的时候 ,发现左边侧边栏动画没有展开,然后发现,它APP js tree函数操作的DOM 不对,修改如下
 $.AdminLTE.tree = function (menu) {
    var _this = this;
    var animationSpeed = $.AdminLTE.options.animationSpeed;
    $(document).off('click', menu + ' li a')
      .on('click', menu + ' li a', function (e) {
        //Get the clicked link and the next element
        var $this = $(this);
        var checkElement = $this.next();
        //Check if the next element is a menu and is visible
        if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
          //Close the menu
          checkElement.slideUp(animationSpeed, function () {

            //Fix the layout in case the sidebar stretches over the height of the window
            //_this.layout.fix();
          })
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值