Roo/bootstrap/NavItem.js
authorAlan Knowles <alan@roojs.com>
Wed, 5 Dec 2018 07:55:04 +0000 (15:55 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 5 Dec 2018 07:55:04 +0000 (15:55 +0800)
Roo/bootstrap/NavItem.js

index 38fe3e7..fa17071 100644 (file)
@@ -107,8 +107,16 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
            if (this.fa) {
                 cfg.html = '<i class="fa fas fa-'+this.fa+'"></i> <span>' + this.html + '</span>';
             }
-           
-           
+           if (this.menu) {
+                
+                cfg.cn[0].html += " <span class='caret'></span>";
+             
+            }
+           if (this.badge !== '') {
+                 
+                cfg.html += ' <span class="badge badge-secondary">' + this.badge + '</span>';
+            }
+           return cfg;
        }
         
         if (this.href || this.html || this.glyphicon || this.icon || this.fa) {