1 |
- import{P as z,_ as C,__tla as D}from"./util-c224e2d8.js";import{d as F,r as l,f as B,u as E,z as L,a,o as d,j as x,w as u,i as f,c as q,C as M,F as Q,R as W,l as A,dE as G,_ as H,d5 as J,aT as K,aj as N,__tla as O}from"./index-1e808f2e.js";import{g as X,u as Y,__tla as Z}from"./template-23d3cdf1.js";import{u as aa,__tla as ea}from"./page-a5da38c9.js";import{u as ta,__tla as ra}from"./tagsView-1954bd1b.js";import{u as la,__tla as oa}from"./useMessage-5f9e8917.js";import{__tla as sa}from"./Dialog-f44f9d78.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as _a}from"./Qrcode-ef77d611.js";import{__tla as na}from"./el-text-3aab5b45.js";import{__tla as ia}from"./IFrame.vue_vue_type_script_setup_true_lang-7fdb7432.js";import{__tla as ua}from"./el-card-03b3588b.js";import{__tla as ma}from"./vuedraggable.umd-66af1f13.js";import{__tla as ca}from"./el-collapse-item-e45787ff.js";let I,pa=Promise.all([(()=>{try{return D}catch{}})(),(()=>{try{return O}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 ia}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return ca}catch{}})()]).then(async()=>{let i;i="diy_page_index",I=F({name:"DiyTemplateDecorate",__name:"decorate",setup(va){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=z,o.value=r.value.pages.find(n=>n.name===m[e.value].name)},S=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}}},$=()=>k(),k=()=>sessionStorage.setItem(i,`${e.value}`),{currentRoute:p}=E(),{delView:P}=ta();return L(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 v="https://letcgo.com";g.value=`${v}/#/pages/index/index?templateId=${r.value.id}`}finally{_.value=!1}})(p.value.params.id),(()=>{const t=G(sessionStorage.getItem(i))||0;sessionStorage.removeItem(i),t!==e.value&&(e.value=t,b())})()}),(n,t)=>{const v=H,R=J,T=K,U=N,j=C;return a(r)&&!a(_)?(d(),x(j,{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:S,onReset:$},{toolBarLeft:u(()=>[f(U,{modelValue:a(e),"onUpdate:modelValue":t[0]||(t[0]=s=>W(e)?e.value=s:null),class:"h-full!",onChange:b},{default:u(()=>[(d(!0),q(Q,null,M(a(m),(s,V)=>(d(),x(T,{key:V,content:s.name},{default:u(()=>[f(R,{label:V},{default:u(()=>[f(v,{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,I as default};
|