import{_ as B}from"./index.6c726fd2.js";import{I as E,w as V}from"./element-plus.8115766e.js";import b from"./menu.a7799810.js";import h from"./preview.0130a41e.js";import{_ as C}from"./attr-setting.vue_vue_type_script_setup_true_lang.0e0d5d0f.js";import{w as F}from"./index.945f3159.js";import{s as N,a as P}from"./decoration.c5478144.js";import{n as k,f as I,d as S}from"./index.637212e4.js";import{d as v,a0 as T,r as d,e as _,w as A,ag as M,o as g,c as O,V as r,M as n,a as J,u as f,O as U,L as W,T as L}from"./@vue.cab01781.js";import"./@vueuse.724ed0af.js";import"./@element-plus.92b4185f.js";import"./lodash-es.29c53eac.js";import"./dayjs.66926594.js";import"./axios.2d915936.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.b68d77aa.js";import"./vue-router.5046cc50.js";import"./pinia.e85e8286.js";import"./vue-demi.bfae2336.js";import"./css-color-function.a8f9466d.js";import"./color.903ca10f.js";import"./clone.9d64bb7a.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.a96d99f2.js";import"./vue-clipboard3.91d4fd5f.js";import"./clipboard.c0a70c0c.js";import"./echarts.6ad8c478.js";import"./zrender.f91f2f01.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.0ab41b7b.js";import"./attr.vue_vue_type_script_setup_true_lang.46fd57c0.js";import"./index.8d2925c7.js";import"./picker.9b4a6b6a.js";import"./index.d1e65413.js";import"./picker.b9df525d.js";import"./index.864bc580.js";import"./usePaging.52ce9b34.js";import"./index.vue_vue_type_script_setup_true_lang.23d9d5f1.js";import"./vue3-video-play.05975c53.js";import"./vuedraggable.a5db575d.js";import"./vue.de4be77f.js";import"./sortablejs.cd7e2c7e.js";import"./content.vue_vue_type_script_setup_true_lang.39e55fc6.js";import"./decoration-img.318173cb.js";import"./attr.vue_vue_type_script_setup_true_lang.d0e1e64c.js";import"./content.f5096561.js";import"./attr.vue_vue_type_script_setup_true_lang.fbbefe09.js";import"./add-nav.vue_vue_type_script_setup_true_lang.07425cf8.js";import"./content.234d99b9.js";import"./attr.vue_vue_type_script_setup_true_lang.0411bda0.js";import"./content.vue_vue_type_script_setup_true_lang.101fa054.js";import"./attr.vue_vue_type_script_setup_true_lang.06a2fa18.js";import"./content.8e1e3b35.js";import"./attr.vue_vue_type_script_setup_true_lang.0b87e513.js";import"./content.cb47bf22.js";import"./attr.vue_vue_type_script_setup_true_lang.b7c8fc1c.js";import"./content.vue_vue_type_script_setup_true_lang.026e017c.js";import"./attr.vue_vue_type_script_setup_true_lang.0583d8bc.js";import"./content.931f326b.js";const $={class:"decoration-pages min-w-[1100px]"},j={class:"flex h-full items-start"},q=L("\u4FDD\u5B58"),z=v({name:"decorationPages"}),G=v({...z,setup(H){const s=e=>e.map(t=>{var p;return{id:k(),...((p=F[t])==null?void 0:p.options())||{}}}),o=T({[1]:{id:1,pageType:1,name:"\u9996\u9875\u88C5\u4FEE",pageData:s(["search","banner","nav","news"])},[2]:{id:2,pageType:2,name:"\u4E2A\u4EBA\u4E2D\u5FC3",pageData:s(["user-info","my-service","user-banner"])},[3]:{id:3,pageType:3,name:"\u5BA2\u670D\u8BBE\u7F6E",pageData:s(["customer-service"])}}),a=d("1"),i=d(-1),u=_(()=>{var e,t;return(t=(e=o[a.value])==null?void 0:e.pageData)!=null?t:[]}),D=_(()=>{var e,t;return(t=(e=o[a.value])==null?void 0:e.pageData[i.value])!=null?t:""}),l=async()=>{const e=await P({id:a.value});o[String(e.id)].pageData=JSON.parse(e.pageData)},x=async()=>{await N({...o[a.value],pageData:JSON.stringify(o[a.value].pageData)}),l(),I.msgSuccess("\u4FDD\u5B58\u6210\u529F")};return A(a,()=>{i.value=u.value.findIndex(e=>!e.disabled),l()},{immediate:!0}),(e,t)=>{const c=E,p=V,w=B,y=M("perms");return g(),O("div",$,[r(c,{shadow:"never",class:"!border-none flex-1 flex","body-style":{flex:1}},{default:n(()=>[J("div",j,[r(b,{modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=m=>a.value=m),menus:o},null,8,["modelValue","menus"]),r(h,{modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=m=>i.value=m),pageData:f(u)},null,8,["modelValue","pageData"]),r(C,{class:"flex-1",widget:f(D)},null,8,["widget"])])]),_:1}),U((g(),W(w,{class:"mt-4",fixed:!1},{default:n(()=>[r(p,{type:"primary",onClick:x},{default:n(()=>[q]),_:1})]),_:1})),[[y,["decorate:pages:save"]]])])}}});const it=S(G,[["__scopeId","data-v-ed050f9e"]]);export{it as default};
