import{h as $,r as B}from"./element-plus-z3MwpXC9.js";import{I as R,v as S,h as I}from"./@element-plus-DRBc1Xzw.js";import{e as N}from"./index-Ck4tC1F8.js";import{d as z,s as D,b as E,o as r,c as p,a as n,R as y,U as P,aa as q,P as h,u as e,a0 as _,I as L,L as j,Q as A,V as s,M as v}from"./@vue-TMcuEboY.js";import{d as F}from"./index-DXEGVToZ.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"./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"./@vueuse-BQYVjZ5N.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"./nprogress-Cgf5DU8x.js";import"./vue-router-D4MxfuQi.js";import"./pinia-ebUeA1L2.js";import"./axios-C-n2IhIP.js";import"./lodash-BtPWuHkK.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"./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"./decoration-BKETkxh7.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 M={class:"pages-preview"},Q={class:"relative flex justify-center h-full mt-5 mx-10"},T=["src"],U={class:"max-w-[1200px] w-full absolute"},W=["onClick"],G=z({__name:"preview-pc",props:{pageData:{type:Array,default:()=>[]},modelValue:{type:Number,default:0}},emits:["update:modelValue"],setup(a,{emit:b}){const u=D(),k=b,c=E(()=>o=>(o==null?void 0:o.enabled)==0),C=o=>{var m;(m=u.value[o])==null||m.open()},V=o=>{o.enabled!==void 0&&(o.enabled=o.enabled?0:1)},x=(o,m)=>{o.disabled||k("update:modelValue",m)};return(o,m)=>{const f=$,d=B;return r(),p("div",M,[n("div",Q,[o.$route.query.url?(r(),p("iframe",{key:0,ref:"previewIframeRef",class:"flex-1 h-full",width:"100%",height:"100%",scrolling:"no",src:o.$route.query.url},null,8,T)):y("",!0),n("div",U,[(r(!0),p(P,null,q(a.pageData,(t,i)=>(r(),p("div",{key:t.id,class:h(["absolute left-0 top-0",{"cursor-pointer":!(t!=null&&t.disabled)}]),onClick:l=>x(t,i)},[n("div",{class:h(["absolute w-full h-full z-[100] border-dashed",{select:i==a.modelValue,"border-[#dcdfe6] border-2":!(t!=null&&t.disabled),hide:e(c)(t.content)}]),style:_(t.styles)},null,6),L(o.$slots,"default",{},()=>{var l;return[(r(),j(A((l=e(N)[t==null?void 0:t.name])==null?void 0:l.content),{content:t.content,styles:t.styles,key:t.id,ref_for:!0,ref_key:"commonComponentRef",ref:u},null,8,["content","styles"]))]},!0),i==a.modelValue?(r(),p("div",{key:0,class:"widget-btns py-[5px]",style:_({top:t.styles.top,left:t.styles.width})},[n("div",null,[s(d,{effect:"dark",content:"编辑组件内容",placement:"right"},{default:v(()=>[s(f,{class:"py-[5px]",type:"primary",icon:e(R),onClick:l=>C(i)},null,8,["icon","onClick"])]),_:2},1024)]),n("div",null,[s(d,{effect:"dark",content:e(c)(t.content)?"显示":"隐藏",placement:"right"},{default:v(()=>[s(f,{class:"py-[5px]",type:"primary",icon:e(c)(t.content)?e(S):e(I),onClick:l=>V(t.content)},null,8,["icon","onClick"])]),_:2},1032,["content"])])],4)):y("",!0)],10,W))),128))])])])}}}),po=F(G,[["__scopeId","data-v-ccf0ad8b"]]);export{po as default};
