import{H as k,h as V}from"./element-plus-z3MwpXC9.js";import{m as B}from"./@element-plus-DRBc1Xzw.js";import{s as P,a as h}from"./decoration-BKETkxh7.js";import{f as C,d as E}from"./index-DXEGVToZ.js";import N from"./preview-pc-CIwqir-X.js";import{a as I}from"./vue-router-D4MxfuQi.js";import{d as v,Z as O,r as d,b as S,w as M,an as H,o as u,c as J,V as p,M as m,a as f,u as s,i as R,S as _,O as T,L as j}from"./@vue-TMcuEboY.js";import"./lodash-es-R-kYiKr_.js";import"./async-validator-DKvM95Vc.js";import"./dayjs-CMfar2R3.js";import"./balanced-match-mNcR6oh4.js";import"./@ctrl-r5W6hzzQ.js";import"./normalize-wheel-es-B6fDCfyv.js";import"./@popperjs-D9SI2xQl.js";import"./nprogress-Cgf5DU8x.js";import"./pinia-ebUeA1L2.js";import"./axios-C-n2IhIP.js";import"./lodash-BtPWuHkK.js";import"./@vueuse-BQYVjZ5N.js";import"./css-color-function-rJvg8h-6.js";import"./color-B0v57BL7.js";import"./clone-CuIhj1wH.js";import"./color-convert-BGgJB5UM.js";import"./color-name-BQ5IbGbl.js";import"./color-string-BhgG7-8u.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-8CNoFg4V.js";import"./clipboard-Dch_ozqB.js";import"./echarts-BR_QmBtV.js";import"./tslib-BDyQ-Jie.js";import"./zrender-B-CeXLwU.js";import"./highlight.js-D5uP1KGk.js";import"./@highlightjs-KJi31KWJ.js";import"./index-Ck4tC1F8.js";import"./attr-BZdZttgV.js";import"./index-BhjDDGVa.js";import"./picker-Cx07Sp9S.js";import"./index-CdmO5-Ss.js";import"./index-CUrZWbP0.js";import"./index.vue_vue_type_script_setup_true_lang-Bd2lff9j.js";import"./index-DywnEBie.js";import"./index.vue_vue_type_script_setup_true_lang-CMdP8z-B.js";import"./usePaging-DFi_nJOG.js";import"./vue3-video-play-xg7gp0Bu.js";import"./vuedraggable-OYPBN08G.js";import"./vue-CHxGqOme.js";import"./sortablejs-DdgKbxid.js";import"./content.vue_vue_type_script_setup_true_lang-CtJXyXWY.js";import"./decoration-img-m1qrTxwn.js";import"./attr.vue_vue_type_script_setup_true_lang-BTuuYoun.js";import"./content-CHudgLTb.js";import"./attr.vue_vue_type_script_setup_true_lang-b30DVom4.js";import"./content.vue_vue_type_script_setup_true_lang-CueQUW1_.js";import"./attr.vue_vue_type_script_setup_true_lang-DHfzE5Sy.js";import"./add-nav.vue_vue_type_script_setup_true_lang-Cmdi_rFe.js";import"./content-J-Diwgva.js";import"./attr.vue_vue_type_script_setup_true_lang-BGRiEPfz.js";import"./content.vue_vue_type_script_setup_true_lang-DBLjkFRp.js";import"./attr.vue_vue_type_script_setup_true_lang-Bvm0acSV.js";import"./content-DJ3F8BqL.js";import"./attr.vue_vue_type_script_setup_true_lang-CqKD7im_.js";import"./index.vue_vue_type_script_setup_true_lang-Cj_-Ra1I.js";import"./content-URaFbq6c.js";import"./content.vue_vue_type_script_setup_true_lang-BzETaV0Z.js";import"./attr.vue_vue_type_script_setup_true_lang-BiKyHNx4.js";import"./content-CcojWjab.js";import"./attr.vue_vue_type_script_setup_true_lang-Bid5ntEZ.js";import"./content.vue_vue_type_script_setup_true_lang-DVgzRRfE.js";import"./attr.vue_vue_type_script_setup_true_lang-DkNGO3zL.js";import"./content-BbaVp4KM.js";const L={class:"decoration-pages min-w-[1100px]"},U={class:"flex justify-between w-full"},W={class:"flex-1 h-full"},Z=v({name:"decorationPc"}),q=v({...Z,setup(z){const g=I();let n;(t=>{t.HOME="4"})(n||(n={}));const r=O({4:{id:4,type:4,name:"首页装修",pageData:[]}}),e=d("4"),a=d(0),i=S(()=>{var t;return((t=r[e.value])==null?void 0:t.pageData)??[]}),w=async()=>{await C.confirm("确定离开此页面？系统可能不会保存您所做的更改。"),g.back()},c=async()=>{const t=await h({id:e.value});r[String(t.id)].pageData=JSON.parse(t.data),a.value=i.value.findIndex(o=>!o.disabled)},D=async()=>{await P({...r[e.value],data:JSON.stringify(r[e.value].pageData)}),c()};return M(e,()=>{a.value=i.value.findIndex(t=>!t.disabled),c()},{immediate:!0}),(t,o)=>{const l=V,x=k,y=H("perms");return u(),J("div",L,[p(x,{shadow:"never",class:"!border-none !rounded-none !bg-primary"},{default:m(()=>[f("div",U,[p(l,{link:"",type:"primary",icon:s(B),style:{color:"#fff"},onClick:w},{default:m(()=>o[1]||(o[1]=[_(" 返回 ")])),_:1},8,["icon"]),T((u(),j(l,{onClick:D},{default:m(()=>o[2]||(o[2]=[_(" 保存 ")])),_:1})),[[y,["decorate:pages:save"]]])])]),_:1}),f("div",W,[p(N,{modelValue:s(a),"onUpdate:modelValue":o[0]||(o[0]=b=>R(a)?a.value=b:null),pageData:s(i)},null,8,["modelValue","pageData"])])])}}}),so=E(q,[["__scopeId","data-v-9bc87a24"]]);export{so as default};
