|
@@ -86,8 +86,8 @@ class SiteAlbumController extends AdminController
|
|
|
<<<JS
|
|
|
// 使用定时器检测容器是否存在
|
|
|
const interval = setInterval(() => {
|
|
|
- const containerUl = document.querySelector('.jstree-container-ul');
|
|
|
- if (containerUl) {
|
|
|
+ const containerUl = document.getElementsByClassName('jstree-node');
|
|
|
+ if (containerUl.length > 0) {
|
|
|
clearInterval(interval); // 找到容器后停止检测
|
|
|
// 以下是原有逻辑(已优化)
|
|
|
const folderId = $('select[name="folder_id"]').data('value'); // 提取 folderId 到外层,避免重复查询[1](@ref)
|