');
}
if(linktype=='edit'){
if(!category){main.notice('error','名字不能为空');return false;}
el.closest('.baba').setAttribute('data-name', category);
}
if(linktype=='editlink'){
if(!aname||!aurl){main.notice('error','名字和链接不能为空');return false;}
let son=el.closest('.sons').querySelector('.son');
son.setAttribute('data-sonname', aname);
son.setAttribute('data-sonurl', aurl);
son.setAttribute('data-sontext', atext);
son.setAttribute('data-sonimg', aimg);
}
if(linktype=='addlink'){
if(!aname||!aurl){main.notice('error','名字以及链接不能为空');return false;}
el.parentNode.insertAdjacentHTML('afterbegin','
');
}
$el.classList.toggle('loading');
main.linkssort();
LinkDialog = false;
category='';
aname='';
aurl='';
atext='';
aimg='';
"
class="w-full text-center px-2 py-2 text-sm font-medium tracking-wide transition-colors duration-200 transform rounded-md bg-[var(--btn-bg)] hover:bg-[var(--btn-bg-hover)] text-[var(--white-text)]">提交