← Back
Editing: index2.js
import{I as e,J as a}from"./utils-lib.js?v=1765440387";import{g as s}from"./useStore.js?v=1765440387";import{u as o}from"./index98.js?v=1765440387";import{c as t,b as l,g as r,w as n,p as i,a5 as c,q as u,M as m,A as p,x as d,v as f,e as g,P as v,C as h,n as y}from"./base-lib.js?v=1765440387";import{d as j}from"./validator.js?v=1765440387";import"./__commonjsHelpers__.js?v=1765440387";import"./config.js?v=1765440387";import"./index99.js?v=1765440387";import"./index100.js?v=1765440387";import"./index94.js?v=1765440387";import"./column.js?v=1765440387";const w={key:0,class:"mr-1rem"},x=t({__name:"index",setup(t){const{getGlobalConfig:x}=s(),{refs:{settingSearch:S,openSSLPopup:_,openPortPopup:b}}=s(),q=l(),{BtRouterTabs:A}=o(),C=r(()=>q.name),E=r(()=>"whole"===C.value||"panel"===C.value||"safe"===C.value||"ui"===C.value);n(()=>S.value,()=>{y(()=>{document.querySelectorAll(".empty-search").forEach(function(e){var a;null==(a=e.parentNode)||a.removeChild(e)});if(0==document.querySelectorAll('.config-rows[style="display: flex;"]').length){const e=document.createElement("div");e.className="empty-search flex items-center justify-center w-full py-[1.5rem]",e.innerHTML='暂无搜索结果,<span class="text-primary cursor-pointer NpsDialog">提交需求反馈</span>';e.querySelectorAll(".NpsDialog").forEach(e=>{e.addEventListener("click",function(){j({name:"面板设置",type:23,id:30})})});const a=document.querySelector(".router-tabs-content .search-results");a&&a.appendChild(e)}})},{immediate:!0}),n(()=>C.value,e=>{"whole"!==e&&"panel"!==e&&"safe"!==e&&"ui"!==e||(S.value="")});return i(async()=>{S.value="",await x(),(()=>{const e=window.localStorage.getItem("config-dialog");switch(e){case"ssl":_.value=!0;break;case"port":b.value=!0}e&&window.localStorage.removeItem("config-dialog")})()}),c(()=>{e(["/config?action=get_menu_list"])}),(e,s)=>{const o=a;return u(),m(d(A),null,{right:p(()=>[d(E)?(u(),f("div",w,[g(o,{class:"search !w-24rem",placeholder:"搜索设置项",modelValue:d(S),"onUpdate:modelValue":s[0]||(s[0]=e=>v(S)?S.value=e:null)},null,8,["modelValue"])])):h("",!0)]),_:1})}}});export{x as default};
Save File
Cancel