decorate-f7ab83cc.js 3.4 KB

1
  1. import{P as F,_ as K,__tla as R}from"./util-1d14cfdf.js";import{d as T,r as l,x as A,u as B,b as L,a,o as d,C as x,A as u,f,c as Q,Q as j,F as J,a1 as M,a2 as q,dK as E,_ as G,cK as H,bf as N,at as O,__tla as W}from"./index-1f518666.js";import{g as X,u as Y,__tla as Z}from"./template-bfd4b87a.js";import{u as aa,__tla as ea}from"./page-360733b6.js";import{u as ta,__tla as ra}from"./tagsView-5f5ec285.js";import{u as la,__tla as sa}from"./useMessage-633c11d2.js";import{__tla as oa}from"./Dialog-4c960d8c.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as _a}from"./Qrcode-75d3f7a7.js";import{__tla as na}from"./el-text-51f1e949.js";import{__tla as ia}from"./IFrame.vue_vue_type_script_setup_true_lang-1b3b1a66.js";import{__tla as ua}from"./el-card-955661ed.js";import{__tla as ma}from"./vuedraggable.umd-88cf4fc6.js";import{__tla as ca}from"./el-collapse-item-0f9fda1e.js";let S,pa=Promise.all([(()=>{try{return R}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return oa}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",S=T({name:"DiyTemplateDecorate",__name:"decorate",setup(va){const e=l(0),m=A([{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(),s=l(),g=l(""),w=[],c=l(w),b=()=>{if(e.value===0)return c.value=w,void(s.value=r.value);c.value=F,s.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(s)),y.success("\u4FDD\u5B58\u6210\u529F")}finally{_.value=!1}}},k=()=>z(),z=()=>sessionStorage.setItem(i,`${e.value}`),{currentRoute:p}=B(),{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),s.value=r.value;const v="https://zxgz.newfeifan.cn/#/";g.value=`${v}/#/pages/index/index?templateId=${r.value.id}`}finally{_.value=!1}})(p.value.params.id),(()=>{const t=E(sessionStorage.getItem(i))||0;sessionStorage.removeItem(i),t!==e.value&&(e.value=t,b())})()}),(n,t)=>{const v=G,U=H,$=N,C=O,D=K;return a(r)&&!a(_)?(d(),x(D,{key:0,modelValue:a(s).property,"onUpdate:modelValue":t[1]||(t[1]=o=>a(s).property=o),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:k},{toolBarLeft:u(()=>[f(C,{modelValue:a(e),"onUpdate:modelValue":t[0]||(t[0]=o=>M(e)?e.value=o:null),class:"h-full!",onChange:b},{default:u(()=>[(d(!0),Q(J,null,j(a(m),(o,V)=>(d(),x($,{key:V,content:o.name},{default:u(()=>[f(U,{label:V},{default:u(()=>[f(v,{icon:o.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"])):q("",!0)}}})});export{pa as __tla,S as default};