2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
import{_ as R}from"./index.18b06a85.js";import{r as F,b as T,d as L}from"./index.a278f628.js";import{G as N,H as z,C as G,D as $,I as q,w as H,B as J,L as K,M}from"./element-plus.7a22678c.js";import{d as C,_ as j,b as O,ae as P,o as c,c as p,T as t,K as e,L as v,J as E,a as s,U as Q,a6 as W,u as X,R as u,S as Y,b7 as Z,b6 as tt}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./lodash.ec5da75f.js";import"./axios.eb055ccc.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.31dc130b.js";import"./color.b6d632a4.js";import"./clone.7a47b02c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.3a33898e.js";import"./ms.a9ae1d6d.js";import"./@element-plus.d6eabd08.js";import"./nprogress.fa64f2fc.js";import"./vue-clipboard3.be0dfeee.js";import"./clipboard.824ba320.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./lodash-es.29c53eac.js";import"./dayjs.ff93117e.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";function et(){return F.get({url:"/setting.hot_search/getConfig"})}function ot(r){return F.post({url:"/setting.hot_search/setConfig",params:r})}const d=r=>(Z("data-v-bd261930"),r=r(),tt(),r),st={class:"hot-search"},at=u("\u5F00\u542F"),nt=u("\u5173\u95ED"),lt=d(()=>s("div",{class:"form-tips"},"\u9ED8\u8BA4\u5F00\u542F\uFF0C\u5173\u95ED\u5219\u524D\u7AEF\u4E0D\u663E\u793A\u8BE5\u529F\u80FD",-1)),rt={class:"lg:flex"},it={class:"flex-1 min-w-0"},ct=u("\u6DFB\u52A0"),ut=u(" \u5220\u9664 "),dt={class:"hot-search-phone mt-4 lg:mt-0 lg:ml-4 flex-none"},_t=d(()=>s("div",{class:"mb-4 text-center"},"- \u70ED\u641C\u9884\u89C8\u56FE -",-1)),mt={class:"hot-search-phone-content"},pt={class:"search-com"},ht={class:"search-con flex items-center px-[15px]"},ft=d(()=>s("span",{class:"ml-[5px]"},"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",-1)),bt=d(()=>s("div",{class:"hot-search-title"},"\u70ED\u95E8\u641C\u7D22",-1)),gt={class:"hot-search-text"},Dt=u("\u4FDD\u5B58"),vt=C({name:"search"}),Et=C({...vt,setup(r){const n=j({status:1,data:[]}),x=O(()=>n.data.filter(o=>o.name).sort((o,l)=>l.sort-o.sort)),h=async()=>{try{const o=await et();for(const l in n)n[l]=o[l]}catch(o){console.log("\u83B7\u53D6=>",o)}},B=()=>{n.data.push({name:"",sort:0})},y=o=>{n.data.splice(o,1)},V=async()=>{try{await ot(n),h()}catch(o){console.log("\u4FDD\u5B58=>",o)}};return h(),(o,l)=>{const f=N,w=z,k=G,S=$,b=q,_=H,g=J,m=K,I=M,U=T,A=R,D=P("perms");return c(),p("div",st,[t(b,{class:"!border-none",shadow:"never"},{default:e(()=>[t(S,{ref:"formRef",model:n,"label-width":"100px"},{default:e(()=>[t(k,{label:"\u529F\u80FD\u72B6\u6001",style:{"margin-bottom":"0"}},{default:e(()=>[s("div",null,[t(w,{modelValue:n.status,"onUpdate:modelValue":l[0]||(l[0]=a=>n.status=a)},{default:e(()=>[t(f,{label:1},{default:e(()=>[at]),_:1}),t(f,{label:0},{default:e(()=>[nt]),_:1})]),_:1},8,["modelValue"]),lt])]),_:1})]),_:1},8,["model"])]),_:1}),t(b,{class:"!border-none mt-4",shadow:"never"},{default:e(()=>[s("div",rt,[s("div",it,[t(_,{type:"primary",class:"mb-4",onClick:B},{default:e(()=>[ct]),_:1}),t(I,{size:"large",data:n.data},{default:e(()=>[t(m,{label:"\u5173\u952E\u8BCD",prop:"describe","min-width":"160"},{default:e(({row:a})=>[t(g,{modelValue:a.name,"onUpdate:modelValue":i=>a.name=i,clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57","show-word-limit":"",maxlength:"30"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(m,{label:"\u6392\u5E8F",prop:"describe","min-width":"160"},{default:e(({row:a})=>[t(g,{modelValue:a.sort,"onUpdate:modelValue":i=>a.sort=i,type:"number"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(m,{label:"\u64CD\u4F5C","min-width":"80",fixed:"right"},{default:e(({$index:a})=>[v((c(),E(_,{type:"danger",link:"",onClick:i=>y(a)},{default:e(()=>[ut]),_:2},1032,["onClick"])),[[D,["setting:storage:edit"]]])]),_:1})]),_:1},8,["data"])]),s("div",dt,[_t,s("div",mt,[s("div",pt,[s("div",ht,[t(U,{name:"el-icon-Search",size:17}),ft])]),bt,s("div",gt,[(c(!0),p(Q,null,W(X(x),(a,i)=>(c(),p("span",{key:i},Y(a.name),1))),128))])])])])]),_:1}),v((c(),E(A,null,{default:e(()=>[t(_,{type:"primary",onClick:V},{default:e(()=>[Dt]),_:1})]),_:1})),[[D,["setting.hot_search/setConfig"]]])])}}});const se=L(Et,[["__scopeId","data-v-bd261930"]]);export{se as default};
|