2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
import{_ as R}from"./index.16598435.js";import{r as x,b as T,d as $}from"./index.5ab034a5.js";import{H as z,I as G,F as j,G as q,J as H,w as J,D as L,M,N as P}from"./element-plus.ab0703f2.js";import{d as C,$ as Q,b as W,ap as K,o as i,c as h,W as t,Q as e,u as c,a,U as d,R as v,P as E,F as O,a9 as X,V as Y,bk as Z,bj as tt}from"./@vue.340249d8.js";import"./@vueuse.e3650918.js";import"./lodash.3d784a58.js";import"./axios.45058a27.js";import"./vue-router.9ddb0e92.js";import"./pinia.97fe9b12.js";import"./css-color-function.5c1c877d.js";import"./color.97e03886.js";import"./clone.cfa55f7b.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./@element-plus.558a564d.js";import"./nprogress.8c276ac9.js";import"./vue-clipboard3.44194d32.js";import"./clipboard.47836ecb.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.309a94da.js";import"./lodash-es.edba6135.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.9886411c.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.0f9ce7c3.js";function et(){return x.get({url:"/setting.hot_search/getConfig"})}function ot(r){return x.post({url:"/setting.hot_search/setConfig",params:r})}const m=r=>(Z("data-v-bd261930"),r=r(),tt(),r),at={class:"hot-search"},st=m(()=>a("div",{class:"form-tips"},"\u9ED8\u8BA4\u5F00\u542F\uFF0C\u5173\u95ED\u5219\u524D\u7AEF\u4E0D\u663E\u793A\u8BE5\u529F\u80FD",-1)),nt={class:"lg:flex"},lt={class:"flex-1 min-w-0"},rt={class:"hot-search-phone mt-4 lg:mt-0 lg:ml-4 flex-none"},ut=m(()=>a("div",{class:"mb-4 text-center"},"- \u70ED\u641C\u9884\u89C8\u56FE -",-1)),it={class:"hot-search-phone-content"},ct={class:"search-com"},dt={class:"search-con flex items-center px-[15px]"},mt=m(()=>a("span",{class:"ml-[5px]"},"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",-1)),_t=m(()=>a("div",{class:"hot-search-title"},"\u70ED\u95E8\u641C\u7D22",-1)),pt={class:"hot-search-text"},ht=C({name:"search"}),ft=C({...ht,setup(r){const n=Q({status:1,data:[]}),B=W(()=>n.data.filter(o=>o.name).sort((o,l)=>l.sort-o.sort)),f=async()=>{try{const o=await et();for(const l in n)n[l]=o[l]}catch(o){console.log("\u83B7\u53D6=>",o)}},y=()=>{n.data.push({name:"",sort:0})},V=o=>{n.data.splice(o,1)},w=async()=>{try{await ot(n),f()}catch(o){console.log("\u4FDD\u5B58=>",o)}};return f(),(o,l)=>{const b=z,k=G,S=j,I=q,g=H,_=J,D=L,p=M,U=P,A=T,N=R,F=K("perms");return i(),h("div",at,[t(g,{class:"!border-none",shadow:"never"},{default:e(()=>[t(I,{ref:"formRef",model:c(n),"label-width":"100px"},{default:e(()=>[t(S,{label:"\u529F\u80FD\u72B6\u6001",style:{"margin-bottom":"0"}},{default:e(()=>[a("div",null,[t(k,{modelValue:c(n).status,"onUpdate:modelValue":l[0]||(l[0]=s=>c(n).status=s)},{default:e(()=>[t(b,{label:1},{default:e(()=>[d("\u5F00\u542F")]),_:1}),t(b,{label:0},{default:e(()=>[d("\u5173\u95ED")]),_:1})]),_:1},8,["modelValue"]),st])]),_:1})]),_:1},8,["model"])]),_:1}),t(g,{class:"!border-none mt-4",shadow:"never"},{default:e(()=>[a("div",nt,[a("div",lt,[t(_,{type:"primary",class:"mb-4",onClick:y},{default:e(()=>[d("\u6DFB\u52A0")]),_:1}),t(U,{size:"large",data:c(n).data},{default:e(()=>[t(p,{label:"\u5173\u952E\u8BCD",prop:"describe","min-width":"160"},{default:e(({row:s})=>[t(D,{modelValue:s.name,"onUpdate:modelValue":u=>s.name=u,clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57","show-word-limit":"",maxlength:"30"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(p,{label:"\u6392\u5E8F",prop:"describe","min-width":"160"},{default:e(({row:s})=>[t(D,{modelValue:s.sort,"onUpdate:modelValue":u=>s.sort=u,type:"number"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(p,{label:"\u64CD\u4F5C","min-width":"80",fixed:"right"},{default:e(({$index:s})=>[v((i(),E(_,{type:"danger",link:"",onClick:u=>V(s)},{default:e(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[F,["setting:storage:edit"]]])]),_:1})]),_:1},8,["data"])]),a("div",rt,[ut,a("div",it,[a("div",ct,[a("div",dt,[t(A,{name:"el-icon-Search",size:17}),mt])]),_t,a("div",pt,[(i(!0),h(O,null,X(c(B),(s,u)=>(i(),h("span",{key:u},Y(s.name),1))),128))])])])])]),_:1}),v((i(),E(N,null,{default:e(()=>[t(_,{type:"primary",onClick:w},{default:e(()=>[d("\u4FDD\u5B58")]),_:1})]),_:1})),[[F,["setting.hot_search/setConfig"]]])])}}});const Xt=$(ft,[["__scopeId","data-v-bd261930"]]);export{Xt as default};
|