import{_ as a,r as e,b as s,c as t,d as o,e as i,f as r,g as l,i as d,h as m,w as p,j as c,k as n,m as u,n as f,E as j,p as b,q as g}from"./index.286e9b79.js";import{v}from"./loading.c49775a6.js";import{E as _,a as x}from"./form.ad10dcd5.js";import{E as y,a as h}from"./tab-pane.1cc0f769.js";import"./form-item.9355e6dc.js";import{E as k}from"./text.b43d8d63.js";import{E}from"./image-viewer.b538fe01.js";import{_ as V}from"./material.90ee622d.js";import{_ as C}from"./page-header.29890ed0.js";import{g as w,p as q}from"./http.f588794f.js";import"./_initCloneObject.fb8fbaea.js";import"./strings.8c60bfae.js";import"./event.776e7e11.js";import"./debounce.caafe00b.js";import"./index.ed3ed02e.js";import"./position.1bd00850.js";import"./scroll.a50153b5.js";import"./pagination.22bb50f6.js";import"./select.297a82d5.js";import"./input.31de1b37.js";import"./index.27150c7e.js";import"./token.34cb8214.js";import"./isEqual.57d72c4a.js";import"./_baseIteratee.9ead53a1.js";/* empty css            */import"./progress.27d0e11c.js";import"./cloneDeep.15b627aa.js";import"./dialog.ec9503d2.js";import"./overlay.2c1583ac.js";import"./message-box.6a8eb828.js";import"./validator.18338d56.js";import"./divider.948c4b18.js";const I={class:"editor-card"},U={class:"editor-card-box"},D={class:"image"},F={class:"image-uploader"},O={class:"image-slot"},P={class:"tool"},R={class:"tool-box"},z=a({__name:"setting",setup(a){let z=e(!1),A=e(!1),B=e("0"),G=e(),H=s({data:{image:""}});const J=s({});A.value=!0,w("diy.setting/index").then((a=>{A.value=!1,a.code&&(H.data=a.data)}));const K=async()=>{G.value&&await G.value.validate(((a,e)=>{A.value=!1,a?(A.value=!0,q("diy.setting/index",H.data).then((a=>{A.value=!1,a.code?j.success("操作成功"):j.error(a.msg)})).catch((a=>{j.error(a)}))):j.error("请完善内容")}))},L=e(!1),M=()=>{L.value=!0},N=a=>{L.value=!1,H.data.image=a[0].photo},Q=()=>{};return(a,e)=>{const s=C,j=V,w=E,q=t("Plus"),S=b,T=k,W=_,X=y,Y=h,Z=x,$=g,aa=v;return o(),i("div",null,[r(s,{title:"主题设置"}),r(j,{modelValue:l(L),"onUpdate:modelValue":e[0]||(e[0]=a=>d(L)?L.value=a:null),limit:1,onChange:N,onClose:Q},null,8,["modelValue"]),m("div",I,[p((o(),c(Z,{model:l(H).data,rules:l(J),ref_key:"ruleFormRef",ref:G},{default:n((()=>[m("div",U,[r(Y,{modelValue:l(B),"onUpdate:modelValue":e[1]||(e[1]=a=>d(B)?B.value=a:B=a)},{default:n((()=>[r(X,{label:"基本信息",name:"0"},{default:n((()=>[r(W,{label:"默认图片","label-width":"100px",style:{"align-items":"center"}},{default:n((()=>[m("div",D,[m("div",F,[m("div",{class:"image-uploader-box",onClick:M},[l(H).data.image?(o(),c(w,{key:0,src:l(H).data.image,fit:"contain",class:"image"},{error:n((()=>[m("div",O,[(o(),c(u("icon-picture")))])])),_:1},8,["src"])):(o(),c(S,{key:1,class:"image-uploader-icon"},{default:n((()=>[r(q)])),_:1}))])])]),r(T,{type:"info"},{default:n((()=>[f("内容找不到图片时，将显示默认图片，您可自行定义")])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue"])])])),_:1},8,["model","rules"])),[[aa,l(z)]])]),m("div",P,[m("div",R,[r($,{type:"primary",loading:l(A),onClick:K},{default:n((()=>[f("保存")])),_:1},8,["loading"])])])])}}},[["__scopeId","data-v-774ee275"]]);export{z as default};
