engineering/public/admin/assets/tabbar.85769537.js
2024-03-04 15:04:21 +08:00

2 lines
7.0 KiB
JavaScript

import{_ as O}from"./index.6f7221a5.js";import{s as Q,I as S,w as I,y as W,a4 as q,a5 as G,D as H,C as J}from"./element-plus.258bf9e7.js";import{d as h,e as K,o as p,c as f,V as e,u as y,k as w,M as o,T as b,a0 as X,ai as Y,O as Z,L as U,a as l,W as ee,a8 as te,Q as oe,S as le,t as ae,$ as se,U as ne,b7 as ue,b6 as re}from"./@vue.ab566ce7.js";import{_ as ie}from"./index.7a6cc892.js";import{_ as de}from"./picker.f1021c28.js";import{_ as ce}from"./picker.4547601e.js";import{f as $,a as me,_ as pe}from"./index.ec401e3b.js";import{b as _e,c as fe}from"./decoration.b25b786a.js";import{D as be}from"./vuedraggable.05ef589e.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./index.9492d03b.js";import"./index.59cb12da.js";import"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import"./index.vue_vue_type_script_setup_true_lang.84fcd2ee.js";import"./usePaging.f6660143.js";import"./file.vue_vue_type_style_index_0_scoped_5ccc0f84_lang.e4e8877b.js";import"./vue3-video-play.b66b1487.js";import"./lodash.1d82ee7c.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./vue.6436c619.js";import"./sortablejs.81b741d7.js";const xe={class:"color-picker flex flex-1"},Fe=b("\u91CD\u7F6E"),Ve=h({__name:"index",props:{modelValue:{type:String},defaultColor:{type:String}},emits:["update:modelValue"],setup(d,{emit:E}){const x=d,t=K({get(){return x.modelValue},set(_){E("update:modelValue",_)}}),F=["#409EFF","#28C76F","#EA5455","#FF9F43","#01CFE8","#4A5DFF"],V=()=>{t.value=x.defaultColor};return(_,i)=>{const g=Q,a=S,n=I;return p(),f("div",xe,[e(g,{modelValue:y(t),"onUpdate:modelValue":i[0]||(i[0]=c=>w(t)?t.value=c:null),predefine:F},null,8,["modelValue"]),e(a,{modelValue:y(t),"onUpdate:modelValue":i[1]||(i[1]=c=>w(t)?t.value=c:null),class:"mx-[10px] flex-1",type:"text",readonly:""},null,8,["modelValue"]),e(n,{type:"text",onClick:V},{default:o(()=>[Fe]),_:1})])}}}),v=d=>(ue("data-v-11220d71"),d=d(),re(),d),ge={class:"decoration-tabbar min-w-[800px]"},ye={class:"flex h-full items-start"},he={class:"pages-preview mx-[30px]"},ve={class:"tabbar flex"},Ee=["src"],Ce={class:"leading-3 text-[12px] mt-[4px]"},De={class:"flex-1"},ke=v(()=>l("div",{class:"title flex items-center before:w-[3px] before:h-[14px] before:block before:bg-primary before:mr-2"},[b(" \u5E95\u90E8\u5BFC\u822A\u8BBE\u7F6E "),l("span",{class:"form-tips ml-[10px] !mt-0"}," \u81F3\u5C11\u6DFB\u52A02\u4E2A\u5BFC\u822A\uFF0C\u6700\u591A\u6DFB\u52A05\u4E2A\u5BFC\u822A ")],-1)),Ae={class:"mb-[18px]"},Be={class:"bg-fill-light w-full p-4 mt-4"},we={class:"upload-btn w-[60px] h-[60px]"},Ue=v(()=>l("span",{class:"text-xs leading-5"}," \u672A\u9009\u4E2D ",-1)),$e={class:"upload-btn w-[60px] h-[60px]"},Se=v(()=>l("span",{class:"text-xs leading-5"}," \u9009\u4E2D ",-1)),Ie=b(" \u6DFB\u52A0\u5BFC\u822A "),Te=b("\u4FDD\u5B58"),ze=h({name:"decorationTabbar"}),Ne=h({...ze,setup(d){const t=X({style:{default_color:"",selected_color:""},list:[{name:"",selected:"",unselected:"",link:{}},{name:"",selected:"",unselected:"",link:{}}]}),F=()=>{var a;((a=t.list)==null?void 0:a.length)<5?t.list.push({name:"",selected:"",unselected:"",link:{}}):$.msgError(`\u6700\u591A\u6DFB\u52A0${5}\u4E2A`)},V=a=>{var n;if(((n=t.list)==null?void 0:n.length)<=2)return $.msgError(`\u6700\u5C11\u4FDD\u7559${2}\u4E2A`);t.list.splice(a,1)},_=a=>a.relatedContext.index!=0,i=async()=>{const a=await _e();t.list=a.list,t.style=a.style},g=async()=>{await fe(ae(t)),i()};return i(),(a,n)=>{const c=me,C=ce,m=W,T=S,z=de,N=ie,D=I,k=q,A=Ve,P=G,L=H,M=J,R=O,j=Y("perms");return p(),f("div",ge,[e(M,{shadow:"never",class:"!border-none flex-1","body-style":{height:"100%"}},{default:o(()=>[l("div",ye,[l("div",he,[l("div",ve,[(p(!0),f(ee,null,te(t.list,(u,s)=>(p(),f("div",{class:"tabbar-item flex flex-col justify-center items-center flex-1",key:s,style:se({color:t.style.default_color})},[l("img",{class:"w-[22px] h-[22px]",src:u.unselected,alt:""},null,8,Ee),l("div",Ce,ne(u.name),1)],4))),128))])]),l("div",De,[ke,e(L,{class:"mt-4","label-width":"70px"},{default:o(()=>[e(P,{"model-value":"content"},{default:o(()=>[e(k,{label:"\u5BFC\u822A\u56FE\u7247",name:"content"},{default:o(()=>{var u;return[l("div",Ae,[e(y(be),{class:"draggable",modelValue:t.list,"onUpdate:modelValue":n[0]||(n[0]=s=>t.list=s),animation:"300",draggable:".draggable",move:_},{item:o(({element:s,index:B})=>[e(N,{onClose:r=>V(B),class:oe(["max-w-[400px]",{draggable:B!=0}])},{default:o(()=>[l("div",Be,[e(m,{label:"\u5BFC\u822A\u56FE\u6807"},{default:o(()=>[e(C,{modelValue:s.unselected,"onUpdate:modelValue":r=>s.unselected=r,"upload-class":"bg-body",size:"60px"},{upload:o(()=>[l("div",we,[e(c,{name:"el-icon-Plus",size:16}),Ue])]),_:2},1032,["modelValue","onUpdate:modelValue"]),e(C,{modelValue:s.selected,"onUpdate:modelValue":r=>s.selected=r,"upload-class":"bg-body",size:"60px"},{upload:o(()=>[l("div",$e,[e(c,{name:"el-icon-Plus",size:16}),Se])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),e(m,{label:"\u5BFC\u822A\u540D\u79F0"},{default:o(()=>[e(T,{modelValue:s.name,"onUpdate:modelValue":r=>s.name=r,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e(m,{label:"\u94FE\u63A5\u5730\u5740"},{default:o(()=>[e(z,{modelValue:s.link,"onUpdate:modelValue":r=>s.link=r},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)])]),_:2},1032,["onClose","class"])]),_:1},8,["modelValue"])]),((u=t.list)==null?void 0:u.length)<5?(p(),U(m,{key:0,"label-width":"0"},{default:o(()=>[e(D,{type:"primary",onClick:F},{default:o(()=>[Ie]),_:1})]),_:1})):le("",!0)]}),_:1}),e(k,{label:"\u6837\u5F0F\u8BBE\u7F6E",name:"styles"},{default:o(()=>[e(m,{label:"\u9ED8\u8BA4\u989C\u8272"},{default:o(()=>[e(A,{class:"max-w-[400px]",modelValue:t.style.default_color,"onUpdate:modelValue":n[1]||(n[1]=u=>t.style.default_color=u),"default-color":"#999999"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u9009\u4E2D\u989C\u8272"},{default:o(()=>[e(A,{class:"max-w-[400px]",modelValue:t.style.selected_color,"onUpdate:modelValue":n[2]||(n[2]=u=>t.style.selected_color=u),"default-color":"#4173ff"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1})])])]),_:1}),Z((p(),U(R,{class:"mt-4",fixed:!1},{default:o(()=>[e(D,{type:"primary",onClick:g},{default:o(()=>[Te]),_:1})]),_:1})),[[j,["decorate:tabbar:save"]]])])}}});const $t=pe(Ne,[["__scopeId","data-v-11220d71"]]);export{$t as default};