decorate-91d866ee.js 3.4 KB

1
  1. import{P as R,_ as T,__tla as q}from"./util-8a54c07a.js";import{d as z,r as l,e as B,u as L,k as N,a,o as v,q as k,w as i,f,c as O,n as j,F as M,N as Q,O as A,dC as E,_ as G,da as H,b5 as J,ah as K,__tla as W}from"./index-2eab2d23.js";import{g as X,u as Y,__tla as Z}from"./template-101e64f2.js";import{u as aa,__tla as ea}from"./page-01130ee3.js";import{u as ta,__tla as ra}from"./tagsView-fd4f3d23.js";import{u as la,__tla as oa}from"./useMessage-171aa63e.js";import{__tla as sa}from"./Dialog-c2716df6.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as _a}from"./Qrcode-a57a527d.js";import{__tla as na}from"./el-text-b1163e3d.js";import{__tla as ua}from"./IFrame.vue_vue_type_script_setup_true_lang-82b81649.js";import{__tla as ia}from"./el-card-c558f0ec.js";import{__tla as ma}from"./vuedraggable.umd-67523a5c.js";import{__tla as ca}from"./el-collapse-item-5ecf4321.js";let x,pa=Promise.all([(()=>{try{return q}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return ca}catch{}})()]).then(async()=>{let u;u="diy_page_index",x=z({name:"DiyTemplateDecorate",__name:"decorate",setup(da){const e=l(0),m=B([{name:"\u57FA\u7840\u8BBE\u7F6E",icon:"ep:iphone"},{name:"\u9996\u9875",icon:"ep:home-filled"},{name:"\u6211\u7684",icon:"ep:user-filled"}]),y=la(),_=l(!1),r=l(),h=l(),o=l(),g=l(""),w=[],c=l(w),b=()=>{if(e.value===0)return c.value=w,void(o.value=r.value);c.value=R,o.value=r.value.pages.find(n=>n.name===m[e.value].name)},I=async()=>{if(h){_.value=!0;try{e.value===0?await Y(a(r)):await aa(a(o)),y.success("\u4FDD\u5B58\u6210\u529F")}finally{_.value=!1}}},S=()=>D(),D=()=>sessionStorage.setItem(u,`${e.value}`),{currentRoute:p}=L(),{delView:P}=ta();return N(async()=>{var n;if(r.value={id:void 0,name:"",used:!1,usedTime:void 0,remark:"",previewPicUrls:[],property:"",pages:[]},(n=h.value)==null||n.resetFields(),!p.value.params.id)return y.warning("\u53C2\u6570\u9519\u8BEF\uFF0C\u9875\u9762\u7F16\u53F7\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),void P(a(p));await(async t=>{_.value=!0;try{r.value=await X(t),o.value=r.value;const d="http://mall.yudao.iocoder.cn";g.value=`${d}/#/pages/index/index?templateId=${r.value.id}`}finally{_.value=!1}})(p.value.params.id),(()=>{const t=E(sessionStorage.getItem(u))||0;sessionStorage.removeItem(u),t!==e.value&&(e.value=t,b())})()}),(n,t)=>{const d=G,U=H,$=J,C=K,F=T;return a(r)&&!a(_)?(v(),k(F,{key:0,modelValue:a(o).property,"onUpdate:modelValue":t[1]||(t[1]=s=>a(o).property=s),title:a(m)[a(e)].name,libs:a(c),"show-page-config":a(e)!==0,"show-tab-bar":a(e)===0,"show-navigation-bar":a(e)!==0,"preview-url":a(g),onSave:I,onReset:S},{toolBarLeft:i(()=>[f(C,{modelValue:a(e),"onUpdate:modelValue":t[0]||(t[0]=s=>Q(e)?e.value=s:null),class:"h-full!",onChange:b},{default:i(()=>[(v(!0),O(M,null,j(a(m),(s,V)=>(v(),k($,{key:V,content:s.name},{default:i(()=>[f(U,{label:V},{default:i(()=>[f(d,{icon:s.icon,size:24},null,8,["icon"])]),_:2},1032,["label"])]),_:2},1032,["content"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue","title","libs","show-page-config","show-tab-bar","show-navigation-bar","preview-url"])):A("",!0)}}})});export{pa as __tla,x as default};