feat: longbow-tree 增加 show 关键字

This commit is contained in:
Argo Zhang 2019-08-17 11:25:31 +08:00
parent 65be29b86e
commit b5f933b76e
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
1 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,8 @@
LI: 'nav-item',
LINK: 'nav-link',
TREEVIEW_MENU: 'nav-treeview',
OPEN: 'menu-open'
OPEN: 'menu-open',
SHOW: 'show'
};
var Default = {
trigger: Selector.DATA_WIDGET + " " + Selector.LINK,
@ -63,6 +64,7 @@
this.collapse(openTreeview, openMenuLi);
}
parentLi.addClass(ClassName.SHOW);
treeviewMenu.slideDown(this._config.animationSpeed, function () {
parentLi.addClass(ClassName.OPEN);
$(_this._element).trigger(expandedEvent);
@ -73,6 +75,7 @@
var _this2 = this;
var collapsedEvent = $.Event(Event.COLLAPSED);
parentLi.removeClass(ClassName.SHOW);
treeviewMenu.slideUp(this._config.animationSpeed, function () {
parentLi.removeClass(ClassName.OPEN);
$(_this2._element).trigger(collapsedEvent);