2 lines
8.5 KiB
JavaScript
2 lines
8.5 KiB
JavaScript
|
import{d as K,r as y,n as I,v as Q,D as Z,a1 as S,h as u,c as f,y as P,I as B,w as s,a as r,x as N,F as D,G as T,u as n,R as ee,e as l,B as H,t as d,N as a,i as _,z as te,af as R,a2 as le,V as oe,X as ae,W as se,E as ne,aD as re,az as ie,aA as de,cE as me,aE as pe,Y as ce,$ as ue,a0 as _e,_ as xe}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang-a631d3b2.js";import"./el-form-item-4ed993c7.js";import{_ as ve}from"./index-742b412a.js";/* empty css *//* empty css *//* empty css */import{p as be,s as ge}from"./diy-aa30030c.js";import{S as ye}from"./sortable.esm-be94e56d.js";/* empty css */import{r as Ve}from"./range-72f9cbd3.js";/* empty css *//* empty css */import"./index.vue_vue_type_style_index_0_lang-5c6c00d9.js";import"./attachment-c69dd9fd.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 *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-9285296e.js";import"./sys-8ead7f22.js";const Ce={class:"main-container"},he={class:"flex"},ke={class:"w-[360px] h-[400px] absolute mr-[30px] border-[1px] border-gray-300"},we={class:"image-slot flex justify-center items-center mt-1"},Ee={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]"},$e={class:"text-[12px] ml-[8px] text-gray-500"},Ie=["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"},De={class:"mr-[10px] text-sm"},Te={class:"flex align-center"},He={class:"flex align-center"},Re={class:"flex align-center"},je={class:"fixed-footer-wrap"},ze={class:"fixed-footer"},Le=K({__name:"tabbar",setup(Oe){const k=y("navPicture"),p=y(!1),t=I({backgroundColor:"#FFFFFF",textColor:"#333333",textHoverColor:"#333333",type:"1",list:[]}),j=I({text:"",link:{name:"",title:"",parent:"",url:""},iconSelectPath:"",iconPath:""}),w=()=>{t.list.length>=5||t.list.push({...j})};w();const z=i=>{t.list.splice(i,1)},E=y();((i=1)=>{p.value=!0,be({}).then(e=>{p.value=!1,Object.keys(t).forEach((m,v)=>{t[m]=e.data[m]})}).catch(()=>{p.value=!1})})();const L=async i=>{if(O())return!1;p.value||!i||await i.validate(async e=>{e&&(p.value=!0,ge({menu:t}).then(m=>{p.value=!1}).catch(()=>{p.value=!1}))})},O=()=>{if(t.list.length<2)return R({type:"error",message:a("leastTwoNav")}),!0;try{const i=y("");t.list.forEach((e,m)=>{if(e.iconPath||(i.value=`${a("pleaseUpload")}${m+1}${a("navIcon")}`),e.iconSelectPath||(i.value=`${a("pleaseUpload")}${m+1}${a("navSelectIcon")}`),e.text||(i.value=`${a("pleaseEnter")}[${m+1}${a("navTitle")}`),e.link.url||(i.value=`${a("pleaseChoose")}${m+1}${a("navLink")}`),i.value)throw R({type:"error",message:i.value}),Error()})}catch{return!0}return!1},F=y();return Q(()=>{const i=ye.create(F.value,{group:"item-wrap",animation:200,onEnd:e=>{const m=t.list[e.oldIndex];t.list.splice(e.oldIndex,1),t.list.splice(e.newIndex,0,m),Z(()=>{i.sort(Ve(t.list.length).map(v=>v.toString()))})}})}),(i,e)=>{const m=S("Picture"),v=le,G=oe,U=ve,x=ae,V=se,A=fe,M=S("CircleCloseFilled"),b=ne,$=re,C=ie,W=de,h=me,X=pe,Y=ce,q=ue,J=_e;return u(),f("div",Ce,[P((u(),B(q,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[r("div",he,[r("div",ke,[r("div",{class:"flex items-center justify-between absolute h-[60px] left-[0px] right-[0px] bottom-[0px] bg
|