2 lines
4.7 KiB
JavaScript
2 lines
4.7 KiB
JavaScript
import{_ as V}from"./index.403e8c99.js";import{I as b,w as C}from"./element-plus.9c2fdfa8.js";import I from"./menu.3dfaf9d2.js";import N from"./preview.8f5abc36.js";import{_ as P}from"./attr-setting.vue_vue_type_script_setup_true_lang.1272d1fb.js";import{e as S}from"./index.eef3f6ae.js";import{s as h,a as k}from"./decoration.c6bc7795.js";import{n as F,d as M}from"./index.5be037e5.js";import{d as x,$ as R,r as f,e as g,w as U,af as A,o as v,c as O,U as i,L as l,M as W,K as J,a as $,u as p,k as D,R as H}from"./@vue.53f8d7c3.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.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.47b8af7d.js";import"./axios.96be3cef.js";import"./vue-router.e2f4a118.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.efc99072.js";import"./color.e83714e9.js";import"./clone.fb54e01d.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.b4b577c6.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";import"./attr.vue_vue_type_script_setup_true_lang.b53bfd49.js";import"./index.a870c3ad.js";import"./picker.2bea1a3e.js";import"./index.da6dd366.js";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";import"./picker.150ddd55.js";import"./index.2baf2542.js";import"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import"./index.77cf5d3d.js";import"./index.vue_vue_type_script_setup_true_lang.aa03e8e3.js";import"./usePaging.c22e2b6f.js";import"./vue3-video-play.65ddc377.js";import"./vuedraggable.56692cd2.js";import"./vue.5c6e0f1f.js";import"./sortablejs.4c4a59a1.js";import"./content.vue_vue_type_script_setup_true_lang.9b4fc230.js";import"./decoration-img.f39d2c03.js";import"./attr.vue_vue_type_script_setup_true_lang.f85dc0a9.js";import"./content.34af1843.js";import"./attr.vue_vue_type_script_setup_true_lang.c07cf281.js";import"./add-nav.vue_vue_type_script_setup_true_lang.6d3698c9.js";import"./content.31161b5a.js";import"./attr.vue_vue_type_script_setup_true_lang.57fb24bd.js";import"./content.vue_vue_type_script_setup_true_lang.2c316bae.js";import"./attr.vue_vue_type_script_setup_true_lang.6aa74a67.js";import"./content.7036479f.js";import"./attr.vue_vue_type_script_setup_true_lang.6e3bb62f.js";import"./content.55700b49.js";import"./attr.vue_vue_type_script_setup_true_lang.fa4187aa.js";import"./content.vue_vue_type_script_setup_true_lang.b4ab1c17.js";import"./attr.vue_vue_type_script_setup_true_lang.6aefd81d.js";import"./content.148be13a.js";const K={class:"decoration-pages min-w-[1100px]"},L={class:"flex h-full items-start"},j=x({name:"decorationPages"}),q=x({...j,setup(z){let u;(t=>{t.HOME="1",t.USER="2",t.SERVICE="3"})(u||(u={}));const s=t=>t.map(e=>{var m;return{id:F(),...((m=S[e])==null?void 0:m.options())||{}}}),a=R({[1]:{id:1,type:1,name:"\u9996\u9875\u88C5\u4FEE",pageData:s(["search","banner","nav","news"])},[2]:{id:2,type:2,name:"\u4E2A\u4EBA\u4E2D\u5FC3",pageData:s(["user-info","my-service","user-banner"])},[3]:{id:3,type:3,name:"\u5BA2\u670D\u8BBE\u7F6E",pageData:s(["customer-service"])}}),o=f("1"),r=f(-1),c=g(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData)!=null?e:[]}),w=g(()=>{var t,e;return(e=(t=a[o.value])==null?void 0:t.pageData[r.value])!=null?e:""}),d=async()=>{const t=await k({id:o.value});a[String(t.id)].pageData=JSON.parse(t.data)},E=async()=>{await h({...a[o.value],data:JSON.stringify(a[o.value].pageData)}),d()};return U(o,()=>{r.value=c.value.findIndex(t=>!t.disabled),d()},{immediate:!0}),(t,e)=>{const _=b,m=C,y=V,B=A("perms");return v(),O("div",K,[i(_,{shadow:"never",class:"!border-none flex-1 flex","body-style":{flex:1}},{default:l(()=>[$("div",L,[i(I,{modelValue:p(o),"onUpdate:modelValue":e[0]||(e[0]=n=>D(o)?o.value=n:null),menus:p(a)},null,8,["modelValue","menus"]),i(N,{modelValue:p(r),"onUpdate:modelValue":e[1]||(e[1]=n=>D(r)?r.value=n:null),pageData:p(c)},null,8,["modelValue","pageData"]),i(P,{class:"flex-1",widget:p(w)},null,8,["widget"])])]),_:1}),W((v(),J(y,{class:"mt-4",fixed:!1},{default:l(()=>[i(m,{type:"primary",onClick:E},{default:l(()=>[H("\u4FDD\u5B58")]),_:1})]),_:1})),[[B,["decorate:pages:save"]]])])}}});const de=M(q,[["__scopeId","data-v-c84d2462"]]);export{de as default};
|