Skip to content

列表相关的重载 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fouao opened this issue Jan 19, 2018 · 2 comments
Open

列表相关的重载 #2

fouao opened this issue Jan 19, 2018 · 2 comments
Assignees

Comments

@fouao
Copy link

fouao commented Jan 19, 2018

如Menu,Dropdown等模块,如果实现因数据变更而重载数据,需要重新初始化该模块时,列表并未重载,但是数据已经获取html已经拼接,并未呈现重载效果。能否解绑该控件或实现初始化该模块?

@fouao
Copy link
Author

fouao commented Jan 19, 2018

com.post(api.domain + '/ui/dashboard.ashx', { method: 'GetList' }, function (res) { _items = $.parseJSON(res.list); menuInit((_items.find(function (a) { return a.selected; })).key); Dropdown({ el: '#systemSwitch', items: _items, onclick: function (item) { menuInit(item.key); } }); }); var menuInit = function (mkid) { com.post(api.domain + '/ui/dashboard.ashx', { method: 'GetList', mkid: mkid }, function (res) { var _list = $.parseJSON(res.list); if (_list.length == 1) { menuClick(_list[0]);//直接加载菜单 } else { Dropdown({ el: '#dashboard', items: _list, onclick: function (item) { menuClick(item); } }); //加载默认选中板块菜单 } }); }

@tower1229 tower1229 self-assigned this Jan 19, 2018
@tower1229
Copy link
Collaborator

Dropdown新增加了items()实例方法,允许更新/获取当前实例的数据;menu插件我想不到有更新数据的需求啊,目前可以修改当前项,一定要动态更新数据吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy