mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 13:34:30 -04:00
Start to replace jQuery with dom.
This commit is contained in:
parent
9234e3f287
commit
7320592dc2
26 changed files with 566 additions and 301 deletions
|
@ -55,7 +55,6 @@ function update(item) {
|
|||
const $label = $html.find('.label');
|
||||
|
||||
$html.addClass(item.isFolder() ? 'folder' : 'file');
|
||||
$html[0]._item = item;
|
||||
|
||||
location.setLink($a, item);
|
||||
$img.attr('src', resource.icon('folder'));
|
||||
|
@ -108,10 +107,11 @@ function update(item) {
|
|||
}
|
||||
}
|
||||
|
||||
if (item.elTree) {
|
||||
jq(item.elTree).replaceWith($html);
|
||||
if (item.$tree) {
|
||||
item.$tree.replaceWith($html);
|
||||
}
|
||||
item.elTree = $html[0];
|
||||
item.$tree = $html;
|
||||
$html[0]._item = item;
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue