邹方成 2a89a1ab9d
Some checks failed
Build docker and publish / linux (1.24.5) (push) Failing after 39s
feat(admin): 更新前端资源文件及修复相关功能
refactor(service): 修改banner和guild删除逻辑为软删除
fix(service): 修复删除操作使用软删除而非物理删除

build: 添加SQLite测试仓库实现
docs: 新增奖励管理字段拆分和批量抽奖UI改造文档

ci: 更新CI忽略文件
style: 清理无用资源文件
2025-11-19 01:35:55 +08:00

2 lines
2.5 KiB
JavaScript

import{d as e,a2 as l,X as a,c as t,a9 as s,j as r,a as n,U as i,af as u,b4 as o,p as c,l as p,bQ as f,cl as d,bu as y,aa as v,ak as h,ap as m}from"./index-CZ0Lvzl5.js";import{P as S,i as g,a as x}from"./vnode-C4RX5enz.js";const b=e({name:"ElSpaceItem",props:l({prefixCls:{type:String}}),setup(e,{slots:l}){const n=a("space"),i=t(()=>`${e.prefixCls||n.b()}__item`);return()=>s("div",{class:i.value},r(l,"default"))}}),E={small:8,default:12,large:16};const C=m(e({name:"ElSpace",props:l({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:h([String,Object,Array]),default:""},style:{type:h([String,Array,Object]),default:""},alignment:{type:h(String),default:"center"},prefixCls:{type:String},spacer:{type:h([Object,String,Number,Array]),default:null,validator:e=>f(e)||o(e)||v(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:y,validator:e=>o(e)||u(e)&&2===e.length&&e.every(o)}}),setup(e,{slots:l}){const{classes:s,containerStyle:y,itemStyle:v}=function(e){const l=a("space"),s=t(()=>[l.b(),l.m(e.direction),e.class]),r=n(0),c=n(0),p=t(()=>[e.wrap||e.fill?{flexWrap:"wrap"}:{},{alignItems:e.alignment},{rowGap:`${c.value}px`,columnGap:`${r.value}px`},e.style]),f=t(()=>e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{});return i(()=>{const{size:l="small",wrap:a,direction:t,fill:s}=e;if(u(l)){const[e=0,a=0]=l;r.value=e,c.value=a}else{let e;e=o(l)?l:E[l||"small"]||E.small,(a||s)&&"horizontal"===t?r.value=c.value=e:"horizontal"===t?(r.value=e,c.value=0):(c.value=e,r.value=0)}}),{classes:s,containerStyle:p,itemStyle:f}}(e);function h(l,a="",t=[]){const{prefixCls:s}=e;return l.forEach((e,l)=>{g(e)?u(e.children)&&e.children.forEach((e,l)=>{g(e)&&u(e.children)?h(e.children,`${a+l}-`,t):f(e)&&(null==e?void 0:e.type)===d?t.push(e):t.push(c(b,{style:v.value,prefixCls:s,key:`nested-${a+l}`},{default:()=>[e]},S.PROPS|S.STYLE,["style","prefixCls"]))}):x(e)&&t.push(c(b,{style:v.value,prefixCls:s,key:`LoopKey${a+l}`},{default:()=>[e]},S.PROPS|S.STYLE,["style","prefixCls"]))}),t}return()=>{var a;const{spacer:t,direction:n}=e,i=r(l,"default",{key:0},()=>[]);if(0===(null!=(a=i.children)?a:[]).length)return null;if(u(i.children)){let e=h(i.children);if(t){const l=e.length-1;e=e.reduce((e,a,s)=>{const r=[...e,a];return s!==l&&r.push(c("span",{style:[v.value,"vertical"===n?"width: 100%":null],key:s},[f(t)?t:p(t,S.TEXT)],S.STYLE)),r},[])}return c("div",{class:s.value,style:y.value},e,S.STYLE|S.CLASS)}return i.children}}}));export{C as E};