mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-04 12:18:14 +00:00
2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
import{d as K,r as g,R as $,o as W,E as X,V as S,e as f,f as x,Q as P,v as Y,x as r,g as i,j as B,F as N,z as T,y as o,u as s,B as m,H as Z,A as c}from"./base-04829be5.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang-eeb1c1a8.js";import{_ as te}from"./index-c1ab0e3c.js";/* empty css *//* empty css *//* empty css */import{v as oe}from"./index-30df2c14.js";import{t as a}from"./index-043d021e.js";import{f as le}from"./storage-1a3ddb14.js";import{p as ae,s as re}from"./diy-7cd4083a.js";import{S as se}from"./sortable.esm-be94e56d.js";/* empty css */import{r as ie}from"./range-2819bbed.js";import{E as D}from"./index-b649d1d3.js";import{E as ne}from"./index-7e933ae4.js";import{E as me}from"./index-c4af56cf.js";import{a as pe,E as de}from"./index-6bd50bb5.js";import{E as ce}from"./index-db9b8d96.js";import{E as ue}from"./index-eb678249.js";import{a as _e,E as fe}from"./index-0fbfe664.js";import{E as xe,b as ve}from"./index-1cbf3455.js";import{E as be}from"./index-869e0480.js";import{E as ge}from"./index-88566e4e.js";import{v as ye}from"./directive-013f0a4e.js";import{_ as Ve}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css */import"./cloneDeep-44ad47b7.js";import"./index-92283b18.js";import"./typescript-defaf979.js";import"./index-a2524300.js";import"./index-e9e16697.js";import"./error-78e43d3e.js";import"./index-b1557f8a.js";import"./index-9a9de0a3.js";import"./scroll-e5463626.js";import"./vnode-85ccdc7f.js";import"./index-1d455165.js";import"./focus-trap-be36cfe9.js";import"./event-9519ab40.js";import"./index-de053f2e.js";import"./index-4edf2cad.js";import"./index.vue_vue_type_style_index_0_lang-f0796d29.js";import"./attachment-9a932beb.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import"./index-bdd39755.js";import"./index-94a82d50.js";import"./index-bf8db610.js";import"./index.vue_vue_type_script_setup_true_lang-df8a984f.js";import"./sys-f9859bed.js";import"./index-faea7bd5.js";import"./vue-router-fee568b2.js";import"./index-236cb599.js";import"./index-d60f63e2.js";import"./aria-adfa05c5.js";import"./validator-6838b9a3.js";import"./index-760fce0d.js";import"./index-cbf0aee7.js";import"./index-91afef8c.js";import"./index-c3b3b83a.js";import"./index-d7f4b4bb.js";import"./isEqual-ba353d68.js";import"./_Uint8Array-99b916e9.js";import"./flatten-94587e2b.js";import"./index-1808e3f9.js";import"./index-02bf3820.js";import"./index-bf9de702.js";import"./strings-4ec3ae35.js";import"./debounce-f064e94e.js";import"./index-b519934c.js";import"./index-ed22fe56.js";import"./common-111e3797.js";import"./common-2cf17469.js";import"./_isIterateeCall-f0970b1f.js";import"./position-b298e95e.js";import"./castArray-11aea762.js";import"./_initCloneObject-e5a1aa13.js";const he={class:"main-container"},Ce={class:"flex"},ke={class:"w-[360px] h-[400px] absolute mr-[30px] border-[1px] border-gray-300"},Ee={class:"image-slot flex justify-center items-center mt-1"},we={class:"flex-1 ml-[430px]"},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"},ze={class:"fixed-footer"},Le=K({__name:"tabbar",setup(Oe){const k=g("navPicture"),d=g(!1),t=$({backgroundColor:"#FFFFFF",textColor:"#333333",textHoverColor:"#333333",type:"1",list:[]}),H=$({text:"",link:{name:"",title:"",parent:"",url:""},iconSelectPath:"",iconPath:""}),E=()=>{t.list.length>=5||t.list.push({...H})};E();const j=()=>{const n=t.list;n.splice(n.length-1,1)},w=g();((n=1)=>{d.value=!0,ae({}).then(e=>{d.value=!1,Object.keys(t).forEach((p,v)=>{t[p]=e.data[p]})}).catch(()=>{d.value=!1})})();const R=async n=>{if(z())return!1;d.value||!n||await n.validate(async e=>{e&&(d.value=!0,re({menu:t}).then(p=>{d.value=!1}).catch(()=>{d.value=!1}))})},z=()=>{if(t.list.length<2)return D({type:"error",message:a("leastTwoNav")}),!0;try{const n=g("");t.list.forEach((e,p)=>{if(e.iconPath||(n.value=`${a("pleaseUpload")}${p+1}${a("navIcon")}`),e.iconSelectPath||(n.value=`${a("pleaseUpload")}${p+1}${a("navSelectIcon")}`),e.text||(n.value=`${a("pleaseEnter")}[${p+1}${a("navTitle")}`),e.link.url||(n.value=`${a("pleaseChoose")}${p+1}${a("navLink")}`),n.value)throw D({type:"error",message:n.value}),Error()})}catch{return!0}return!1},F=g();return W(()=>{const n=se.create(F.value,{group:"item-wrap",animation:200,onEnd:e=>{const p=t.list[e.oldIndex];t.list.splice(e.oldIndex,1),t.list.splice(e.newIndex,0,p),X(()=>{n.sort(ie(t.list.length).map(v=>v.toString()))})}})}),(n,e)=>{const p=S("Picture"),v=ne,L=me,U=te,u=pe,y=ce,O=ee,A=S("CircleCloseFilled"),b=ue,I=_e,h=xe,G=ve,C=be,M=fe,Q=de,q=ge,J=ye;return f(),x("div",he,[P((f(),Y(q,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[i("div",Ce,[i("div",ke,[i("div",{class:"flex items-center justify-between absolute h-[60px] left-[0px] right-[0px] bottom-[0px] bg-white border-[1px] border-primary",style:B({backgroundColor:t.backgroundColor})},[(f(!0),x(N,null,T(t.list,(l,V)=>(f(),x("div",{class:"flex flex-1 flex-col items-center justify-center",key:"b"+V},[o(L,{class:"w-[22px] h-[22px] mb-[5px] leading-1",src:s(le)(l.iconPath),fit:n.contain},{error:r(()=>[i("div",Ee,[o(v,null,{default:r(()=>[o(p,{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:B({color:t.textColor})},m(l.text),5)):Z("",!0)]))),128))],4)]),i("div",we,[i("div",Fe,[i("span",Ue,m(s(a)("bottomNav")),1),i("span",Ie,m(s(a)("bottomNavHint")),1)]),o(Q,{model:t,"label-width":"100px",ref_key:"formRef",ref:w},{default:r(()=>[o(M,{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(()=>[i("div",{ref_key:"navItemRef",ref:F},[(f(!0),x(N,null,T(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(()=>[i("div",Se,[i("div",Pe,[o(U,{modelValue:l.iconPath,"onUpdate:modelValue":_=>l.iconPath=_,width:"60px",height:"60px",limit:1},null,8,["modelValue","onUpdate:modelValue"]),i("span",Be,m(s(a)("uploadImgUnselected")),1)]),i("div",Ne,[o(U,{modelValue:l.iconSelectPath,"onUpdate:modelValue":_=>l.iconSelectPath=_,width:"60px",height:"60px",limit:1},null,8,["modelValue","onUpdate:modelValue"]),i("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(A)]),_:1})],8,$e))),128))],512),P(o(b,{type:"primary",class:"mt-[15px]",onClick:E},{default:r(()=>[c(m(s(a)("addnav")),1)]),_:1},512),[[oe,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(G,{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(()=>[i("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(()=>[i("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(()=>[i("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,d.value]]),i("div",Re,[i("div",ze,[o(b,{type:"primary",onClick:e[11]||(e[11]=l=>R(w.value))},{default:r(()=>[c(m(s(a)("save")),1)]),_:1})])])])}}});const Po=Ve(Le,[["__scopeId","data-v-00cf5d64"]]);export{Po as default};
|