import{T as U,E as w}from"./index.esm.3fe50213.js";import{az as b,d as A,b as D,r as k,b5 as R,a_ as M,c as n,e as N,f as T,g as f,h as e,i as l,u as a,a2 as q,m as i,E as z}from"./index.0308b213.js";import{M as I}from"./index.dfdc0704.js";import"./index.vue_vue_type_style_index_0_scoped_f00ed21d_lang.2c48f49b.js";import"./vuedraggable.umd.405b1bec.js";import"./index.35b8c9ab.js";import"./index.9e8820cd.js";import"./sort_out.2008c10d.js";const O=()=>b.request({url:"addon/spellrice.web.Config/edit"}),S=m=>b.post("addon/spellrice.web.Config/save",m),j={class:"recommand-config"},G={class:"operation-btn"},H=i("\u63D0\u4EA4"),J={class:"config-form"},K=i("\u5F00\u542F"),L=i("\u5173\u95ED"),te=A({setup(m){let t=D({status:1,agreement:"",share:{title:"",imgUrl:"",desc:"",link:""}});const g=o=>{t.share.imgUrl=o},h=k(),u=R(),v={},C={placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9..."};M(()=>{const o=u.value;o!=null&&o.destroy()});const E=o=>{u.value=o},_="default",c=()=>{O().then(o=>{t.status=o.status,t.agreement=o.agreement,t.share=o.share})};c();const y=()=>{S(t).then(o=>{c(),z({message:"\u63D0\u4EA4\u6210\u529F",type:"success"})})};return(o,s)=>{const B=n("el-button"),p=n("el-radio"),V=n("el-radio-group"),d=n("el-form-item"),x=n("el-tab-pane"),F=n("el-tabs");return N(),T("div",j,[f("div",G,[e(B,{type:"primary",onClick:y},{default:l(()=>[H]),_:1})]),f("div",J,[e(a(q),{ref_key:"formRef",ref:h,model:a(t),"label-width":"160px",size:"default","label-position":"top"},{default:l(()=>[e(F,{type:"border-card"},{default:l(()=>[e(x,{label:"\u57FA\u7840\u8BBE\u7F6E"},{default:l(()=>[e(d,{label:"\u72B6\u6001"},{default:l(()=>[e(V,{modelValue:a(t).status,"onUpdate:modelValue":s[0]||(s[0]=r=>a(t).status=r)},{default:l(()=>[e(p,{label:1},{default:l(()=>[K]),_:1}),e(p,{label:0},{default:l(()=>[L]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"*\u6D3B\u52A8\u89C4\u5219",style:{width:"40%",border:"1px solid #000",height:"20%"}},{default:l(()=>[e(a(U),{style:{"border-bottom":"1px solid #ccc"},editor:a(u),defaultConfig:v,mode:_},null,8,["editor"]),e(a(w),{style:{height:"500px",width:"100%"},modelValue:a(t).agreement,"onUpdate:modelValue":s[1]||(s[1]=r=>a(t).agreement=r),defaultConfig:C,mode:_,onOnCreated:E},null,8,["modelValue"])]),_:1}),e(d,{label:"\u5206\u4EAB\u56FE\u7247",style:{width:"80%"}},{default:l(()=>[e(I,{modelValue:a(t).share.imgUrl,"onUpdate:modelValue":s[2]||(s[2]=r=>a(t).share.imgUrl=r),limit:1,onChange:g},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])])])}}});export{te as default};
