niucloud-admin/niucloud/public/admin/assets/edit-page-cc8339f3.js
全栈小学生 d680214fd1 up
2025-06-11 09:21:43 +08:00

2 lines
11 KiB
JavaScript

import{d as L,aj as T,z as F,r as E,N as O,h as f,c as N,J as S,ac as w,u as l,a as i,t as n,k as s,e as o,w as r,aM as j,b as W,F as A,m as V,B as y,i as _,n as h,D as J,G as Q,H as q,ax as K,Q as X,ad as Y,ae as Z,E as ll,S as el,b4 as tl,b6 as ol}from"./index-e05985b6.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css */import{_ as al}from"./index.vue_vue_type_script_setup_true_lang-de519c71.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as sl}from"./index.vue_vue_type_style_index_0_lang-6860038b.js";/* empty css *//* empty css */import rl from"./index-627b9e4a.js";/* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{u as il}from"./diy-17e91366.js";const nl=""+new URL("nav_style1-05ddbdee.jpg",import.meta.url).href,dl=""+new URL("nav_style2-f640437f.jpg",import.meta.url).href,pl=""+new URL("nav_style3-e7edd5cf.jpg",import.meta.url).href,ml=""+new URL("nav_style4-ee5f97a2.jpg",import.meta.url).href,ul={class:"content-wrap"},bl={class:"edit-attr-item-wrap"},gl={class:"mb-[10px]"},_l={class:"text-sm text-gray-400"},cl={class:"edit-attr-item-wrap"},fl={class:"mb-[10px]"},xl={class:"text-sm text-gray-400"},yl={class:"text-sm text-gray-400"},hl={class:"flex"},Sl={class:"text-sm text-gray-400 leading-[1.5]"},wl={class:"text-sm text-gray-400 mt-[10px]"},Vl={class:"edit-attr-item-wrap"},vl={class:"mb-[10px]"},Bl={class:"text-sm text-gray-400"},Cl={class:"flex flex-wrap"},kl=i("img",{class:"max-w-[100%] max-h-[100%]",src:nl},null,-1),Ul=[kl],Tl=i("img",{class:"max-w-[100%] max-h-[100%]",src:dl},null,-1),El=[Tl],Nl=i("img",{class:"max-w-[100%] max-h-[100%]",src:pl},null,-1),jl=[Nl],Al=i("img",{class:"max-w-[100%] max-h-[100%]",src:ml},null,-1),Pl=[Al],Rl={class:"dialog-footer"},$l={class:"style-wrap"},Hl={class:"edit-attr-item-wrap"},Il={class:"mb-[10px]"},zl={class:"text-sm text-gray-400 ml-[80px] mb-[10px]"},Dl={class:"edit-attr-item-wrap"},Ml={class:"mb-[10px]"},Gl={class:"edit-attr-item-wrap"},Ll={class:"mb-[10px]"},Fl=L({__name:"edit-page",setup(Ol,{expose:P}){const e=il();T(()=>e.global.bgUrl,(u,t)=>{const m=new Image;m.src=F(e.global.bgUrl),m.onload=async()=>{e.global.imgWidth=m.width,e.global.imgHeight=m.height},e.global.bgUrl||(e.global.imgWidth="",e.global.imgHeight="")});const R=u=>{e.value.forEach((t,m)=>{t.margin.both=u})};T(()=>e.global,(u,t)=>{p.value=u.topStatusBar.style},{deep:!0});const c=E(!1),$=()=>{c.value=!0},p=E("style-1"),H=()=>{switch(p.value){case"style-1":e.global.topStatusBar.styleName="风格1";break;case"style-2":e.global.topStatusBar.styleName="风格2";break;case"style-3":e.global.topStatusBar.styleName="风格3";break;case"style-4":e.global.topStatusBar.styleName="风格4";break}e.global.topStatusBar.style=p.value,c.value=!1};return P({}),(u,t)=>{const m=J,d=Q,b=q,v=K,I=O("ArrowRight"),z=X,B=rl,x=Y,C=Z,D=sl,k=ll,M=el,g=tl,G=al,U=ol;return f(),N(A,null,[S(i("div",ul,[i("div",bl,[i("h3",gl,n(l(s)("pageContent")),1),o(b,{"label-width":"80px",class:"px-[10px]",onSubmit:t[1]||(t[1]=j(()=>{},["prevent"]))},{default:r(()=>[o(d,{label:l(s)("diyPageTitle")},{default:r(()=>[o(m,{modelValue:l(e).pageTitle,"onUpdate:modelValue":t[0]||(t[0]=a=>l(e).pageTitle=a),modelModifiers:{trim:!0},placeholder:l(s)("diyPageTitlePlaceholder"),clearable:"",maxlength:"16","show-word-limit":""},null,8,["modelValue","placeholder"]),i("div",_l,n(l(s)("pageTitleTips")),1)]),_:1},8,["label"])]),_:1})]),W(u.$slots,"content"),i("div",cl,[i("h3",fl,n(l(s)("statusBarContent")),1),o(b,{"label-width":"80px",class:"px-[10px]",onSubmit:t[8]||(t[8]=j(()=>{},["prevent"]))},{default:r(()=>[o(d,{label:l(s)("topStatusBarNav"),class:"display-block"},{default:r(()=>[o(v,{modelValue:l(e).global.topStatusBar.isShow,"onUpdate:modelValue":t[2]||(t[2]=a=>l(e).global.topStatusBar.isShow=a)},null,8,["modelValue"]),i("div",xl,n(l(s)("statusBarSwitchTips")),1)]),_:1},8,["label"]),l(e).global.topStatusBar.isShow?(f(),N(A,{key:0},[o(d,{label:l(s)("diyTitle")},{default:r(()=>[o(m,{modelValue:l(e).global.title,"onUpdate:modelValue":t[3]||(t[3]=a=>l(e).global.title=a),modelModifiers:{trim:!0},placeholder:l(s)("diyTitlePlaceholder"),clearable:"",maxlength:"12","show-word-limit":""},null,8,["modelValue","placeholder"]),i("div",yl,n(l(s)("titleTips")),1)]),_:1},8,["label"]),o(d,{label:l(s)("selectStyle"),class:"display-block"},{default:r(()=>[i("div",hl,[i("span",{class:"text-primary flex-1 cursor-pointer",onClick:$},n(l(e).global.topStatusBar.styleName),1),o(z,null,{default:r(()=>[o(I)]),_:1})]),i("div",Sl,n(l(s)("styleShowTips")),1)]),_:1},8,["label"]),["style-2","style-3"].indexOf(l(e).global.topStatusBar.style)>-1?(f(),V(d,{key:0,label:l(s)("topStatusBarImg")},{default:r(()=>[o(B,{modelValue:l(e).global.topStatusBar.imgUrl,"onUpdate:modelValue":t[4]||(t[4]=a=>l(e).global.topStatusBar.imgUrl=a),limit:1},null,8,["modelValue"]),i("div",wl,n(l(s)("topStatusBarImgTips")),1)]),_:1},8,["label"])):y("",!0),l(e).global.topStatusBar.style=="style-3"?(f(),V(d,{key:1,label:l(s)("topStatusBarSearchName")},{default:r(()=>[o(m,{modelValue:l(e).global.topStatusBar.inputPlaceholder,"onUpdate:modelValue":t[5]||(t[5]=a=>l(e).global.topStatusBar.inputPlaceholder=a),modelModifiers:{trim:!0},placeholder:l(s)("topStatusBarSearchNamePlaceholder"),clearable:"",maxlength:"12","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):y("",!0),S(o(d,{label:l(s)("textAlign")},{default:r(()=>[o(C,{modelValue:l(e).global.topStatusBar.textAlign,"onUpdate:modelValue":t[6]||(t[6]=a=>l(e).global.topStatusBar.textAlign=a)},{default:r(()=>[o(x,{label:"left"},{default:r(()=>[_(n(l(s)("textAlignLeft")),1)]),_:1}),o(x,{label:"center"},{default:r(()=>[_(n(l(s)("textAlignCenter")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),[[w,l(e).global.topStatusBar.style=="style-1"]]),["style-2","style-3"].indexOf(l(e).global.topStatusBar.style)>-1?(f(),V(d,{key:2,label:l(s)("link")},{default:r(()=>[o(D,{modelValue:l(e).global.topStatusBar.link,"onUpdate:modelValue":t[7]||(t[7]=a=>l(e).global.topStatusBar.link=a)},null,8,["modelValue"])]),_:1},8,["label"])):y("",!0)],64)):y("",!0)]),_:1})]),i("div",Vl,[i("h3",vl,n(l(s)("bottomNavContent")),1),o(b,{"label-width":"80px",class:"px-[10px]"},{default:r(()=>[o(d,{label:l(s)("tabbar"),class:"display-block"},{default:r(()=>[o(v,{modelValue:l(e).global.bottomTabBarSwitch,"onUpdate:modelValue":t[9]||(t[9]=a=>l(e).global.bottomTabBarSwitch=a)},null,8,["modelValue"]),i("div",Bl,n(l(s)("tabbarSwitchTips")),1)]),_:1},8,["label"])]),_:1})]),o(M,{modelValue:c.value,"onUpdate:modelValue":t[15]||(t[15]=a=>c.value=a),title:l(s)("selectStyle"),width:"800px"},{footer:r(()=>[i("span",Rl,[o(k,{onClick:t[14]||(t[14]=a=>c.value=!1)},{default:r(()=>[_(n(l(s)("cancel")),1)]),_:1}),o(k,{type:"primary",onClick:H},{default:r(()=>[_(n(l(s)("confirm")),1)]),_:1})])]),default:r(()=>[i("div",Cl,[i("div",{class:h(["flex items-center justify-center overflow-hidden w-[32%] h-[100px] mr-[2%] mb-[15px] cursor-pointer border bg-gray-50",{"border-primary":p.value=="style-1"}]),onClick:t[10]||(t[10]=a=>p.value="style-1")},Ul,2),i("div",{class:h(["flex items-center justify-center overflow-hidden w-[32%] h-[100px] mr-[2%] mb-[15px] cursor-pointer border bg-gray-50",{"border-primary":p.value=="style-2"}]),onClick:t[11]||(t[11]=a=>p.value="style-2")},El,2),i("div",{class:h(["flex items-center justify-center overflow-hidden w-[32%] h-[100px] mb-[15px] cursor-pointer border bg-gray-50",{"border-primary":p.value=="style-3"}]),onClick:t[12]||(t[12]=a=>p.value="style-3")},jl,2),i("div",{class:h(["flex items-center justify-center overflow-hidden w-[32%] h-[100px] mr-[2%] cursor-pointer border bg-gray-50",{"border-primary":p.value=="style-4"}]),onClick:t[13]||(t[13]=a=>p.value="style-4")},Pl,2)])]),_:1},8,["modelValue","title"])],512),[[w,l(e).editTab=="content"]]),S(i("div",$l,[i("div",Hl,[i("h3",Il,n(l(s)("pageStyle")),1),o(b,{"label-width":"115px",class:"px-[10px]"},{default:r(()=>[o(d,{label:l(s)("pageBgColor")},{default:r(()=>[o(g,{modelValue:l(e).editComponent.pageStartBgColor,"onUpdate:modelValue":t[16]||(t[16]=a=>l(e).editComponent.pageStartBgColor=a),"show-alpha":"",predefine:l(e).predefineColors},null,8,["modelValue","predefine"]),o(G,{name:"iconfont iconmap-connect",size:"20px",class:"block !text-gray-400 mx-[5px]"}),o(g,{modelValue:l(e).editComponent.pageEndBgColor,"onUpdate:modelValue":t[17]||(t[17]=a=>l(e).editComponent.pageEndBgColor=a),"show-alpha":"",predefine:l(e).predefineColors},null,8,["modelValue","predefine"])]),_:1},8,["label"]),o(d,{label:l(s)("bgGradientAngle")},{default:r(()=>[o(C,{modelValue:l(e).editComponent.pageGradientAngle,"onUpdate:modelValue":t[18]||(t[18]=a=>l(e).editComponent.pageGradientAngle=a)},{default:r(()=>[o(x,{label:"to bottom"},{default:r(()=>[_(n(l(s)("topToBottom")),1)]),_:1}),o(x,{label:"to right"},{default:r(()=>[_(n(l(s)("leftToRight")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),o(d,{label:l(s)("bgHeightScale")},{default:r(()=>[o(U,{modelValue:l(e).global.bgHeightScale,"onUpdate:modelValue":t[19]||(t[19]=a=>l(e).global.bgHeightScale=a),"show-input":"",size:"small",class:"ml-[10px] diy-nav-slider"},null,8,["modelValue"])]),_:1},8,["label"]),i("div",zl,n(l(s)("bgHeightScaleTip")),1),o(d,{label:l(s)("bgUrl")},{default:r(()=>[o(B,{modelValue:l(e).global.bgUrl,"onUpdate:modelValue":t[20]||(t[20]=a=>l(e).global.bgUrl=a),limit:1},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),i("div",Dl,[i("h3",Ml,n(l(s)("statusBarStyle")),1),o(b,{"label-width":"115px",class:"px-[10px]"},{default:r(()=>[o(d,{label:l(s)("topStatusBarBgColor"),class:"display-block"},{default:r(()=>[o(g,{modelValue:l(e).global.topStatusBar.bgColor,"onUpdate:modelValue":t[21]||(t[21]=a=>l(e).global.topStatusBar.bgColor=a),"show-alpha":""},null,8,["modelValue"])]),_:1},8,["label"]),o(d,{label:l(s)("rollTopStatusBarBgColor"),class:"display-block"},{default:r(()=>[o(g,{modelValue:l(e).global.topStatusBar.rollBgColor,"onUpdate:modelValue":t[22]||(t[22]=a=>l(e).global.topStatusBar.rollBgColor=a),"show-alpha":""},null,8,["modelValue"])]),_:1},8,["label"]),o(d,{label:l(s)("topStatusBarTextColor"),class:"display-block"},{default:r(()=>[o(g,{modelValue:l(e).global.topStatusBar.textColor,"onUpdate:modelValue":t[23]||(t[23]=a=>l(e).global.topStatusBar.textColor=a),"show-alpha":""},null,8,["modelValue"])]),_:1},8,["label"]),o(d,{label:l(s)("rollTopStatusBarTextColor"),class:"display-block"},{default:r(()=>[o(g,{modelValue:l(e).global.topStatusBar.rollTextColor,"onUpdate:modelValue":t[24]||(t[24]=a=>l(e).global.topStatusBar.rollTextColor=a),"show-alpha":""},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),i("div",Gl,[i("h3",Ll,n(l(s)("marginSet")),1),o(b,{"label-width":"115px",class:"px-[10px]"},{default:r(()=>[o(d,{label:l(s)("marginBoth")},{default:r(()=>[o(U,{modelValue:l(e).global.template.margin.both,"onUpdate:modelValue":t[25]||(t[25]=a=>l(e).global.template.margin.both=a),"show-input":"",size:"small",onInput:R,class:"ml-[10px] diy-nav-slider"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})])],512),[[w,l(e).editTab=="style"]])],64)}}}),me=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"}));export{me as _};