mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-06 04:58:10 +00:00
2 lines
9.3 KiB
JavaScript
2 lines
9.3 KiB
JavaScript
import{E as K}from"./base-962c0c23.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as W}from"./index-5cfb4637.js";/* empty css *//* empty css */import{E as X,b as Y}from"./el-radio-bfd4b1ad.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang-a2fbdd05.js";import{_ as ee}from"./index-c88476dc.js";/* empty css */import{v as te}from"./event-ff03ec12.js";import{t as a}from"./index-2af60c2e.js";import{d as oe}from"./storage-abe718b1.js";import{l as le,m as ae}from"./diy-3ad5823e.js";import{S as re}from"./sortable.esm-be94e56d.js";/* empty css */import{r as se}from"./range-5a416794.js";import{E as $}from"./index-00212650.js";import{E as ne}from"./index-6a89175f.js";import{a as ie,E as me}from"./index-61c777fa.js";import{E as de}from"./index-93f2c618.js";import{E as pe}from"./index-bba9e58c.js";import{a as ce,E as ue}from"./index-92c5bc98.js";import{E as _e}from"./index-69523418.js";import{v as fe}from"./directive-c0c3e9a3.js";import{d as xe,r as g,M as S,o as ve,A as be,Q as P,b as f,e as x,L as B,m as ge,p as r,f as n,h as N,F as T,t as D,q as o,u as s,x as m,C as ye,v as c}from"./runtime-core.esm-bundler-dc7a07d7.js";import{_ as Ve}from"./_plugin-vue_export-helper-c27b6911.js";import"./vue-router-79053937.js";import"./el-overlay-60700377.js";import"./index-5d86eb33.js";import"./focus-trap-b8b5a003.js";import"./index-8bcaafa6.js";import"./index-7a123a20.js";import"./el-tooltip-58212670.js";import"./el-avatar-3bb47ce2.js";import"./index-d57cc47d.js";import"./cloneDeep-b538bbcc.js";import"./index.vue_vue_type_style_index_0_lang-d0142cd9.js";import"./attachment-7b90a6f4.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-e1e81893.js";import"./sys-451b2f0d.js";import"./index-50a00d09.js";import"./index-a9dd5cf5.js";import"./index-9f244af6.js";import"./index-df51d91a.js";import"./isEqual-c7d5e6d9.js";import"./_Uint8Array-6ff3cafa.js";import"./flatten-d5d1dc97.js";import"./index-100b1469.js";import"./index-b933df38.js";import"./index-4f5c40a5.js";import"./strings-4868a118.js";import"./common-6291c908.js";import"./common-2cf17469.js";import"./_isIterateeCall-c579b126.js";import"./_initCloneObject-28e6bdaa.js";const he={class:"main-container"},Ce={class:"flex"},ke={class:"w-[360px] h-[615px] relative mr-[30px] border-[1px] border-gray-300"},Ee={class:"image-slot flex justify-center items-center mt-1"},we={class:"flex-1"},Fe={class:"flex items-center border-l-[3px] border-primary pl-[5px] leading-[1.1] mt-[10px]"},Ue={class:"text-[14px]"},Ie={class:"text-[12px] ml-[8px] text-gray-500"},$e=["data-id"],Se={class:"flex align-center"},Pe={class:"flex flex-col justify-center items-center"},Be={class:"mr-[10px] text-sm"},Ne={class:"flex flex-col justify-center items-center"},Te={class:"mr-[10px] text-sm"},De={class:"flex align-center"},He={class:"flex align-center"},je={class:"flex align-center"},Re={class:"fixed-footer-wrap"},Le={class:"fixed-footer"},ze=xe({__name:"tabbar",setup(Oe){const k=g("navPicture"),p=g(!1),t=S({backgroundColor:"#FFFFFF",textColor:"#333333",textHoverColor:"#333333",type:"1",list:[]}),H=S({text:"",link:{name:"",title:"",parent:"",url:""},iconSelectPath:"",iconPath:""}),E=()=>{t.list.length>=5||t.list.push({...H})};E();const j=()=>{const i=t.list;i.splice(i.length-1,1)},w=g();((i=1)=>{p.value=!0,le({}).then(e=>{p.value=!1,Object.keys(t).forEach((d,v)=>{t[d]=e.data[d]})}).catch(()=>{p.value=!1})})();const R=async i=>{if(L())return!1;p.value||!i||await i.validate(async e=>{e&&(p.value=!0,ae({menu:t}).then(d=>{p.value=!1}).catch(()=>{p.value=!1}))})},L=()=>{if(t.list.length<2)return $({type:"error",message:a("leastTwoNav")}),!0;try{const i=g("");t.list.forEach((e,d)=>{if(e.iconPath||(i.value=`${a("pleaseUpload")}${d+1}${a("navIcon")}`),e.iconSelectPath||(i.value=`${a("pleaseUpload")}${d+1}${a("navSelectIcon")}`),e.text||(i.value=`${a("pleaseEnter")}[${d+1}${a("navTitle")}`),e.link.url||(i.value=`${a("pleaseChoose")}${d+1}${a("navLink")}`),i.value)throw $({type:"error",message:i.value}),Error()})}catch{return!0}return!1},F=g();return ve(()=>{const i=re.create(F.value,{group:"item-wrap",animation:200,onEnd:e=>{const d=t.list[e.oldIndex];t.list.splice(e.oldIndex,1),t.list.splice(e.newIndex,0,d),be(()=>{i.sort(se(t.list.length).map(v=>v.toString()))})}})}),(i,e)=>{const d=P("Picture"),v=K,z=ne,U=ee,u=ie,y=de,O=Z,M=P("CircleCloseFilled"),b=pe,I=ce,h=X,q=Y,C=W,A=ue,G=me,Q=_e,J=fe;return f(),x("div",he,[B((f(),ge(Q,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[n("div",Ce,[n("div",ke,[n("div",{class:"flex items-center justify-between absolute h-[60px] left-[0px] right-[0px] bottom-[0px] bg-white border-[1px] border-primary",style:N({backgroundColor:t.backgroundColor})},[(f(!0),x(T,null,D(t.list,(l,V)=>(f(),x("div",{class:"flex flex-1 flex-col items-center justify-center",key:"b"+V},[o(z,{class:"w-[22px] h-[22px] mb-[5px] leading-1",src:s(oe)(l.iconPath),fit:i.contain},{error:r(()=>[n("div",Ee,[o(v,null,{default:r(()=>[o(d,{class:"text-3xl text-gray-500"})]),_:1})])]),_:2},1032,["src","fit"]),["1","3"].includes(t.type)?(f(),x("span",{key:0,class:"text-[12px]",style:N({color:t.textColor})},m(l.text),5)):ye("",!0)]))),128))],4)]),n("div",we,[n("div",Fe,[n("span",Ue,m(s(a)("bottomNav")),1),n("span",Ie,m(s(a)("bottomNavHint")),1)]),o(G,{model:t,"label-width":"100px",ref_key:"formRef",ref:w},{default:r(()=>[o(A,{modelValue:k.value,"onUpdate:modelValue":e[10]||(e[10]=l=>k.value=l),class:"demo-tabs mt-[15px]"},{default:r(()=>[o(I,{label:s(a)("navImage"),name:"navPicture"},{default:r(()=>[n("div",{ref_key:"navItemRef",ref:F},[(f(!0),x(T,null,D(t.list,(l,V)=>(f(),x("div",{key:"a"+V,"data-id":V,class:"item-wrap border-2 border-dashed pt-[18px] m-[10px] mb-[15px] relative list-item"},[o(u,{label:s(a)("navIconOne")},{default:r(()=>[n("div",Se,[n("div",Pe,[o(U,{modelValue:l.iconPath,"onUpdate:modelValue":_=>l.iconPath=_,width:"60px",height:"60px",limit:1},null,8,["modelValue","onUpdate:modelValue"]),n("span",Be,m(s(a)("uploadImgUnselected")),1)]),n("div",Ne,[o(U,{modelValue:l.iconSelectPath,"onUpdate:modelValue":_=>l.iconSelectPath=_,width:"60px",height:"60px",limit:1},null,8,["modelValue","onUpdate:modelValue"]),n("span",Te,m(s(a)("uploadImgSelected")),1)])])]),_:2},1032,["label"]),o(u,{label:s(a)("navTitleOne")},{default:r(()=>[o(y,{class:"w-[215px]",modelValue:l.text,"onUpdate:modelValue":_=>l.text=_,placeholder:s(a)("titleContent"),maxlength:"5","show-word-limit":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"]),o(u,{label:s(a)("navLinkOne")},{default:r(()=>[o(O,{modelValue:l.link,"onUpdate:modelValue":_=>l.link=_},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),o(v,{class:"close-icon cursor-pointer -top-[11px] -right-[8px]",onClick:j},{default:r(()=>[o(M)]),_:1})],8,$e))),128))],512),B(o(b,{type:"primary",class:"mt-[15px]",onClick:E},{default:r(()=>[c(m(s(a)("addnav")),1)]),_:1},512),[[te,t.list.length<5]])]),_:1},8,["label"]),o(I,{label:s(a)("styleSet"),name:"setStyle"},{default:r(()=>[o(u,{label:s(a)("navType")},{default:r(()=>[o(q,{modelValue:t.type,"onUpdate:modelValue":e[0]||(e[0]=l=>t.type=l),class:"ml-4"},{default:r(()=>[o(h,{label:"1",size:"large"},{default:r(()=>[c(m(s(a)("imageText")),1)]),_:1}),o(h,{label:"2",size:"large"},{default:r(()=>[c(m(s(a)("image")),1)]),_:1}),o(h,{label:"3",size:"large"},{default:r(()=>[c(m(s(a)("text")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),o(u,{label:s(a)("textColor")},{default:r(()=>[n("div",De,[o(C,{modelValue:t.textColor,"onUpdate:modelValue":e[1]||(e[1]=l=>t.textColor=l)},null,8,["modelValue"]),o(y,{class:"ml-[10px]",modelValue:t.textColor,"onUpdate:modelValue":e[2]||(e[2]=l=>t.textColor=l),disabled:""},null,8,["modelValue"]),o(b,{class:"ml-[10px]",type:"primary",onClick:e[3]||(e[3]=l=>t.textColor="#333333")},{default:r(()=>[c(m(s(a)("reset")),1)]),_:1})])]),_:1},8,["label"]),o(u,{label:s(a)("textSelectColor")},{default:r(()=>[n("div",He,[o(C,{modelValue:t.textHoverColor,"onUpdate:modelValue":e[4]||(e[4]=l=>t.textHoverColor=l)},null,8,["modelValue"]),o(y,{class:"ml-[10px]",modelValue:t.textHoverColor,"onUpdate:modelValue":e[5]||(e[5]=l=>t.textHoverColor=l),disabled:""},null,8,["modelValue"]),o(b,{class:"ml-[10px]",type:"primary",onClick:e[6]||(e[6]=l=>t.textHoverColor="#333333")},{default:r(()=>[c(m(s(a)("reset")),1)]),_:1})])]),_:1},8,["label"]),o(u,{label:s(a)("backgroundColor")},{default:r(()=>[n("div",je,[o(C,{modelValue:t.backgroundColor,"onUpdate:modelValue":e[7]||(e[7]=l=>t.backgroundColor=l)},null,8,["modelValue"]),o(y,{class:"ml-[10px]",modelValue:t.backgroundColor,"onUpdate:modelValue":e[8]||(e[8]=l=>t.backgroundColor=l),disabled:""},null,8,["modelValue"]),o(b,{class:"ml-[10px]",type:"primary",onClick:e[9]||(e[9]=l=>t.backgroundColor="#FFFFFF")},{default:r(()=>[c(m(s(a)("reset")),1)]),_:1})])]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["model"])])])]),_:1})),[[J,p.value]]),n("div",Re,[n("div",Le,[o(b,{type:"primary",onClick:e[11]||(e[11]=l=>R(w.value))},{default:r(()=>[c(m(s(a)("save")),1)]),_:1})])])])}}});const oo=Ve(ze,[["__scopeId","data-v-d3747b3b"]]);export{oo as default};
|