rhjy-ui 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),I=require("../_plugin-vue_export-helper-f246444f.cjs");const H={class:"rh-data-center-panel__state"},S=e.defineComponent({__name:"RhDataCenterState",props:{text:{},retryable:{type:Boolean,default:!1}},emits:["retry"],setup(t,{emit:p}){const o=p;return(s,d)=>(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("span",null,e.toDisplayString(t.text),1),t.retryable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"rh-data-center-panel__retry",onClick:d[0]||(d[0]=c=>o("retry"))}," 重新加载 ")):e.createCommentVNode("",!0)]))}}),M={class:"rh-data-center-panel__task"},O={class:"rh-data-center-panel__taskMain"},F={class:"rh-data-center-panel__taskTitle"},U={key:0,class:"rh-data-center-panel__taskTag"},K={key:0,class:"rh-data-center-panel__progress"},q={class:"rh-data-center-panel__meta"},G={key:0,class:"rh-data-center-panel__actions"},W=["disabled","onClick"],j=e.defineComponent({__name:"RhDataCenterTaskItem",props:{task:{}},emits:["action"],setup(t,{emit:p}){const o=t,s=p,d=e.computed(()=>{const c=Number(o.task.progress||0);return Math.min(100,Math.max(0,c))});return(c,k)=>{var f;return e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",O,[e.createElementVNode("div",F,[e.createElementVNode("span",null,e.toDisplayString(t.task.title),1),t.task.tag?(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(t.task.tag),1)):e.createCommentVNode("",!0)]),t.task.status!=="success"?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",{class:e.normalizeClass(["rh-data-center-panel__progressBar",{"is-failed":t.task.status==="failed"}]),style:e.normalizeStyle({width:`${d.value}%`})},null,6)])):e.createCommentVNode("",!0),e.createElementVNode("div",q,e.toDisplayString(t.task.createdAt),1),t.task.message?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rh-data-center-panel__message",{"is-failed":t.task.status==="failed"}])},e.toDisplayString(t.task.message),3)):e.createCommentVNode("",!0)]),(f=t.task.actions)!=null&&f.length?(e.openBlock(),e.createElementBlock("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.task.actions,y=>(e.openBlock(),e.createElementBlock("button",{key:y.key,type:"button",class:"rh-data-center-panel__action",disabled:y.disabled,onClick:g=>s("action",y.key)},e.toDisplayString(y.label),9,W))),128))])):e.createCommentVNode("",!0)])}}}),X="数据处理中心",Y=606,J=500,Q=1e3,Z="-此处仅展示近15天内的数据-",ee={class:"rh-data-center-panel"},te={class:"rh-data-center-panel__sidebar"},oe=["onClick"],ne={key:0,class:"rh-data-center-panel__categoryCount"},ae={class:"rh-data-center-panel__main"},re={class:"rh-data-center-panel__title"},le={class:"rh-data-center-panel__scroll"},se={key:0,class:"rh-data-center-panel__footer"},L=e.defineComponent({__name:"RhDataCenterPanel",props:{categories:{},loadTasks:{},activeCategoryKey:{default:void 0},closeable:{type:Boolean,default:!0},showTotal:{type:Boolean,default:!0},showCategoryCount:{type:Boolean,default:!0},categoryCounts:{},recentDaysText:{default:Z}},emits:["close","refresh","task-action","error"],setup(t,{expose:p,emit:o}){const s=t,d=o,c=e.ref(s.activeCategoryKey),k=e.ref({}),f=e.ref({}),y=e.ref({}),g=e.ref({}),_=e.ref({}),u=e.computed(()=>s.categories.find(l=>l.key===c.value)||s.categories[0]),E=e.computed(()=>{var l;return String(((l=u.value)==null?void 0:l.key)??"")}),C=e.computed(()=>k.value[E.value]),R=e.computed(()=>f.value[E.value]===!0),B=e.computed(()=>y.value[E.value]),D=l=>{var n,h,T;if(!s.showCategoryCount)return;const i=String(l.key),a=(n=s.categoryCounts)==null?void 0:n[i];if(a!==void 0)return a;for(const r of Object.values(k.value)){const v=(h=r.counts)==null?void 0:h[i];if(v!==void 0)return v}return(T=k.value[i])==null?void 0:T.total},V=async(l=!1)=>{const i=u.value;if(!i)return;const a=String(i.key);if(_.value[a]&&!l)return;_.value[a]=!0,f.value[a]=!0,y.value[a]=void 0;const n=(g.value[a]||0)+1;g.value[a]=n,d("refresh",i);try{const h=await s.loadTasks({category:i});if(g.value[a]!==n||E.value!==a)return;k.value[a]=h}catch(h){if(g.value[a]!==n||E.value!==a)return;y.value[a]=h,d("error",h,i)}finally{g.value[a]===n&&(f.value[a]=!1,_.value[a]=!1)}},w=async l=>{c.value!==l.key&&(c.value=l.key,await V())},N=(l,i)=>{const a=u.value;a&&d("task-action",{action:l,task:i,category:a})};return e.onMounted(()=>{var l;c.value===void 0&&(c.value=(l=s.categories[0])==null?void 0:l.key)}),p({refresh:V}),(l,i)=>{var a;return e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("aside",te,[i[1]||(i[1]=e.createElementVNode("div",{class:"rh-data-center-panel__title"},"数据类型",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.categories,n=>(e.openBlock(),e.createElementBlock("button",{key:n.key,type:"button",class:e.normalizeClass(["rh-data-center-panel__category",{"is-active":c.value===n.key}]),onClick:h=>w(n)},[e.createElementVNode("span",null,e.toDisplayString(n.label),1),D(n)!==void 0?(e.openBlock(),e.createElementBlock("span",ne,e.toDisplayString(D(n)),1)):e.createCommentVNode("",!0)],10,oe))),128))]),e.createElementVNode("section",ae,[e.createElementVNode("div",re,[e.renderSlot(l.$slots,"header",{category:u.value},()=>[i[2]||(i[2]=e.createTextVNode("数据处理进度",-1))]),t.closeable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"rh-data-center-panel__action",onClick:i[0]||(i[0]=n=>d("close"))},"关闭")):e.createCommentVNode("",!0)]),e.createElementVNode("div",le,[R.value&&!C.value?(e.openBlock(),e.createBlock(S,{key:0,text:"加载中..."})):B.value&&!C.value?e.renderSlot(l.$slots,"error",{key:1,error:B.value,retry:V},()=>[e.createVNode(S,{text:"任务加载失败",retryable:!0,onRetry:V})]):(a=C.value)!=null&&a.items.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(C.value.items,n=>e.renderSlot(l.$slots,"task",{key:n.id,task:n,category:u.value,action:N},()=>[e.createVNode(j,{task:n,onAction:h=>N(h,n)},null,8,["task","onAction"])])),128)):e.renderSlot(l.$slots,"empty",{key:3,category:u.value},()=>[e.createVNode(S,{text:"暂无任务"})])]),e.renderSlot(l.$slots,"footer",{result:C.value,category:u.value},()=>{var n;return[t.showTotal?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("span",null,e.toDisplayString(((n=C.value)==null?void 0:n.total)||0)+"条记录",1),e.createElementVNode("span",null,e.toDisplayString(t.recentDaysText),1)])):e.createCommentVNode("",!0)]})])])}}}),ie=t=>typeof t=="function"?t():t.value,ce=(t,p)=>{const o=s=>{const d=s.target;if(!d)return;t.some(k=>{var f;return(f=ie(k))==null?void 0:f.contains(d)})||p()};e.onMounted(()=>document.addEventListener("click",o,!0)),e.onBeforeUnmount(()=>document.removeEventListener("click",o,!0))},de=["src"],ue=e.defineComponent({__name:"RhDataCenter",props:{modelValue:{type:Boolean,default:void 0},categories:{},loadTasks:{},label:{default:X},width:{default:Y},panelHeight:{default:J},panelRight:{default:0},pollInterval:{default:Q},refreshOnOpen:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0},showCategoryCount:{type:Boolean,default:!0},categoryCounts:{},icon:{default:""},activeIcon:{default:""}},emits:["update:modelValue","open","close","refresh","task-action","error"],setup(t,{emit:p}){const o=t,s=p,d=e.ref(!1),c=e.ref(null),k=e.ref(null),f=e.ref(null),y=e.ref({}),g=e.ref(),_=e.ref(!1),u=e.computed(()=>o.modelValue===void 0?d.value:o.modelValue),E=e.computed(()=>u.value?o.activeIcon||o.icon:o.icon||o.activeIcon),C=r=>typeof r=="number"?`${r}px`:r,R=r=>typeof r=="number"?r:Number.parseFloat(r)||0,B=()=>{const r=c.value,v=k.value;if(!r||!v)return;const m=r.getBoundingClientRect(),$=v.offsetWidth||R(o.width),x=R(o.panelRight),b=8,A=m.right-$-x,P=Math.min(Math.max(b,A),Math.max(b,window.innerWidth-$-b)),z=Math.min(m.bottom+8,Math.max(b,window.innerHeight-v.offsetHeight-b));y.value={top:`${z}px`,left:`${P}px`,width:C(o.width),"--rh-ui-data-center-panel-height":C(o.panelHeight)}},D=()=>{_.value||(_.value=!0,window.addEventListener("resize",B),window.addEventListener("scroll",B,!0))},V=()=>{_.value&&(_.value=!1,window.removeEventListener("resize",B),window.removeEventListener("scroll",B,!0))},w=()=>{g.value!==void 0&&(window.clearInterval(g.value),g.value=void 0)},N=()=>{var r;(r=f.value)==null||r.refresh()},l=()=>{w(),!(!u.value||o.pollInterval<=0)&&(g.value=window.setInterval(N,o.pollInterval))},i=r=>{o.modelValue===void 0&&(d.value=r),s("update:modelValue",r)},a=()=>{u.value||(i(!0),s("open"))},n=()=>{u.value&&(i(!1),s("close"))},h=()=>u.value?n():a(),T=()=>{if(document.visibilityState==="hidden"){w();return}l(),N()};return e.watch(u,async r=>{if(w(),V(),!r){document.removeEventListener("visibilitychange",T);return}await e.nextTick(),B(),D(),document.addEventListener("visibilitychange",T),o.refreshOnOpen&&N(),l()},{immediate:!0}),ce([c,k],()=>{o.closeOnClickOutside&&u.value&&n()}),e.onBeforeUnmount(()=>{w(),V(),document.removeEventListener("visibilitychange",T)}),(r,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"triggerRef",ref:c,class:"rh-data-center",onClick:e.withModifiers(h,["stop"])},[e.renderSlot(r.$slots,"trigger",{visible:u.value,open:a,close:n,toggle:h},()=>[e.createElementVNode("span",{class:e.normalizeClass(["rh-data-center__trigger",{"is-active":u.value}])},[E.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:E.value,class:"rh-data-center__icon",alt:""},null,8,de)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1)],2)],!0)],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contentRef",ref:k,class:"rh-data-center__popover",style:e.normalizeStyle(y.value),onClick:v[3]||(v[3]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(L,{ref_key:"panelRef",ref:f,categories:t.categories,"load-tasks":t.loadTasks,closeable:!0,"show-category-count":t.showCategoryCount,"category-counts":t.categoryCounts,onClose:n,onRefresh:v[0]||(v[0]=m=>s("refresh",m)),onTaskAction:v[1]||(v[1]=m=>s("task-action",m)),onError:v[2]||(v[2]=(m,$)=>s("error",m,$))},{header:e.withCtx(m=>[e.renderSlot(r.$slots,"header",e.normalizeProps(e.guardReactiveProps(m)),()=>[v[4]||(v[4]=e.createTextVNode("数据处理进度",-1))],!0)]),task:e.withCtx(m=>[e.renderSlot(r.$slots,"task",e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)]),empty:e.withCtx(m=>[e.renderSlot(r.$slots,"empty",e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)]),error:e.withCtx(m=>[e.renderSlot(r.$slots,"error",e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)]),footer:e.withCtx(m=>[e.renderSlot(r.$slots,"footer",e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)]),_:3},8,["categories","load-tasks","show-category-count","category-counts"])],4)):e.createCommentVNode("",!0)]))],64))}});const me=I._export_sfc(ue,[["__scopeId","data-v-a3a35657"]]),ve={key:0,class:"rh-data-center-tip__guide"},pe={class:"rh-data-center-tip__content"},fe={key:0,class:"rh-data-center-tip__minutes"},ke={key:1,class:"rh-data-center-tip__description"},ye=e.defineComponent({__name:"RhDataCenterTip",props:{modelValue:{type:Boolean,default:!1},minutes:{default:void 0},type:{default:void 0},title:{default:""},content:{default:""},width:{default:"540px"},showGuideAnimation:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(t,{emit:p}){const o=p,s=()=>{o("update:modelValue",!1),o("close")};return(d,c)=>{const k=e.resolveComponent("el-button"),f=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(f,{"model-value":t.modelValue,title:t.title||"提示",width:t.width,"append-to-body":"","onUpdate:modelValue":c[0]||(c[0]=y=>o("update:modelValue",y)),onClose:s},{footer:e.withCtx(()=>[e.createVNode(k,{type:"primary",onClick:s},{default:e.withCtx(()=>[...c[1]||(c[1]=[e.createTextVNode("关闭弹框",-1)])]),_:1})]),default:e.withCtx(()=>[t.showGuideAnimation?(e.openBlock(),e.createElementBlock("div",ve)):e.createCommentVNode("",!0),e.createElementVNode("div",pe,[t.minutes!==void 0?(e.openBlock(),e.createElementBlock("span",fe,e.toDisplayString((t.title||"任务处理中,大概需要")+t.minutes+"分钟"),1)):e.createCommentVNode("",!0),t.content?(e.openBlock(),e.createElementBlock("div",ke,e.toDisplayString(t.content),1)):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"extra")])]),_:3},8,["model-value","title","width"])}}}),he=()=>{const t=e.ref(!1),p=e.ref({});return{tipVisible:t,tipConfig:p,showTip:d=>{p.value={...d},t.value=!0},closeTip:()=>{t.value=!1}}};exports.RhDataCenter=me;exports.RhDataCenterPanel=L;exports.RhDataCenterTip=ye;exports.useRhDataCenter=he;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),I=require("../_plugin-vue_export-helper-f246444f.cjs");const M={class:"rh-data-center-panel__state"},S=e.defineComponent({__name:"RhDataCenterState",props:{text:{},retryable:{type:Boolean,default:!1}},emits:["retry"],setup(t,{emit:f}){const n=f;return(s,d)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("span",null,e.toDisplayString(t.text),1),t.retryable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"rh-data-center-panel__retry",onClick:d[0]||(d[0]=i=>n("retry"))}," 重新加载 ")):e.createCommentVNode("",!0)]))}}),H={class:"rh-data-center-panel__task"},O={class:"rh-data-center-panel__taskMain"},K={class:"rh-data-center-panel__taskTitle"},F={key:0,class:"rh-data-center-panel__taskTag"},U={key:0,class:"rh-data-center-panel__progress"},q={class:"rh-data-center-panel__meta"},G={key:0,class:"rh-data-center-panel__actions"},W=["disabled","onClick"],j=e.defineComponent({__name:"RhDataCenterTaskItem",props:{task:{}},emits:["action"],setup(t,{emit:f}){const n=t,s=f,d=e.computed(()=>{const i=Number(n.task.progress||0);return Math.min(100,Math.max(0,i))});return(i,y)=>{var k;return e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("div",O,[e.createElementVNode("div",K,[e.createElementVNode("span",null,e.toDisplayString(t.task.title),1),t.task.tag?(e.openBlock(),e.createElementBlock("span",F,e.toDisplayString(t.task.tag),1)):e.createCommentVNode("",!0)]),t.task.status!=="success"?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",{class:e.normalizeClass(["rh-data-center-panel__progressBar",{"is-failed":t.task.status==="failed"}]),style:e.normalizeStyle({width:`${d.value}%`})},null,6)])):e.createCommentVNode("",!0),e.createElementVNode("div",q,e.toDisplayString(t.task.createdAt),1),t.task.message?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rh-data-center-panel__message",{"is-failed":t.task.status==="failed"}])},e.toDisplayString(t.task.message),3)):e.createCommentVNode("",!0)]),(k=t.task.actions)!=null&&k.length?(e.openBlock(),e.createElementBlock("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.task.actions,h=>(e.openBlock(),e.createElementBlock("button",{key:h.key,type:"button",class:"rh-data-center-panel__action",disabled:h.disabled,onClick:g=>s("action",h.key)},e.toDisplayString(h.label),9,W))),128))])):e.createCommentVNode("",!0)])}}}),X="数据处理中心",Y=606,J=500,Q=1e3,Z="-此处仅展示近15天内的数据-",ee={class:"rh-data-center-panel"},te={class:"rh-data-center-panel__sidebar"},oe=["aria-pressed","onClick","onKeydown"],ne={key:0,class:"rh-data-center-panel__categoryCount"},ae={class:"rh-data-center-panel__main"},re={class:"rh-data-center-panel__title"},le={class:"rh-data-center-panel__scroll"},se={key:0,class:"rh-data-center-panel__footer"},x=e.defineComponent({__name:"RhDataCenterPanel",props:{categories:{},loadTasks:{},activeCategoryKey:{default:void 0},closeable:{type:Boolean,default:!0},showTotal:{type:Boolean,default:!0},showCategoryCount:{type:Boolean,default:!0},categoryCounts:{},recentDaysText:{default:Z}},emits:["close","refresh","task-action","error"],setup(t,{expose:f,emit:n}){const s=t,d=n,i=e.ref(s.activeCategoryKey),y=e.ref({}),k=e.ref({}),h=e.ref({}),g=e.ref({}),_=e.ref({}),u=e.computed(()=>s.categories.find(l=>l.key===i.value)||s.categories[0]),E=e.computed(()=>{var l;return String(((l=u.value)==null?void 0:l.key)??"")}),C=e.computed(()=>y.value[E.value]),R=e.computed(()=>k.value[E.value]===!0),B=e.computed(()=>h.value[E.value]),$=l=>{var o,p,T;if(!s.showCategoryCount)return;const c=String(l.key),a=(o=s.categoryCounts)==null?void 0:o[c];if(a!==void 0)return a;for(const r of Object.values(y.value)){const v=(p=r.counts)==null?void 0:p[c];if(v!==void 0)return v}return(T=y.value[c])==null?void 0:T.total},V=async(l=!1)=>{const c=u.value;if(!c)return;const a=String(c.key);if(_.value[a]&&!l)return;_.value[a]=!0,k.value[a]=!0,h.value[a]=void 0;const o=(g.value[a]||0)+1;g.value[a]=o,d("refresh",c);try{const p=await s.loadTasks({category:c});if(g.value[a]!==o||E.value!==a)return;y.value[a]=p}catch(p){if(g.value[a]!==o||E.value!==a)return;h.value[a]=p,d("error",p,c)}finally{g.value[a]===o&&(k.value[a]=!1,_.value[a]=!1)}},w=async l=>{i.value!==l.key&&(i.value=l.key,await V())},N=(l,c)=>{const a=u.value;a&&d("task-action",{action:l,task:c,category:a})};return e.onMounted(()=>{var l;i.value===void 0&&(i.value=(l=s.categories[0])==null?void 0:l.key)}),f({refresh:V}),(l,c)=>{var a;return e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("aside",te,[c[1]||(c[1]=e.createElementVNode("div",{class:"rh-data-center-panel__title"},"数据类型",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.categories,o=>(e.openBlock(),e.createElementBlock("div",{key:o.key,role:"button",tabindex:"0",class:e.normalizeClass(["rh-data-center-panel__category",{"is-active":i.value===o.key}]),"aria-pressed":i.value===o.key,onClick:p=>w(o),onKeydown:[e.withKeys(p=>w(o),["enter"]),e.withKeys(e.withModifiers(p=>w(o),["prevent"]),["space"])]},[e.createElementVNode("span",null,e.toDisplayString(o.label),1),$(o)!==void 0?(e.openBlock(),e.createElementBlock("span",ne,e.toDisplayString($(o)),1)):e.createCommentVNode("",!0)],42,oe))),128))]),e.createElementVNode("section",ae,[e.createElementVNode("div",re,[e.renderSlot(l.$slots,"header",{category:u.value},()=>[c[2]||(c[2]=e.createTextVNode("数据处理进度",-1))]),t.closeable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"rh-data-center-panel__action",onClick:c[0]||(c[0]=o=>d("close"))},"关闭")):e.createCommentVNode("",!0)]),e.createElementVNode("div",le,[R.value&&!C.value?(e.openBlock(),e.createBlock(S,{key:0,text:"加载中..."})):B.value&&!C.value?e.renderSlot(l.$slots,"error",{key:1,error:B.value,retry:V},()=>[e.createVNode(S,{text:"任务加载失败",retryable:!0,onRetry:V})]):(a=C.value)!=null&&a.items.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(C.value.items,o=>e.renderSlot(l.$slots,"task",{key:o.id,task:o,category:u.value,action:N},()=>[e.createVNode(j,{task:o,onAction:p=>N(p,o)},null,8,["task","onAction"])])),128)):e.renderSlot(l.$slots,"empty",{key:3,category:u.value},()=>[e.createVNode(S,{text:"暂无任务"})])]),e.renderSlot(l.$slots,"footer",{result:C.value,category:u.value},()=>{var o;return[t.showTotal?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("span",null,e.toDisplayString(((o=C.value)==null?void 0:o.total)||0)+"条记录",1),e.createElementVNode("span",null,e.toDisplayString(t.recentDaysText),1)])):e.createCommentVNode("",!0)]})])])}}}),ie=t=>typeof t=="function"?t():t.value,ce=(t,f)=>{const n=s=>{const d=s.target;if(!d)return;t.some(y=>{var k;return(k=ie(y))==null?void 0:k.contains(d)})||f()};e.onMounted(()=>document.addEventListener("click",n,!0)),e.onBeforeUnmount(()=>document.removeEventListener("click",n,!0))},de=["src"],ue=e.defineComponent({__name:"RhDataCenter",props:{modelValue:{type:Boolean,default:void 0},categories:{},loadTasks:{},label:{default:X},width:{default:Y},panelHeight:{default:J},panelRight:{default:0},pollInterval:{default:Q},refreshOnOpen:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0},showCategoryCount:{type:Boolean,default:!0},categoryCounts:{},icon:{default:""},activeIcon:{default:""}},emits:["update:modelValue","open","close","refresh","task-action","error"],setup(t,{emit:f}){const n=t,s=f,d=e.ref(!1),i=e.ref(null),y=e.ref(null),k=e.ref(null),h=e.ref({}),g=e.ref(),_=e.ref(!1),u=e.computed(()=>n.modelValue===void 0?d.value:n.modelValue),E=e.computed(()=>u.value?n.activeIcon||n.icon:n.icon||n.activeIcon),C=r=>typeof r=="number"?`${r}px`:r,R=r=>typeof r=="number"?r:Number.parseFloat(r)||0,B=()=>{const r=i.value,v=y.value;if(!r||!v)return;const m=r.getBoundingClientRect(),D=v.offsetWidth||R(n.width),L=R(n.panelRight),b=8,A=m.right-D-L,P=Math.min(Math.max(b,A),Math.max(b,window.innerWidth-D-b)),z=Math.min(m.bottom+8,Math.max(b,window.innerHeight-v.offsetHeight-b));h.value={top:`${z}px`,left:`${P}px`,width:C(n.width),"--rh-ui-data-center-panel-height":C(n.panelHeight)}},$=()=>{_.value||(_.value=!0,window.addEventListener("resize",B),window.addEventListener("scroll",B,!0))},V=()=>{_.value&&(_.value=!1,window.removeEventListener("resize",B),window.removeEventListener("scroll",B,!0))},w=()=>{g.value!==void 0&&(window.clearInterval(g.value),g.value=void 0)},N=()=>{var r;(r=k.value)==null||r.refresh()},l=()=>{w(),!(!u.value||n.pollInterval<=0)&&(g.value=window.setInterval(N,n.pollInterval))},c=r=>{n.modelValue===void 0&&(d.value=r),s("update:modelValue",r)},a=()=>{u.value||(c(!0),s("open"))},o=()=>{u.value&&(c(!1),s("close"))},p=()=>u.value?o():a(),T=()=>{if(document.visibilityState==="hidden"){w();return}l(),N()};return e.watch(u,async r=>{if(w(),V(),!r){document.removeEventListener("visibilitychange",T);return}await e.nextTick(),B(),$(),document.addEventListener("visibilitychange",T),n.refreshOnOpen&&N(),l()},{immediate:!0}),ce([i,y],()=>{n.closeOnClickOutside&&u.value&&o()}),e.onBeforeUnmount(()=>{w(),V(),document.removeEventListener("visibilitychange",T)}),(r,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"triggerRef",ref:i,class:"rh-data-center",onClick:e.withModifiers(p,["stop"])},[e.renderSlot(r.$slots,"trigger",{visible:u.value,open:a,close:o,toggle:p},()=>[e.createElementVNode("span",{class:e.normalizeClass(["rh-data-center__trigger",{"is-active":u.value}])},[E.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:E.value,class:"rh-data-center__icon",alt:""},null,8,de)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1)],2)],!0)],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contentRef",ref:y,class:"rh-data-center__popover",style:e.normalizeStyle(h.value),onClick:v[3]||(v[3]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(x,{ref_key:"panelRef",ref:k,categories:t.categories,"load-tasks":t.loadTasks,closeable:!0,"show-category-count":t.showCategoryCount,"category-counts":t.categoryCounts,onClose:o,onRefresh:v[0]||(v[0]=m=>s("refresh",m)),onTaskAction:v[1]||(v[1]=m=>s("task-action",m)),onError:v[2]||(v[2]=(m,D)=>s("error",m,D))},{header:e.withCtx(m=>[e.renderSlot(r.$slots,"header",e.normalizeProps(e.guardReactiveProps(m)),()=>[v[4]||(v[4]=e.createTextVNode("数据处理进度",-1))],!0)]),task:e.withCtx(m=>[e.renderSlot(r.$slots,"task",e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)]),empty:e.withCtx(m=>[e.renderSlot(r.$slots,"empty",e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)]),error:e.withCtx(m=>[e.renderSlot(r.$slots,"error",e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)]),footer:e.withCtx(m=>[e.renderSlot(r.$slots,"footer",e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)]),_:3},8,["categories","load-tasks","show-category-count","category-counts"])],4)):e.createCommentVNode("",!0)]))],64))}});const me=I._export_sfc(ue,[["__scopeId","data-v-a3a35657"]]),ve={key:0,class:"rh-data-center-tip__guide"},pe={class:"rh-data-center-tip__content"},fe={key:0,class:"rh-data-center-tip__minutes"},ke={key:1,class:"rh-data-center-tip__description"},ye=e.defineComponent({__name:"RhDataCenterTip",props:{modelValue:{type:Boolean,default:!1},minutes:{default:void 0},type:{default:void 0},title:{default:""},content:{default:""},width:{default:"540px"},showGuideAnimation:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(t,{emit:f}){const n=f,s=()=>{n("update:modelValue",!1),n("close")};return(d,i)=>{const y=e.resolveComponent("el-button"),k=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(k,{"model-value":t.modelValue,title:t.title||"提示",width:t.width,"append-to-body":"","onUpdate:modelValue":i[0]||(i[0]=h=>n("update:modelValue",h)),onClose:s},{footer:e.withCtx(()=>[e.createVNode(y,{type:"primary",onClick:s},{default:e.withCtx(()=>[...i[1]||(i[1]=[e.createTextVNode("关闭弹框",-1)])]),_:1})]),default:e.withCtx(()=>[t.showGuideAnimation?(e.openBlock(),e.createElementBlock("div",ve)):e.createCommentVNode("",!0),e.createElementVNode("div",pe,[t.minutes!==void 0?(e.openBlock(),e.createElementBlock("span",fe,e.toDisplayString((t.title||"任务处理中,大概需要")+t.minutes+"分钟"),1)):e.createCommentVNode("",!0),t.content?(e.openBlock(),e.createElementBlock("div",ke,e.toDisplayString(t.content),1)):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"extra")])]),_:3},8,["model-value","title","width"])}}}),he=()=>{const t=e.ref(!1),f=e.ref({});return{tipVisible:t,tipConfig:f,showTip:d=>{f.value={...d},t.value=!0},closeTip:()=>{t.value=!1}}};exports.RhDataCenter=me;exports.RhDataCenterPanel=x;exports.RhDataCenterTip=ye;exports.useRhDataCenter=he;
@@ -1,5 +1,5 @@
1
- import { defineComponent as M, openBlock as l, createElementBlock as i, createElementVNode as y, toDisplayString as w, createCommentVNode as b, computed as L, normalizeClass as U, normalizeStyle as Q, Fragment as G, renderList as j, ref as m, onMounted as Z, renderSlot as T, createTextVNode as q, createBlock as X, createVNode as S, onBeforeUnmount as ee, watch as se, nextTick as le, withModifiers as Y, Teleport as re, withCtx as V, normalizeProps as H, guardReactiveProps as O, resolveComponent as J } from "vue";
2
- import { _ as ie } from "../_plugin-vue_export-helper-dad06003.js";
1
+ import { defineComponent as M, openBlock as l, createElementBlock as i, createElementVNode as y, toDisplayString as w, createCommentVNode as b, computed as V, normalizeClass as U, normalizeStyle as Z, Fragment as G, renderList as j, ref as p, onMounted as ee, withKeys as J, withModifiers as q, renderSlot as T, createTextVNode as X, createBlock as Y, createVNode as S, onBeforeUnmount as te, watch as le, nextTick as re, Teleport as ie, withCtx as x, normalizeProps as H, guardReactiveProps as O, resolveComponent as Q } from "vue";
2
+ import { _ as ue } from "../_plugin-vue_export-helper-dad06003.js";
3
3
  const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
4
4
  __name: "RhDataCenterState",
5
5
  props: {
@@ -7,74 +7,74 @@ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
7
7
  retryable: { type: Boolean, default: !1 }
8
8
  },
9
9
  emits: ["retry"],
10
- setup(e, { emit: p }) {
11
- const t = p;
10
+ setup(e, { emit: g }) {
11
+ const a = g;
12
12
  return (r, d) => (l(), i("div", ce, [
13
13
  y("span", null, w(e.text), 1),
14
14
  e.retryable ? (l(), i("button", {
15
15
  key: 0,
16
16
  type: "button",
17
17
  class: "rh-data-center-panel__retry",
18
- onClick: d[0] || (d[0] = (u) => t("retry"))
18
+ onClick: d[0] || (d[0] = (u) => a("retry"))
19
19
  }, " 重新加载 ")) : b("", !0)
20
20
  ]));
21
21
  }
22
- }), ue = { class: "rh-data-center-panel__task" }, de = { class: "rh-data-center-panel__taskMain" }, ve = { class: "rh-data-center-panel__taskTitle" }, fe = {
22
+ }), de = { class: "rh-data-center-panel__task" }, ve = { class: "rh-data-center-panel__taskMain" }, fe = { class: "rh-data-center-panel__taskTitle" }, ye = {
23
23
  key: 0,
24
24
  class: "rh-data-center-panel__taskTag"
25
- }, ye = {
25
+ }, he = {
26
26
  key: 0,
27
27
  class: "rh-data-center-panel__progress"
28
- }, he = { class: "rh-data-center-panel__meta" }, me = {
28
+ }, me = { class: "rh-data-center-panel__meta" }, pe = {
29
29
  key: 0,
30
30
  class: "rh-data-center-panel__actions"
31
- }, pe = ["disabled", "onClick"], ge = /* @__PURE__ */ M({
31
+ }, ge = ["disabled", "onClick"], ke = /* @__PURE__ */ M({
32
32
  __name: "RhDataCenterTaskItem",
33
33
  props: {
34
34
  task: {}
35
35
  },
36
36
  emits: ["action"],
37
- setup(e, { emit: p }) {
38
- const t = e, r = p, d = L(() => {
39
- const u = Number(t.task.progress || 0);
37
+ setup(e, { emit: g }) {
38
+ const a = e, r = g, d = V(() => {
39
+ const u = Number(a.task.progress || 0);
40
40
  return Math.min(100, Math.max(0, u));
41
41
  });
42
- return (u, k) => {
43
- var g;
44
- return l(), i("div", ue, [
45
- y("div", de, [
46
- y("div", ve, [
42
+ return (u, _) => {
43
+ var k;
44
+ return l(), i("div", de, [
45
+ y("div", ve, [
46
+ y("div", fe, [
47
47
  y("span", null, w(e.task.title), 1),
48
- e.task.tag ? (l(), i("span", fe, w(e.task.tag), 1)) : b("", !0)
48
+ e.task.tag ? (l(), i("span", ye, w(e.task.tag), 1)) : b("", !0)
49
49
  ]),
50
- e.task.status !== "success" ? (l(), i("div", ye, [
50
+ e.task.status !== "success" ? (l(), i("div", he, [
51
51
  y("div", {
52
52
  class: U(["rh-data-center-panel__progressBar", { "is-failed": e.task.status === "failed" }]),
53
- style: Q({ width: `${d.value}%` })
53
+ style: Z({ width: `${d.value}%` })
54
54
  }, null, 6)
55
55
  ])) : b("", !0),
56
- y("div", he, w(e.task.createdAt), 1),
56
+ y("div", me, w(e.task.createdAt), 1),
57
57
  e.task.message ? (l(), i("div", {
58
58
  key: 1,
59
59
  class: U(["rh-data-center-panel__message", { "is-failed": e.task.status === "failed" }])
60
60
  }, w(e.task.message), 3)) : b("", !0)
61
61
  ]),
62
- (g = e.task.actions) != null && g.length ? (l(), i("div", me, [
63
- (l(!0), i(G, null, j(e.task.actions, (_) => (l(), i("button", {
64
- key: _.key,
62
+ (k = e.task.actions) != null && k.length ? (l(), i("div", pe, [
63
+ (l(!0), i(G, null, j(e.task.actions, (C) => (l(), i("button", {
64
+ key: C.key,
65
65
  type: "button",
66
66
  class: "rh-data-center-panel__action",
67
- disabled: _.disabled,
68
- onClick: ($) => r("action", _.key)
69
- }, w(_.label), 9, pe))), 128))
67
+ disabled: C.disabled,
68
+ onClick: ($) => r("action", C.key)
69
+ }, w(C.label), 9, ge))), 128))
70
70
  ])) : b("", !0)
71
71
  ]);
72
72
  };
73
73
  }
74
- }), ke = "数据处理中心", _e = 606, Ce = 500, we = 1e3, be = "-此处仅展示近15天内的数据-", Te = { class: "rh-data-center-panel" }, $e = { class: "rh-data-center-panel__sidebar" }, Re = ["onClick"], Ee = {
74
+ }), _e = "数据处理中心", Ce = 606, we = 500, be = 1e3, Te = "-此处仅展示近15天内的数据-", $e = { class: "rh-data-center-panel" }, Re = { class: "rh-data-center-panel__sidebar" }, Ee = ["aria-pressed", "onClick", "onKeydown"], Ae = {
75
75
  key: 0,
76
76
  class: "rh-data-center-panel__categoryCount"
77
- }, Ae = { class: "rh-data-center-panel__main" }, De = { class: "rh-data-center-panel__title" }, Le = { class: "rh-data-center-panel__scroll" }, Ve = {
77
+ }, De = { class: "rh-data-center-panel__main" }, Le = { class: "rh-data-center-panel__title" }, Ve = { class: "rh-data-center-panel__scroll" }, xe = {
78
78
  key: 0,
79
79
  class: "rh-data-center-panel__footer"
80
80
  }, Be = /* @__PURE__ */ M({
@@ -87,26 +87,26 @@ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
87
87
  showTotal: { type: Boolean, default: !0 },
88
88
  showCategoryCount: { type: Boolean, default: !0 },
89
89
  categoryCounts: {},
90
- recentDaysText: { default: be }
90
+ recentDaysText: { default: Te }
91
91
  },
92
92
  emits: ["close", "refresh", "task-action", "error"],
93
- setup(e, { expose: p, emit: t }) {
94
- const r = e, d = t, u = m(r.activeCategoryKey), k = m({}), g = m({}), _ = m({}), $ = m({}), E = m({}), v = L(() => r.categories.find((s) => s.key === u.value) || r.categories[0]), A = L(() => {
93
+ setup(e, { expose: g, emit: a }) {
94
+ const r = e, d = a, u = p(r.activeCategoryKey), _ = p({}), k = p({}), C = p({}), $ = p({}), E = p({}), v = V(() => r.categories.find((s) => s.key === u.value) || r.categories[0]), A = V(() => {
95
95
  var s;
96
96
  return String(((s = v.value) == null ? void 0 : s.key) ?? "");
97
- }), R = L(() => k.value[A.value]), z = L(() => g.value[A.value] === !0), D = L(() => _.value[A.value]), F = (s) => {
98
- var a, C, I;
97
+ }), R = V(() => _.value[A.value]), K = V(() => k.value[A.value] === !0), D = V(() => C.value[A.value]), z = (s) => {
98
+ var t, m, I;
99
99
  if (!r.showCategoryCount)
100
100
  return;
101
- const c = String(s.key), n = (a = r.categoryCounts) == null ? void 0 : a[c];
101
+ const c = String(s.key), n = (t = r.categoryCounts) == null ? void 0 : t[c];
102
102
  if (n !== void 0)
103
103
  return n;
104
- for (const o of Object.values(k.value)) {
105
- const h = (C = o.counts) == null ? void 0 : C[c];
104
+ for (const o of Object.values(_.value)) {
105
+ const h = (m = o.counts) == null ? void 0 : m[c];
106
106
  if (h !== void 0)
107
107
  return h;
108
108
  }
109
- return (I = k.value[c]) == null ? void 0 : I.total;
109
+ return (I = _.value[c]) == null ? void 0 : I.total;
110
110
  }, B = async (s = !1) => {
111
111
  const c = v.value;
112
112
  if (!c)
@@ -114,61 +114,67 @@ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
114
114
  const n = String(c.key);
115
115
  if (E.value[n] && !s)
116
116
  return;
117
- E.value[n] = !0, g.value[n] = !0, _.value[n] = void 0;
118
- const a = ($.value[n] || 0) + 1;
119
- $.value[n] = a, d("refresh", c);
117
+ E.value[n] = !0, k.value[n] = !0, C.value[n] = void 0;
118
+ const t = ($.value[n] || 0) + 1;
119
+ $.value[n] = t, d("refresh", c);
120
120
  try {
121
- const C = await r.loadTasks({ category: c });
122
- if ($.value[n] !== a || A.value !== n)
121
+ const m = await r.loadTasks({ category: c });
122
+ if ($.value[n] !== t || A.value !== n)
123
123
  return;
124
- k.value[n] = C;
125
- } catch (C) {
126
- if ($.value[n] !== a || A.value !== n)
124
+ _.value[n] = m;
125
+ } catch (m) {
126
+ if ($.value[n] !== t || A.value !== n)
127
127
  return;
128
- _.value[n] = C, d("error", C, c);
128
+ C.value[n] = m, d("error", m, c);
129
129
  } finally {
130
- $.value[n] === a && (g.value[n] = !1, E.value[n] = !1);
130
+ $.value[n] === t && (k.value[n] = !1, E.value[n] = !1);
131
131
  }
132
- }, x = async (s) => {
132
+ }, L = async (s) => {
133
133
  u.value !== s.key && (u.value = s.key, await B());
134
134
  }, P = (s, c) => {
135
135
  const n = v.value;
136
136
  n && d("task-action", { action: s, task: c, category: n });
137
137
  };
138
- return Z(() => {
138
+ return ee(() => {
139
139
  var s;
140
140
  u.value === void 0 && (u.value = (s = r.categories[0]) == null ? void 0 : s.key);
141
- }), p({
141
+ }), g({
142
142
  refresh: B
143
143
  }), (s, c) => {
144
144
  var n;
145
- return l(), i("div", Te, [
146
- y("aside", $e, [
145
+ return l(), i("div", $e, [
146
+ y("aside", Re, [
147
147
  c[1] || (c[1] = y("div", { class: "rh-data-center-panel__title" }, "数据类型", -1)),
148
- (l(!0), i(G, null, j(e.categories, (a) => (l(), i("button", {
149
- key: a.key,
150
- type: "button",
151
- class: U(["rh-data-center-panel__category", { "is-active": u.value === a.key }]),
152
- onClick: (C) => x(a)
148
+ (l(!0), i(G, null, j(e.categories, (t) => (l(), i("div", {
149
+ key: t.key,
150
+ role: "button",
151
+ tabindex: "0",
152
+ class: U(["rh-data-center-panel__category", { "is-active": u.value === t.key }]),
153
+ "aria-pressed": u.value === t.key,
154
+ onClick: (m) => L(t),
155
+ onKeydown: [
156
+ J((m) => L(t), ["enter"]),
157
+ J(q((m) => L(t), ["prevent"]), ["space"])
158
+ ]
153
159
  }, [
154
- y("span", null, w(a.label), 1),
155
- F(a) !== void 0 ? (l(), i("span", Ee, w(F(a)), 1)) : b("", !0)
156
- ], 10, Re))), 128))
160
+ y("span", null, w(t.label), 1),
161
+ z(t) !== void 0 ? (l(), i("span", Ae, w(z(t)), 1)) : b("", !0)
162
+ ], 42, Ee))), 128))
157
163
  ]),
158
- y("section", Ae, [
159
- y("div", De, [
164
+ y("section", De, [
165
+ y("div", Le, [
160
166
  T(s.$slots, "header", { category: v.value }, () => [
161
- c[2] || (c[2] = q("数据处理进度", -1))
167
+ c[2] || (c[2] = X("数据处理进度", -1))
162
168
  ]),
163
169
  e.closeable ? (l(), i("button", {
164
170
  key: 0,
165
171
  type: "button",
166
172
  class: "rh-data-center-panel__action",
167
- onClick: c[0] || (c[0] = (a) => d("close"))
173
+ onClick: c[0] || (c[0] = (t) => d("close"))
168
174
  }, "关闭")) : b("", !0)
169
175
  ]),
170
- y("div", Le, [
171
- z.value && !R.value ? (l(), X(W, {
176
+ y("div", Ve, [
177
+ K.value && !R.value ? (l(), Y(W, {
172
178
  key: 0,
173
179
  text: "加载中..."
174
180
  })) : D.value && !R.value ? T(s.$slots, "error", {
@@ -181,15 +187,15 @@ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
181
187
  retryable: !0,
182
188
  onRetry: B
183
189
  })
184
- ]) : (n = R.value) != null && n.items.length ? (l(!0), i(G, { key: 2 }, j(R.value.items, (a) => T(s.$slots, "task", {
185
- key: a.id,
186
- task: a,
190
+ ]) : (n = R.value) != null && n.items.length ? (l(!0), i(G, { key: 2 }, j(R.value.items, (t) => T(s.$slots, "task", {
191
+ key: t.id,
192
+ task: t,
187
193
  category: v.value,
188
194
  action: P
189
195
  }, () => [
190
- S(ge, {
191
- task: a,
192
- onAction: (C) => P(C, a)
196
+ S(ke, {
197
+ task: t,
198
+ onAction: (m) => P(m, t)
193
199
  }, null, 8, ["task", "onAction"])
194
200
  ])), 128)) : T(s.$slots, "empty", {
195
201
  key: 3,
@@ -202,10 +208,10 @@ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
202
208
  result: R.value,
203
209
  category: v.value
204
210
  }, () => {
205
- var a;
211
+ var t;
206
212
  return [
207
- e.showTotal ? (l(), i("div", Ve, [
208
- y("span", null, w(((a = R.value) == null ? void 0 : a.total) || 0) + "条记录", 1),
213
+ e.showTotal ? (l(), i("div", xe, [
214
+ y("span", null, w(((t = R.value) == null ? void 0 : t.total) || 0) + "条记录", 1),
209
215
  y("span", null, w(e.recentDaysText), 1)
210
216
  ])) : b("", !0)
211
217
  ];
@@ -214,28 +220,28 @@ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
214
220
  ]);
215
221
  };
216
222
  }
217
- }), xe = (e) => typeof e == "function" ? e() : e.value, Pe = (e, p) => {
218
- const t = (r) => {
223
+ }), Pe = (e) => typeof e == "function" ? e() : e.value, Ie = (e, g) => {
224
+ const a = (r) => {
219
225
  const d = r.target;
220
226
  if (!d)
221
227
  return;
222
- e.some((k) => {
223
- var g;
224
- return (g = xe(k)) == null ? void 0 : g.contains(d);
225
- }) || p();
228
+ e.some((_) => {
229
+ var k;
230
+ return (k = Pe(_)) == null ? void 0 : k.contains(d);
231
+ }) || g();
226
232
  };
227
- Z(() => document.addEventListener("click", t, !0)), ee(() => document.removeEventListener("click", t, !0));
228
- }, Ie = ["src"], Ne = /* @__PURE__ */ M({
233
+ ee(() => document.addEventListener("click", a, !0)), te(() => document.removeEventListener("click", a, !0));
234
+ }, Ne = ["src"], He = /* @__PURE__ */ M({
229
235
  __name: "RhDataCenter",
230
236
  props: {
231
237
  modelValue: { type: Boolean, default: void 0 },
232
238
  categories: {},
233
239
  loadTasks: {},
234
- label: { default: ke },
235
- width: { default: _e },
236
- panelHeight: { default: Ce },
240
+ label: { default: _e },
241
+ width: { default: Ce },
242
+ panelHeight: { default: we },
237
243
  panelRight: { default: 0 },
238
- pollInterval: { default: we },
244
+ pollInterval: { default: be },
239
245
  refreshOnOpen: { type: Boolean, default: !0 },
240
246
  closeOnClickOutside: { type: Boolean, default: !0 },
241
247
  showCategoryCount: { type: Boolean, default: !0 },
@@ -244,70 +250,70 @@ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
244
250
  activeIcon: { default: "" }
245
251
  },
246
252
  emits: ["update:modelValue", "open", "close", "refresh", "task-action", "error"],
247
- setup(e, { emit: p }) {
248
- const t = e, r = p, d = m(!1), u = m(null), k = m(null), g = m(null), _ = m({}), $ = m(), E = m(!1), v = L(() => t.modelValue === void 0 ? d.value : t.modelValue), A = L(() => v.value ? t.activeIcon || t.icon : t.icon || t.activeIcon), R = (o) => typeof o == "number" ? `${o}px` : o, z = (o) => typeof o == "number" ? o : Number.parseFloat(o) || 0, D = () => {
249
- const o = u.value, h = k.value;
253
+ setup(e, { emit: g }) {
254
+ const a = e, r = g, d = p(!1), u = p(null), _ = p(null), k = p(null), C = p({}), $ = p(), E = p(!1), v = V(() => a.modelValue === void 0 ? d.value : a.modelValue), A = V(() => v.value ? a.activeIcon || a.icon : a.icon || a.activeIcon), R = (o) => typeof o == "number" ? `${o}px` : o, K = (o) => typeof o == "number" ? o : Number.parseFloat(o) || 0, D = () => {
255
+ const o = u.value, h = _.value;
250
256
  if (!o || !h)
251
257
  return;
252
- const f = o.getBoundingClientRect(), K = h.offsetWidth || z(t.width), te = z(t.panelRight), N = 8, ae = f.right - K - te, ne = Math.min(
253
- Math.max(N, ae),
254
- Math.max(N, window.innerWidth - K - N)
255
- ), oe = Math.min(
258
+ const f = o.getBoundingClientRect(), F = h.offsetWidth || K(a.width), ae = K(a.panelRight), N = 8, ne = f.right - F - ae, oe = Math.min(
259
+ Math.max(N, ne),
260
+ Math.max(N, window.innerWidth - F - N)
261
+ ), se = Math.min(
256
262
  f.bottom + 8,
257
263
  Math.max(N, window.innerHeight - h.offsetHeight - N)
258
264
  );
259
- _.value = {
260
- top: `${oe}px`,
261
- left: `${ne}px`,
262
- width: R(t.width),
263
- "--rh-ui-data-center-panel-height": R(t.panelHeight)
265
+ C.value = {
266
+ top: `${se}px`,
267
+ left: `${oe}px`,
268
+ width: R(a.width),
269
+ "--rh-ui-data-center-panel-height": R(a.panelHeight)
264
270
  };
265
- }, F = () => {
271
+ }, z = () => {
266
272
  E.value || (E.value = !0, window.addEventListener("resize", D), window.addEventListener("scroll", D, !0));
267
273
  }, B = () => {
268
274
  E.value && (E.value = !1, window.removeEventListener("resize", D), window.removeEventListener("scroll", D, !0));
269
- }, x = () => {
275
+ }, L = () => {
270
276
  $.value !== void 0 && (window.clearInterval($.value), $.value = void 0);
271
277
  }, P = () => {
272
278
  var o;
273
- (o = g.value) == null || o.refresh();
279
+ (o = k.value) == null || o.refresh();
274
280
  }, s = () => {
275
- x(), !(!v.value || t.pollInterval <= 0) && ($.value = window.setInterval(P, t.pollInterval));
281
+ L(), !(!v.value || a.pollInterval <= 0) && ($.value = window.setInterval(P, a.pollInterval));
276
282
  }, c = (o) => {
277
- t.modelValue === void 0 && (d.value = o), r("update:modelValue", o);
283
+ a.modelValue === void 0 && (d.value = o), r("update:modelValue", o);
278
284
  }, n = () => {
279
285
  v.value || (c(!0), r("open"));
280
- }, a = () => {
286
+ }, t = () => {
281
287
  v.value && (c(!1), r("close"));
282
- }, C = () => v.value ? a() : n(), I = () => {
288
+ }, m = () => v.value ? t() : n(), I = () => {
283
289
  if (document.visibilityState === "hidden") {
284
- x();
290
+ L();
285
291
  return;
286
292
  }
287
293
  s(), P();
288
294
  };
289
- return se(v, async (o) => {
290
- if (x(), B(), !o) {
295
+ return le(v, async (o) => {
296
+ if (L(), B(), !o) {
291
297
  document.removeEventListener("visibilitychange", I);
292
298
  return;
293
299
  }
294
- await le(), D(), F(), document.addEventListener("visibilitychange", I), t.refreshOnOpen && P(), s();
295
- }, { immediate: !0 }), Pe([u, k], () => {
296
- t.closeOnClickOutside && v.value && a();
297
- }), ee(() => {
298
- x(), B(), document.removeEventListener("visibilitychange", I);
300
+ await re(), D(), z(), document.addEventListener("visibilitychange", I), a.refreshOnOpen && P(), s();
301
+ }, { immediate: !0 }), Ie([u, _], () => {
302
+ a.closeOnClickOutside && v.value && t();
303
+ }), te(() => {
304
+ L(), B(), document.removeEventListener("visibilitychange", I);
299
305
  }), (o, h) => (l(), i(G, null, [
300
306
  y("div", {
301
307
  ref_key: "triggerRef",
302
308
  ref: u,
303
309
  class: "rh-data-center",
304
- onClick: Y(C, ["stop"])
310
+ onClick: q(m, ["stop"])
305
311
  }, [
306
312
  T(o.$slots, "trigger", {
307
313
  visible: v.value,
308
314
  open: n,
309
- close: a,
310
- toggle: C
315
+ close: t,
316
+ toggle: m
311
317
  }, () => [
312
318
  y("span", {
313
319
  class: U(["rh-data-center__trigger", { "is-active": v.value }])
@@ -317,49 +323,49 @@ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
317
323
  src: A.value,
318
324
  class: "rh-data-center__icon",
319
325
  alt: ""
320
- }, null, 8, Ie)) : b("", !0),
326
+ }, null, 8, Ne)) : b("", !0),
321
327
  y("span", null, w(e.label), 1)
322
328
  ], 2)
323
329
  ], !0)
324
330
  ], 512),
325
- (l(), X(re, { to: "body" }, [
331
+ (l(), Y(ie, { to: "body" }, [
326
332
  v.value ? (l(), i("div", {
327
333
  key: 0,
328
334
  ref_key: "contentRef",
329
- ref: k,
335
+ ref: _,
330
336
  class: "rh-data-center__popover",
331
- style: Q(_.value),
332
- onClick: h[3] || (h[3] = Y(() => {
337
+ style: Z(C.value),
338
+ onClick: h[3] || (h[3] = q(() => {
333
339
  }, ["stop"]))
334
340
  }, [
335
341
  S(Be, {
336
342
  ref_key: "panelRef",
337
- ref: g,
343
+ ref: k,
338
344
  categories: e.categories,
339
345
  "load-tasks": e.loadTasks,
340
346
  closeable: !0,
341
347
  "show-category-count": e.showCategoryCount,
342
348
  "category-counts": e.categoryCounts,
343
- onClose: a,
349
+ onClose: t,
344
350
  onRefresh: h[0] || (h[0] = (f) => r("refresh", f)),
345
351
  onTaskAction: h[1] || (h[1] = (f) => r("task-action", f)),
346
- onError: h[2] || (h[2] = (f, K) => r("error", f, K))
352
+ onError: h[2] || (h[2] = (f, F) => r("error", f, F))
347
353
  }, {
348
- header: V((f) => [
354
+ header: x((f) => [
349
355
  T(o.$slots, "header", H(O(f)), () => [
350
- h[4] || (h[4] = q("数据处理进度", -1))
356
+ h[4] || (h[4] = X("数据处理进度", -1))
351
357
  ], !0)
352
358
  ]),
353
- task: V((f) => [
359
+ task: x((f) => [
354
360
  T(o.$slots, "task", H(O(f)), void 0, !0)
355
361
  ]),
356
- empty: V((f) => [
362
+ empty: x((f) => [
357
363
  T(o.$slots, "empty", H(O(f)), void 0, !0)
358
364
  ]),
359
- error: V((f) => [
365
+ error: x((f) => [
360
366
  T(o.$slots, "error", H(O(f)), void 0, !0)
361
367
  ]),
362
- footer: V((f) => [
368
+ footer: x((f) => [
363
369
  T(o.$slots, "footer", H(O(f)), void 0, !0)
364
370
  ]),
365
371
  _: 3
@@ -369,16 +375,16 @@ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ M({
369
375
  ], 64));
370
376
  }
371
377
  });
372
- const Ke = /* @__PURE__ */ ie(Ne, [["__scopeId", "data-v-a3a35657"]]), He = {
378
+ const Ue = /* @__PURE__ */ ue(He, [["__scopeId", "data-v-a3a35657"]]), Oe = {
373
379
  key: 0,
374
380
  class: "rh-data-center-tip__guide"
375
- }, Oe = { class: "rh-data-center-tip__content" }, Se = {
381
+ }, Se = { class: "rh-data-center-tip__content" }, Me = {
376
382
  key: 0,
377
383
  class: "rh-data-center-tip__minutes"
378
- }, Me = {
384
+ }, Ke = {
379
385
  key: 1,
380
386
  class: "rh-data-center-tip__description"
381
- }, Ue = /* @__PURE__ */ M({
387
+ }, Ge = /* @__PURE__ */ M({
382
388
  __name: "RhDataCenterTip",
383
389
  props: {
384
390
  modelValue: { type: Boolean, default: !1 },
@@ -390,36 +396,36 @@ const Ke = /* @__PURE__ */ ie(Ne, [["__scopeId", "data-v-a3a35657"]]), He = {
390
396
  showGuideAnimation: { type: Boolean, default: !0 }
391
397
  },
392
398
  emits: ["update:modelValue", "close"],
393
- setup(e, { emit: p }) {
394
- const t = p, r = () => {
395
- t("update:modelValue", !1), t("close");
399
+ setup(e, { emit: g }) {
400
+ const a = g, r = () => {
401
+ a("update:modelValue", !1), a("close");
396
402
  };
397
403
  return (d, u) => {
398
- const k = J("el-button"), g = J("el-dialog");
399
- return l(), X(g, {
404
+ const _ = Q("el-button"), k = Q("el-dialog");
405
+ return l(), Y(k, {
400
406
  "model-value": e.modelValue,
401
407
  title: e.title || "提示",
402
408
  width: e.width,
403
409
  "append-to-body": "",
404
- "onUpdate:modelValue": u[0] || (u[0] = (_) => t("update:modelValue", _)),
410
+ "onUpdate:modelValue": u[0] || (u[0] = (C) => a("update:modelValue", C)),
405
411
  onClose: r
406
412
  }, {
407
- footer: V(() => [
408
- S(k, {
413
+ footer: x(() => [
414
+ S(_, {
409
415
  type: "primary",
410
416
  onClick: r
411
417
  }, {
412
- default: V(() => [...u[1] || (u[1] = [
413
- q("关闭弹框", -1)
418
+ default: x(() => [...u[1] || (u[1] = [
419
+ X("关闭弹框", -1)
414
420
  ])]),
415
421
  _: 1
416
422
  })
417
423
  ]),
418
- default: V(() => [
419
- e.showGuideAnimation ? (l(), i("div", He)) : b("", !0),
420
- y("div", Oe, [
421
- e.minutes !== void 0 ? (l(), i("span", Se, w((e.title || "任务处理中,大概需要") + e.minutes + "分钟"), 1)) : b("", !0),
422
- e.content ? (l(), i("div", Me, w(e.content), 1)) : b("", !0),
424
+ default: x(() => [
425
+ e.showGuideAnimation ? (l(), i("div", Oe)) : b("", !0),
426
+ y("div", Se, [
427
+ e.minutes !== void 0 ? (l(), i("span", Me, w((e.title || "任务处理中,大概需要") + e.minutes + "分钟"), 1)) : b("", !0),
428
+ e.content ? (l(), i("div", Ke, w(e.content), 1)) : b("", !0),
423
429
  T(d.$slots, "extra")
424
430
  ])
425
431
  ]),
@@ -427,13 +433,13 @@ const Ke = /* @__PURE__ */ ie(Ne, [["__scopeId", "data-v-a3a35657"]]), He = {
427
433
  }, 8, ["model-value", "title", "width"]);
428
434
  };
429
435
  }
430
- }), Ge = () => {
431
- const e = m(!1), p = m({});
436
+ }), We = () => {
437
+ const e = p(!1), g = p({});
432
438
  return {
433
439
  tipVisible: e,
434
- tipConfig: p,
440
+ tipConfig: g,
435
441
  showTip: (d) => {
436
- p.value = { ...d }, e.value = !0;
442
+ g.value = { ...d }, e.value = !0;
437
443
  },
438
444
  closeTip: () => {
439
445
  e.value = !1;
@@ -441,8 +447,8 @@ const Ke = /* @__PURE__ */ ie(Ne, [["__scopeId", "data-v-a3a35657"]]), He = {
441
447
  };
442
448
  };
443
449
  export {
444
- Ke as RhDataCenter,
450
+ Ue as RhDataCenter,
445
451
  Be as RhDataCenterPanel,
446
- Ue as RhDataCenterTip,
447
- Ge as useRhDataCenter
452
+ Ge as RhDataCenterTip,
453
+ We as useRhDataCenter
448
454
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- :root{--rh-ui-data-center-primary: #00828a;--rh-ui-data-center-primary-soft: #cfe8ea;--rh-ui-data-center-panel-width: 606px;--rh-ui-data-center-panel-height: 500px;--rh-ui-data-center-text: #333;--rh-ui-data-center-secondary-text: #999;--rh-ui-data-center-border: #e9e9e9}.rh-data-center-panel{width:var(--rh-ui-data-center-panel-width);height:var(--rh-ui-data-center-panel-height);display:flex;overflow:hidden;box-sizing:border-box;background:#fff;border:1px solid var(--rh-ui-data-center-border);border-radius:8px;box-shadow:0 12px 32px #0f172a29}.rh-data-center-panel__sidebar{width:124px;flex:0 0 124px;box-sizing:border-box;padding:16px 10px;border-right:1px solid var(--rh-ui-data-center-border)}.rh-data-center-panel__main{min-width:0;flex:1;padding:16px 0 10px 15px}.rh-data-center-panel__title{display:flex;align-items:center;justify-content:space-between;margin:0 10px 15px 0;color:var(--rh-ui-data-center-text);font-size:16px;font-weight:600}.rh-data-center-panel__category{width:104px;min-height:32px;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;margin:10px 0;padding:0 10px;border-radius:3px;color:#666;cursor:pointer;font-size:14px}.rh-data-center-panel__category.is-active{background:var(--rh-ui-data-center-primary-soft);color:var(--rh-ui-data-center-primary);font-weight:600}.rh-data-center-panel__categoryCount{color:#999;font-size:12px;font-weight:400}.rh-data-center-panel__category.is-active .rh-data-center-panel__categoryCount{color:var(--rh-ui-data-center-primary)}.rh-data-center-panel__scroll{height:calc(100% - 48px);padding-right:10px;overflow-y:auto}.rh-data-center-panel__task{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;box-sizing:border-box;min-height:84px;margin-bottom:10px;padding:0 10px 10px 0;border-bottom:1px solid var(--rh-ui-data-center-border)}.rh-data-center-panel__taskMain{min-width:0;flex:1}.rh-data-center-panel__taskTitle{overflow:hidden;color:var(--rh-ui-data-center-text);font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.rh-data-center-panel__taskTag{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:12px;background:#f5f6f7;color:#999;font-size:12px;line-height:20px;vertical-align:1px}.rh-data-center-panel__progress{width:100%;height:4px;margin:7px 0 5px;overflow:hidden;border-radius:4px;background:#edf0f1}.rh-data-center-panel__progressBar{height:100%;border-radius:inherit;background:var(--rh-ui-data-center-primary);transition:width .3s ease}.rh-data-center-panel__progressBar.is-failed{background:#f04444}.rh-data-center-panel__meta,.rh-data-center-panel__message{color:var(--rh-ui-data-center-secondary-text);font-size:11px;line-height:18px}.rh-data-center-panel__message.is-failed{color:#f04444;font-size:12px}.rh-data-center-panel__actions{flex:0 0 auto;display:flex;align-items:flex-end;gap:10px;min-height:56px;padding-bottom:1px}.rh-data-center-panel__action{padding:0;border:0;background:transparent;color:#008ae6;cursor:pointer;font-size:12px;white-space:nowrap}.rh-data-center-panel__action:disabled{color:#bbb;cursor:not-allowed}.rh-data-center-panel__state{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--rh-ui-data-center-secondary-text);font-size:14px}.rh-data-center-panel__retry{border:0;background:transparent;color:var(--rh-ui-data-center-primary);cursor:pointer}.rh-data-center-panel__footer{display:flex;justify-content:space-between;box-sizing:border-box;padding:8px 10px 0 0;color:var(--rh-ui-data-center-secondary-text);font-size:12px}.rh-data-center-tip__content{display:flex;flex-direction:column;align-items:center;color:var(--rh-ui-data-center-text)}.rh-data-center-tip__minutes{color:var(--rh-ui-data-center-primary);font-size:18px}.rh-data-center-tip__description{margin:15px 0 30px;font-size:14px;line-height:22px}.rh-data-center-tip__guide{width:120px;height:56px;position:relative;margin:-20px auto 8px;border-radius:50%;background:radial-gradient(circle at 50% 55%,rgba(0,130,138,.18),transparent 65%)}.rh-data-center-tip__guide:after{content:">";position:absolute;top:0;right:15px;color:var(--rh-ui-data-center-primary);font-size:32px;animation:rh-data-center-guide 1.5s ease-in-out infinite}@keyframes rh-data-center-guide{0%,to{transform:translate(-8px,5px)}50%{transform:translate(0)}}.rh-data-center[data-v-a3a35657]{position:relative;display:inline-flex;align-items:center}.rh-data-center__trigger[data-v-a3a35657]{display:inline-flex;align-items:center;min-height:30px;padding:0 8px;border-radius:4px;color:var(--rh-ui-data-center-text);cursor:pointer;transition:background-color .2s ease,color .2s ease}.rh-data-center__trigger[data-v-a3a35657]:hover,.rh-data-center__trigger.is-active[data-v-a3a35657]{background:rgba(0,130,138,.08);color:var(--rh-ui-data-center-primary)}.rh-data-center__icon[data-v-a3a35657]{width:22px;margin-right:5px}.rh-data-center__popover[data-v-a3a35657]{position:fixed;z-index:3000;box-sizing:border-box}.responsive-info-grid[data-v-85b5413b]{display:grid;grid-template-columns:repeat(var(--responsive-info-grid-columns),minmax(0,1fr));gap:var(--responsive-info-grid-gap)}@media (max-width: 1200px){.responsive-info-grid[data-v-85b5413b]{grid-template-columns:repeat(var(--responsive-info-grid-tablet-columns),minmax(0,1fr))}}@media (max-width: 768px){.responsive-info-grid[data-v-85b5413b]{grid-template-columns:repeat(var(--responsive-info-grid-mobile-columns),minmax(0,1fr))}}.responsive-info-grid-item[data-v-67645283]{min-width:0;color:#333;font-size:14px;line-height:22px;word-break:break-all;display:flex}.responsive-info-grid-item__title[data-v-67645283]{display:inline-block;color:#777;white-space:nowrap}.responsive-info-grid-item__content[data-v-67645283]{display:inline}@media (max-width: 768px){.responsive-info-grid-item[data-v-67645283]{grid-column:span 1!important}}
1
+ :root{--rh-ui-data-center-primary: #00828a;--rh-ui-data-center-primary-soft: #cfe8ea;--rh-ui-data-center-panel-width: 606px;--rh-ui-data-center-panel-height: 500px;--rh-ui-data-center-text: #333;--rh-ui-data-center-secondary-text: #999;--rh-ui-data-center-border: #e9e9e9}.rh-data-center-panel{width:var(--rh-ui-data-center-panel-width);height:var(--rh-ui-data-center-panel-height);display:flex;overflow:hidden;box-sizing:border-box;background:#fff;border:1px solid var(--rh-ui-data-center-border);border-radius:8px;box-shadow:0 12px 32px #0f172a29}.rh-data-center-panel__sidebar{width:124px;flex:0 0 124px;box-sizing:border-box;padding:16px 10px;border-right:1px solid var(--rh-ui-data-center-border)}.rh-data-center-panel__main{min-width:0;flex:1;padding:16px 0 10px 15px}.rh-data-center-panel__title{display:flex;align-items:center;justify-content:space-between;margin:0 10px 15px 0;color:var(--rh-ui-data-center-text);font-size:16px;font-weight:600}.rh-data-center-panel__category{width:104px;min-height:32px;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;margin:10px 0;padding:0 10px;border-radius:3px;color:#666;cursor:pointer;font-size:14px;-webkit-user-select:none;user-select:none;transition:background-color .15s ease,color .15s ease}.rh-data-center-panel__category:hover{background:#f3f7f7;color:var(--rh-ui-data-center-primary)}.rh-data-center-panel__category:focus-visible{outline:2px solid rgba(0,130,138,.35);outline-offset:1px}.rh-data-center-panel__category.is-active{background:var(--rh-ui-data-center-primary-soft);color:var(--rh-ui-data-center-primary);font-weight:600}.rh-data-center-panel__categoryCount{color:#999;font-size:12px;font-weight:400}.rh-data-center-panel__category.is-active .rh-data-center-panel__categoryCount{color:var(--rh-ui-data-center-primary)}.rh-data-center-panel__scroll{height:calc(100% - 48px);padding-right:10px;overflow-y:auto}.rh-data-center-panel__task{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;box-sizing:border-box;min-height:84px;margin-bottom:10px;padding:0 10px 10px 0;border-bottom:1px solid var(--rh-ui-data-center-border)}.rh-data-center-panel__taskMain{min-width:0;flex:1}.rh-data-center-panel__taskTitle{overflow:hidden;color:var(--rh-ui-data-center-text);font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.rh-data-center-panel__taskTag{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:12px;background:#f5f6f7;color:#999;font-size:12px;line-height:20px;vertical-align:1px}.rh-data-center-panel__progress{width:100%;height:4px;margin:7px 0 5px;overflow:hidden;border-radius:4px;background:#edf0f1}.rh-data-center-panel__progressBar{height:100%;border-radius:inherit;background:var(--rh-ui-data-center-primary);transition:width .3s ease}.rh-data-center-panel__progressBar.is-failed{background:#f04444}.rh-data-center-panel__meta,.rh-data-center-panel__message{color:var(--rh-ui-data-center-secondary-text);font-size:11px;line-height:18px}.rh-data-center-panel__message.is-failed{color:#f04444;font-size:12px}.rh-data-center-panel__actions{flex:0 0 auto;display:flex;align-items:flex-end;gap:10px;min-height:56px;padding-bottom:1px}.rh-data-center-panel__action{padding:0;border:0;background:transparent;color:#008ae6;cursor:pointer;font-size:12px;white-space:nowrap}.rh-data-center-panel__action:disabled{color:#bbb;cursor:not-allowed}.rh-data-center-panel__state{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--rh-ui-data-center-secondary-text);font-size:14px}.rh-data-center-panel__retry{border:0;background:transparent;color:var(--rh-ui-data-center-primary);cursor:pointer}.rh-data-center-panel__footer{display:flex;justify-content:space-between;box-sizing:border-box;padding:8px 10px 0 0;color:var(--rh-ui-data-center-secondary-text);font-size:12px}.rh-data-center-tip__content{display:flex;flex-direction:column;align-items:center;color:var(--rh-ui-data-center-text)}.rh-data-center-tip__minutes{color:var(--rh-ui-data-center-primary);font-size:18px}.rh-data-center-tip__description{margin:15px 0 30px;font-size:14px;line-height:22px}.rh-data-center-tip__guide{width:120px;height:56px;position:relative;margin:-20px auto 8px;border-radius:50%;background:radial-gradient(circle at 50% 55%,rgba(0,130,138,.18),transparent 65%)}.rh-data-center-tip__guide:after{content:">";position:absolute;top:0;right:15px;color:var(--rh-ui-data-center-primary);font-size:32px;animation:rh-data-center-guide 1.5s ease-in-out infinite}@keyframes rh-data-center-guide{0%,to{transform:translate(-8px,5px)}50%{transform:translate(0)}}.rh-data-center[data-v-a3a35657]{position:relative;display:inline-flex;align-items:center}.rh-data-center__trigger[data-v-a3a35657]{display:inline-flex;align-items:center;min-height:30px;padding:0 8px;border-radius:4px;color:var(--rh-ui-data-center-text);cursor:pointer;transition:background-color .2s ease,color .2s ease}.rh-data-center__trigger[data-v-a3a35657]:hover,.rh-data-center__trigger.is-active[data-v-a3a35657]{background:rgba(0,130,138,.08);color:var(--rh-ui-data-center-primary)}.rh-data-center__icon[data-v-a3a35657]{width:22px;margin-right:5px}.rh-data-center__popover[data-v-a3a35657]{position:fixed;z-index:3000;box-sizing:border-box}.responsive-info-grid[data-v-85b5413b]{display:grid;grid-template-columns:repeat(var(--responsive-info-grid-columns),minmax(0,1fr));gap:var(--responsive-info-grid-gap)}@media (max-width: 1200px){.responsive-info-grid[data-v-85b5413b]{grid-template-columns:repeat(var(--responsive-info-grid-tablet-columns),minmax(0,1fr))}}@media (max-width: 768px){.responsive-info-grid[data-v-85b5413b]{grid-template-columns:repeat(var(--responsive-info-grid-mobile-columns),minmax(0,1fr))}}.responsive-info-grid-item[data-v-67645283]{min-width:0;color:#333;font-size:14px;line-height:22px;word-break:break-all;display:flex}.responsive-info-grid-item__title[data-v-67645283]{display:inline-block;color:#777;white-space:nowrap}.responsive-info-grid-item__content[data-v-67645283]{display:inline}@media (max-width: 768px){.responsive-info-grid-item[data-v-67645283]{grid-column:span 1!important}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rhjy-ui",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Vue 3 and Element Plus business UI components",
5
5
  "type": "module",
6
6
  "publishConfig": {