import{M as h}from"./index.d37abf66.js";import{F as D}from"./index.b5c6ffcc.js";import{c as C,d as B}from"./setting.a3669148.js";import{_ as E}from"./index.4faee172.js";import{d as V,q as k,r as w,o as j,a as l,b as q,c as x,f as e,w as u,e as n,m as d}from"./vendor.d574ef89.js";import"./index.d06a1798.js";import"./index.a00c06e6.js";const y=V({components:{MaterialSelect:h,FooterBtns:D},setup(){const t=k(null),o=w({name:"",favicon:"",logo:"",backdrop:""}),g={name:[{required:!0,message:"\u8BF7\u8F93\u5165\u7F51\u7AD9\u540D\u79F0",trigger:["blur"]}],favicon:[{required:!0,message:"\u4E0A\u4F20\u7F51\u7AD9\u56FE\u6807",trigger:["blur"]}],logo:[{required:!0,message:"\u4E0A\u4F20\u7F51\u7AD9logo",trigger:["blur"]}],backdrop:[{required:!0,message:"\u4E0A\u4F20\u767B\u5F55\u9875\u5E7F\u544A\u56FE",trigger:["blur"]}]},m=()=>{C().then(a=>{console.log("res",a),o.name=a.name,o.favicon=a.favicon,o.logo=a.logo,o.backdrop=a.backdrop})},_=()=>{var a;(a=t.value)==null||a.validate(p=>{!p||(console.log("fasdfasd"),B({name:o.name,favicon:o.favicon,logo:o.logo,backdrop:o.backdrop}).then(r=>{console.log("res",r),m()}).catch(r=>{console.log("err",r)}))})};return j(()=>{m()}),{formData:o,rules:g,getWebsite:m,setWebsite:_,formRef:t}}}),W={class:"website-information"},U={class:"flex"},$=n("div",{class:"muted xs m-r-16"}," \u5EFA\u8BAE\u5C3A\u5BF8\uFF1A100*100\u50CF\u7D20\uFF0C\u652F\u6301jpg\uFF0Cjpeg\uFF0Cpng\u683C\u5F0F ",-1),M=d("\u67E5\u770B\u793A\u4F8B"),N={class:"flex"},z=n("div",{class:"muted xs m-r-16"}," \u5EFA\u8BAE\u5C3A\u5BF8\uFF1A100*100\u50CF\u7D20\uFF0C\u652F\u6301jpg\uFF0Cjpeg\uFF0Cpng\u683C\u5F0F ",-1),G=d("\u67E5\u770B\u793A\u4F8B"),O={class:"flex"},R=n("div",{class:"muted xs m-r-16"}," \u5EFA\u8BAE\u5C3A\u5BF8\uFF1A100*100\u50CF\u7D20\uFF0C\u652F\u6301jpg\uFF0Cjpeg\uFF0Cpng\u683C\u5F0F ",-1),S=d("\u67E5\u770B\u793A\u4F8B"),L=d("\u4FDD\u5B58");function T(t,o,g,m,_,a){const p=l("el-input"),r=l("el-form-item"),c=l("material-select"),f=l("el-image"),i=l("el-button"),F=l("el-popover"),b=l("el-form"),v=l("el-card"),A=l("footer-btns");return q(),x("div",W,[e(v,{shadow:"never",class:"m-t-15"},{default:u(()=>[e(b,{ref:"formRef",rules:t.rules,class:"ls-form",model:t.formData,"label-width":"150px",size:"small"},{default:u(()=>[e(r,{label:"\u7F51\u7AD9\u540D\u79F0",prop:"name"},{default:u(()=>[e(p,{modelValue:t.formData.name,"onUpdate:modelValue":o[0]||(o[0]=s=>t.formData.name=s),placeholder:"\u8BF7\u8F93\u5165\u7F51\u7AD9\u540D\u79F0",maxlength:"12","show-word-limit":""},null,8,["modelValue"])]),_:1}),e(r,{label:"\u7F51\u7AD9\u56FE\u6807",prop:"favicon"},{default:u(()=>[e(c,{modelValue:t.formData.favicon,"onUpdate:modelValue":o[1]||(o[1]=s=>t.formData.favicon=s),limit:1},null,8,["modelValue"]),n("div",U,[$,e(F,{placement:"right",width:"200",trigger:"hover"},{default:u(()=>[e(f,{src:"https://img2.baidu.com/it/u=3357699356,1912406716&fm=26&fmt=auto&gp=0.jpg"}),e(i,{slot:"reference",type:"text"},{default:u(()=>[M]),_:1})]),_:1})])]),_:1}),e(r,{label:"\u7F51\u7AD9LOGO",prop:"logo"},{default:u(()=>[e(c,{modelValue:t.formData.logo,"onUpdate:modelValue":o[2]||(o[2]=s=>t.formData.logo=s),limit:1},null,8,["modelValue"]),n("div",N,[z,e(F,{placement:"right",width:"200",trigger:"hover"},{default:u(()=>[e(f,{src:"https://img2.baidu.com/it/u=3357699356,1912406716&fm=26&fmt=auto&gp=0.jpg"}),e(i,{slot:"reference",type:"text"},{default:u(()=>[G]),_:1})]),_:1})])]),_:1}),e(r,{label:"\u767B\u5F55\u9875\u5E7F\u544A\u56FE",prop:"backdrop"},{default:u(()=>[e(c,{modelValue:t.formData.backdrop,"onUpdate:modelValue":o[3]||(o[3]=s=>t.formData.backdrop=s),limit:1},null,8,["modelValue"]),n("div",O,[R,e(F,{placement:"right",width:"200",trigger:"hover"},{default:u(()=>[e(f,{src:"https://img2.baidu.com/it/u=3357699356,1912406716&fm=26&fmt=auto&gp=0.jpg"}),e(i,{slot:"reference",type:"text"},{default:u(()=>[S]),_:1})]),_:1})])]),_:1})]),_:1},8,["rules","model"])]),_:1}),e(A,null,{default:u(()=>[e(i,{type:"primary",size:"small",onClick:t.setWebsite},{default:u(()=>[L]),_:1},8,["onClick"])]),_:1})])}var Y=E(y,[["render",T]]);export{Y as default};
