2 lines
4.4 KiB
JavaScript
2 lines
4.4 KiB
JavaScript
import{_ as B}from"./index.25a763ba.js";import{C as E,w as V}from"./element-plus.517d4382.js";import b from"./menu.140daacf.js";import C from"./preview.0f32c6a2.js";import{_ as h}from"./attr-setting.vue_vue_type_script_setup_true_lang.955f12f1.js";import{e as N}from"./index.5a9cf762.js";import{s as P,a as k}from"./decoration.0dd036b4.js";import{o as F,_ as I}from"./index.8b1962e9.js";import{d as v,a0 as S,r as d,e as _,w as A,ai as M,o as f,c as O,V as r,M as n,O as W,L as J,a as T,u as g,T as U}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.1d82ee7c.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./attr.vue_vue_type_script_setup_true_lang.af0b5e5a.js";import"./index.0a0ddda3.js";import"./picker.fe9e67a7.js";import"./index.b17dae19.js";import"./picker.6eb62d2f.js";import"./index.ee772d81.js";import"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import"./index.vue_vue_type_script_setup_true_lang.f8507404.js";import"./usePaging.f6660143.js";import"./vue3-video-play.b66b1487.js";import"./vuedraggable.05ef589e.js";import"./vue.6436c619.js";import"./sortablejs.81b741d7.js";import"./content.vue_vue_type_script_setup_true_lang.bc25388b.js";import"./decoration-img.b2c91106.js";import"./attr.vue_vue_type_script_setup_true_lang.71b382f4.js";import"./content.fb8633fb.js";import"./attr.vue_vue_type_script_setup_true_lang.0c22d3f6.js";import"./add-nav.vue_vue_type_script_setup_true_lang.51d11432.js";import"./content.1e70c053.js";import"./attr.vue_vue_type_script_setup_true_lang.407a7b96.js";import"./content.vue_vue_type_script_setup_true_lang.340f70c5.js";import"./attr.vue_vue_type_script_setup_true_lang.d4a01b37.js";import"./content.194c14ab.js";import"./attr.vue_vue_type_script_setup_true_lang.d755c81f.js";import"./content.77a4522b.js";import"./attr.vue_vue_type_script_setup_true_lang.f9d54c53.js";import"./content.vue_vue_type_script_setup_true_lang.6600aa19.js";import"./attr.vue_vue_type_script_setup_true_lang.8af8a080.js";import"./content.71147d7a.js";const L={class:"decoration-pages min-w-[1100px]"},$={class:"flex h-full items-start"},j=U("\u4FDD\u5B58"),q=v({name:"decorationPages"}),z=v({...q,setup(G){const m=t=>t.map(e=>{var p;return{id:F(),...((p=N[e])==null?void 0:p.options())||{}}}),a=S({[1]:{id:1,type:1,name:"\u9996\u9875\u88C5\u4FEE",pageData:m(["search","banner","nav","news"])},[2]:{id:2,type:2,name:"\u4E2A\u4EBA\u4E2D\u5FC3",pageData:m(["user-info","my-service","user-banner"])},[3]:{id:3,type:3,name:"\u5BA2\u670D\u8BBE\u7F6E",pageData:m(["customer-service"])}}),o=d("1"),i=d(-1),l=_(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData)!=null?e:[]}),D=_(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData[i.value])!=null?e:""}),u=async()=>{const t=await k({id:o.value});a[String(t.id)].pageData=JSON.parse(t.data)},x=async()=>{await P({...a[o.value],data:JSON.stringify(a[o.value].pageData)}),u()};return A(o,()=>{i.value=l.value.findIndex(t=>!t.disabled),u()},{immediate:!0}),(t,e)=>{const c=E,p=V,w=B,y=M("perms");return f(),O("div",L,[r(c,{shadow:"never",class:"!border-none flex-1 flex","body-style":{flex:1}},{default:n(()=>[T("div",$,[r(b,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=s=>o.value=s),menus:a},null,8,["modelValue","menus"]),r(C,{modelValue:i.value,"onUpdate:modelValue":e[1]||(e[1]=s=>i.value=s),pageData:g(l)},null,8,["modelValue","pageData"]),r(h,{class:"flex-1",widget:g(D)},null,8,["widget"])])]),_:1}),W((f(),J(w,{class:"mt-4",fixed:!1},{default:n(()=>[r(p,{type:"primary",onClick:x},{default:n(()=>[j]),_:1})]),_:1})),[[y,["decorate:pages:save"]]])])}}});const se=I(z,[["__scopeId","data-v-c84d2462"]]);export{se as default};
|