@rft-rc/recycle-ui 0.0.1-rc.1 → 0.0.1-rc.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.
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.mjs +515 -0
- package/dist/index.mjs.map +1 -0
- package/dist/style.css +1 -0
- package/package.json +1 -1
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),A=["disabled"],P={key:0,class:"rc-button__spinner"},F=e.defineComponent({__name:"index",props:{type:{default:"default"},size:{default:"medium"},plain:{type:Boolean,default:!1},block:{type:Boolean,default:!1},label:{default:""},round:{type:[Number,String,Boolean],default:6},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const o=t,s=n,r=i=>{!o.disabled&&!o.loading&&s("click",i)},d=e.computed(()=>{const i=o.round;return typeof i=="boolean"?i?"999px":"6px":typeof i=="number"?`${i}px`:String(i)});return(i,a)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["rc-button",[`rc-button--${t.type}`,`rc-button--${t.size}`,{"is-plain":t.plain,"is-block":t.block,"is-disabled":t.disabled,"is-loading":t.loading}]]),style:e.normalizeStyle({borderRadius:d.value}),disabled:t.disabled||t.loading,onClick:r},[t.loading?(e.openBlock(),e.createElementBlock("span",P)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],14,A))}}),v=(t,n)=>{const o=t.__vccOpts||t;for(const[s,r]of n)o[s]=r;return o},x=v(F,[["__scopeId","data-v-a70e95bb"]]);x.name="rc-button";function N(t){return t.component(x.name,x),t}const O={class:"rc-desc-item__value"},Y=e.defineComponent({name:"rc-descriptions-item",__name:"item",props:{label:{default:""},value:{default:""},labelWidth:{default:""},span:{default:1}},setup(t){const n=t;e.inject("rcDescItemWidth",void 0),e.inject("rcDescSingleWidth",""),e.inject("rcDescGap","0px");const o=e.inject("rcDescGapPx",0),s=e.inject("rcDescColCount",1),r=e.inject("rcDescLabelWidth",""),d=e.computed(()=>{const c=typeof n.span=="string"?parseInt(n.span,10):n.span,l=typeof(s==null?void 0:s.value)=="number"?s.value:s,u=!Number.isNaN(c)&&c>0?c:1;return Math.min(u,l||1)}),i=e.computed(()=>{const c=typeof(s==null?void 0:s.value)=="number"?s.value:s,l=typeof(o==null?void 0:o.value)=="number"?o.value:o,u=d.value;if(!c||c<=1||u>=c)return"100%";const m=(c-1)*l,f=(u-1)*l;return`calc((100% - ${m}px) * ${u} / ${c} + ${f}px)`}),a=e.computed(()=>{const c=typeof(r==null?void 0:r.value)=="string"?r.value:r,l=n.labelWidth!==""?n.labelWidth:c||"";return l?{width:typeof l=="number"?`${l}px`:String(l),flex:"0 0 auto"}:{}});return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"rc-desc-item",style:e.normalizeStyle({width:i.value,flex:`0 0 ${i.value}`})},[e.createElementVNode("div",{class:"rc-desc-item__label",style:e.normalizeStyle(a.value)},[e.renderSlot(c.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],4),e.createElementVNode("div",O,[e.renderSlot(c.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.value),1)],!0)])],4))}}),k=v(Y,[["__scopeId","data-v-970d0b99"]]),q={class:"rc-descriptions"},H={key:0,class:"rc-descriptions__title"},K=e.defineComponent({name:"rc-descriptions",__name:"index",props:{title:{},column:{default:2},gap:{default:4},labelWidth:{default:""},data:{default:()=>[]},keyMap:{}},setup(t){const n=t,o=e.ref(null),s=e.computed(()=>typeof n.gap=="number"?`${n.gap}px`:String(n.gap)),r=e.computed(()=>{const l=typeof n.column=="string"?Number.parseInt(n.column,10):n.column??1;return!Number.isNaN(l)&&l>0?l:1}),d=e.ref("100%"),i=e.ref("100%");e.watchEffect(()=>{const l=r.value;if(l<=1)d.value="100%",i.value="100%";else{const u=typeof n.gap=="number"?n.gap:parseFloat(String(n.gap))||0,f=`calc((100% - ${(l-1)*u}px) / ${l})`;i.value=f,d.value=f}}),e.provide("rcDescItemWidth",d),e.provide("rcDescSingleWidth",i),e.provide("rcDescColCount",r),e.provide("rcDescGapPx",e.computed(()=>typeof n.gap=="number"?n.gap:parseFloat(String(n.gap))||0));const a=e.computed(()=>n.labelWidth===""||n.labelWidth===void 0?"":typeof n.labelWidth=="number"?`${n.labelWidth}px`:String(n.labelWidth));e.provide("rcDescLabelWidth",a),e.provide("rcDescGap",e.computed(()=>typeof n.gap=="number"?`${n.gap}px`:String(n.gap)));const c=e.computed(()=>{var m,f,W;const l=((m=n.keyMap)==null?void 0:m.key)??"label",u=((f=n.keyMap)==null?void 0:f.value)??"value";return(W=n.data)!=null&&W.length?n.data.map(b=>({label:b==null?void 0:b[l],value:b==null?void 0:b[u]})):[]});return(l,u)=>(e.openBlock(),e.createElementBlock("div",q,[l.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",H,[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-descriptions__body",style:e.normalizeStyle({gap:s.value}),ref_key:"wrapEl",ref:o},[c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,(m,f)=>(e.openBlock(),e.createBlock(k,{key:f,label:m.label,value:m.value,"label-width":t.labelWidth},null,8,["label","value","label-width"]))),128)):e.renderSlot(l.$slots,"default",{key:1},void 0,!0)],4)]))}}),$=v(K,[["__scopeId","data-v-5fcaa235"]]);$.name="rc-descriptions";k.name="rc-descriptions-item";function D(t){return t.component($.name,$),t.component("RcDescriptions",$),t.component(k.name,k),t.component("RcDescriptionsItem",k),t}const U=$,L=k,J={class:"rc-card__title"},Q={class:"rc-card__title-text"},X={key:0,class:"rc-card__status"},Z={key:1,class:"rc-card__divider"},ee={key:2,class:"rc-card__action"},te=e.defineComponent({name:"rc-card",__name:"index",props:{color:{default:"var(--rc-white)"},topBgColor:{default:"rgba(29, 133, 252, 0.05)"},title:{default:""},status:{default:""},statusColor:{default:"var(--rc-primary)"},round:{default:8},bordered:{type:Boolean,default:!1},elevation:{default:2},padding:{default:"16px"},gap:{default:12},width:{default:"100%"},height:{default:""}},setup(t){const n=t,o=e.computed(()=>{const a=typeof n.round=="boolean"?n.round?"12px":"0":typeof n.round=="number"?`${n.round}px`:String(n.round);return{backgroundColor:n.color||"var(--rc-white)",borderRadius:a,boxShadow:i(n.elevation),width:d(n.width),height:d(n.height)}}),s=e.computed(()=>n.padding||"16px"),r=e.computed(()=>typeof n.gap=="number"?`${n.gap}px`:String(n.gap));function d(a){return a==null||a===""?"":typeof a=="number"?`${a}px`:String(a)}function i(a){if(!a||a<=0)return"none";const c=4*a;return`0 ${Math.round(c/2)}px ${c}px rgba(0,0,0,0.06), 0 ${Math.round(c/4)}px ${Math.round(c/2)}px rgba(0,0,0,0.04)`}return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-card",[{"rc-card--bordered":t.bordered}]]),style:e.normalizeStyle(o.value)},[a.$slots.title||t.title||a.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-card__top",style:e.normalizeStyle({backgroundColor:t.topBgColor||"rgba(29, 133, 252, 0.05)"})},[e.createElementVNode("div",J,[e.renderSlot(a.$slots,"title",{},()=>[e.createElementVNode("span",Q,e.toDisplayString(t.title),1)],!0)]),a.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(a.$slots,"status",{},()=>[e.createElementVNode("span",{class:"rc-card__status-text",style:e.normalizeStyle({color:t.statusColor||"var(--rc-primary)"})},e.toDisplayString(t.status),5)],!0)])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-card__body",style:e.normalizeStyle({padding:s.value,gap:r.value})},[e.renderSlot(a.$slots,"content",{},()=>[e.renderSlot(a.$slots,"default",{},void 0,!0)],!0)],4),a.$slots.action?(e.openBlock(),e.createElementBlock("div",Z)):e.createCommentVNode("",!0),a.$slots.action?(e.openBlock(),e.createElementBlock("div",ee,[e.renderSlot(a.$slots,"action",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),C=v(te,[["__scopeId","data-v-a7b95214"]]);C.name="rc-card";const ne="RcCard";function I(t){return t.component(C.name,C),t.component(ne,C),t}const oe={key:0,class:"rc-toast__mask"},ce={class:"rc-toast__content"},ae={key:0,class:"rc-toast__spinner"},le={key:1,class:"rc-toast__icon rc-toast__icon--success"},se={key:2,class:"rc-toast__icon rc-toast__icon--fail"},re={class:"rc-toast__text"},ie=e.defineComponent({__name:"index",props:{message:{default:""},type:{default:"text"},duration:{default:2e3},mask:{type:Boolean,default:!1},onAfterLeave:{}},setup(t,{expose:n}){const o=t,s=e.ref(!0);let r;function d(){r&&(clearTimeout(r),r=null)}function i(){d(),s.value=!1}return n({close:i}),e.onMounted(()=>{o.duration&&o.duration>0&&(r=setTimeout(()=>{i()},o.duration))}),e.onUnmounted(()=>{d()}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-toast-fade",onAfterLeave:t.onAfterLeave},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-toast",[`rc-toast--${t.type}`]])},[t.mask?(e.openBlock(),e.createElementBlock("div",oe)):e.createCommentVNode("",!0),e.createElementVNode("div",ce,[t.type==="loading"?(e.openBlock(),e.createElementBlock("div",ae)):t.type==="success"?(e.openBlock(),e.createElementBlock("div",le)):t.type==="fail"?(e.openBlock(),e.createElementBlock("div",se)):e.createCommentVNode("",!0),e.createElementVNode("div",re,e.toDisplayString(t.message),1)])],2)):e.createCommentVNode("",!0)]),_:1},8,["onAfterLeave"])])),e.renderSlot(a.$slots,"default",{},void 0,!0)],64))}}),S=v(ie,[["__scopeId","data-v-d234c9c5"]]);let g=null,_=null;function T(){g&&(g.unmount(),g=null),_&&(document.body.removeChild(_),_=null)}function de(t){const n=typeof t=="string"?{message:t}:t||{};T(),_=document.createElement("div"),document.body.appendChild(_);const o={message:n.message,type:n.type??"text",duration:n.duration??2e3,mask:n.mask??!1,onAfterLeave:()=>{var s;T(),(s=n.onClose)==null||s.call(n)}};return g=e.createApp(S,o),g.mount(_),{close:G}}function G(){var t,n,o;g&&((o=(n=(t=g._instance)==null?void 0:t.exposed)==null?void 0:n.close)==null||o.call(n))}S.name="rc-toast";function M(t){return t.component(S.name,S),t}const ue={class:"rc-message",role:"alert","aria-live":"polite"},me={class:"rc-message__content"},fe=e.defineComponent({__name:"index",setup(t,{expose:n}){const o=e.reactive([]);let s=1;function r(i){const a=o.findIndex(c=>c.id===i);a>=0&&o.splice(a,1)}function d(i,a,c){const l=s++;return o.push({id:l,type:i,content:a,duration:c}),c>0&&window.setTimeout(()=>r(l),c),l}return n({add:d,remove:r}),(i,a)=>(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(e.TransitionGroup,{name:"rc-message-fade",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:e.normalizeClass(["rc-message__item",`rc-message--${c.type}`])},[e.createElementVNode("span",me,e.toDisplayString(c.content),1)],2))),128))]),_:1})]))}}),pe=v(fe,[["__scopeId","data-v-87811df0"]]);let y=null,p=null;function ye(){var n;if(y&&p)return;y=document.createElement("div"),document.body.appendChild(y);const t=e.createVNode(pe,{});e.render(t,y),p=(n=t.component)==null?void 0:n.exposed}function h(t,n,o){var r;ye();const s=typeof o=="number"?o:t==="loading"?0:2e3;return(r=p==null?void 0:p.add)==null?void 0:r.call(p,t,n,s)}const j={open(t){return h(t.type||"info",t.content,t.duration)},info(t,n){return h("info",t,n)},success(t,n){return h("success",t,n)},warning(t,n){return h("warning",t,n)},error(t,n){return h("error",t,n)},loading(t,n){return h("loading",t,n)},destroy(){y&&(e.render(null,y),y.remove(),y=null,p=null)}};function w(t){return t.config.globalProperties.$message=j,t}const ge={key:0,class:"rc-icon__unicode"},ve=e.defineComponent({name:"rc-icon",__name:"index",props:{name:{},size:{default:16},color:{default:""},spin:{type:Boolean,default:!1},code:{default:""}},setup(t){const n=t,o=e.inject(E,{}),s=e.computed(()=>(o==null?void 0:o.iconClass)||"iconfont"),r=e.computed(()=>n.name||""),d=e.computed(()=>typeof n.size=="number"?`${n.size}px`:n.size||"16px"),i=e.computed(()=>({fontSize:d.value,color:n.color||void 0,lineHeight:1,fontFamily:(o==null?void 0:o.iconClass)||"iconfont"})),a=e.computed(()=>{const c=n.code;if(c==null||c===""||c===0)return"";if(typeof c=="number")return String.fromCharCode(c);const l=String(c).replace(/^0x/i,""),u=parseInt(l,16);return Number.isNaN(u)?"":String.fromCharCode(u)});return e.onMounted(()=>{if(typeof window>"u")return;const c=o&&o.iconCssUrl||z.iconCssUrl;if(!c)return;const l=`link[rel="stylesheet"][data-rcui-icon="true"][href="${c}"]`;if(!document.head.querySelector(l)){const m=document.createElement("link");m.rel="stylesheet",m.href=c,m.setAttribute("data-rcui-icon","true"),document.head.appendChild(m)}}),(c,l)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["rc-icon",[s.value,r.value,{"rc-icon--spin":t.spin}]]),style:e.normalizeStyle(i.value),"aria-hidden":"true"},[a.value?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)],6))}}),B=v(ve,[["__scopeId","data-v-3857a892"]]);B.name="rc-icon";function V(t){return t.component(B.name,B),t.component("RcIcon",B),t}const E=Symbol("RECYCLE_UI_CONFIG"),z={prefix:"rc",autoRegister:!0,provideKey:E,theme:{},iconCssUrl:"//at.alicdn.com/t/c/font_4252799_9vcnw0pnmkh.css",iconClass:"iconfont"};function be(t,n){n.autoRegister!==!1&&(typeof N=="function"&&N(t),typeof D=="function"&&D(t),typeof I=="function"&&I(t),typeof M=="function"&&M(t),typeof V=="function"&&V(t),typeof w=="function"&&w(t))}const R=(t,n)=>{const o={...z,...n||{}};if(t.provide(o.provideKey??E,o),t.config.globalProperties.$recycleUI=o,typeof window<"u"&&o.iconCssUrl){const s=`link[rel="stylesheet"][data-rcui-icon="true"][href="${o.iconCssUrl}"]`;if(!document.head.querySelector(s)){const d=document.createElement("link");d.rel="stylesheet",d.href=o.iconCssUrl,d.setAttribute("data-rcui-icon","true"),document.head.appendChild(d)}}return be(t,o),t},he={install:R};function ke(t){return{install(n){R(n,t)}}}exports.RECYCLE_UI_SYMBOL=E;exports.RcButton=x;exports.RcCard=C;exports.RcDescriptions=U;exports.RcDescriptionsItem=L;exports.RcIcon=B;exports.RcToast=S;exports.createRecycleUI=ke;exports.default=he;exports.defaultRecycleUIConfig=z;exports.hideToast=G;exports.install=R;exports.installButton=N;exports.installCard=I;exports.installDescriptions=D;exports.installIcon=V;exports.installMessage=w;exports.message=j;exports.rcDescriptions=U;exports.rcDescriptionsItem=L;exports.showToast=de;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/components/button/index.vue","../src/components/button/index.ts","../src/components/descriptions/item.vue","../src/components/descriptions/index.vue","../src/components/descriptions/index.ts","../src/components/card/index.vue","../src/components/card/index.ts","../src/components/toast/index.vue","../src/components/toast/index.ts","../src/components/message/index.vue","../src/components/message/index.ts","../src/components/icon/index.vue","../src/components/icon/index.ts","../src/index.ts"],"sourcesContent":["<template>\r\n <button\r\n class=\"rc-button\"\r\n :class=\"[`rc-button--${type}`, `rc-button--${size}`, { 'is-plain': plain, 'is-block': block, 'is-disabled': disabled, 'is-loading': loading }]\"\r\n :style=\"{ borderRadius: radius }\"\r\n :disabled=\"disabled || loading\"\r\n @click=\"onClick\"\r\n >\r\n <span v-if=\"loading\" class=\"rc-button__spinner\" />\r\n <slot>{{ label }}</slot>\r\n </button>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\ntype ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'danger';\r\ntype ButtonSize = 'mini' | 'small' | 'medium' | 'large';\r\n\r\ninterface Props {\r\n type?: ButtonType;\r\n size?: ButtonSize;\r\n plain?: boolean;\r\n block?: boolean;\r\n /** 按钮文本,提供时可不写默认插槽 */\r\n label?: string;\r\n /** 圆角;number 代表 px,string 支持百分比等写法(如 '50%')。也兼容 boolean,true 表示大圆角。 */\r\n round?: number | string | boolean;\r\n disabled?: boolean;\r\n loading?: boolean;\r\n}\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n type: 'default',\r\n size: 'medium',\r\n plain: false,\r\n block: false,\r\n label: '',\r\n round: 6,\r\n disabled: false,\r\n loading: false,\r\n});\r\n\r\nconst emit = defineEmits<{\r\n (e: 'click', ev: MouseEvent): void\r\n}>();\r\n\r\nconst onClick = (ev: MouseEvent) => {\r\n if (!props.disabled && !props.loading) emit('click', ev);\r\n};\r\n\r\nconst radius = computed(() => {\r\n const v = props.round;\r\n if (typeof v === 'boolean') return v ? '999px' : '6px';\r\n if (typeof v === 'number') return `${v}px`;\r\n return String(v);\r\n});\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n.rc-button {\r\n --rc-primary: #1677ff;\r\n --rc-success: #00b578;\r\n --rc-warning: #ff8f1f;\r\n --rc-danger: #ff3141;\r\n --rc-text: #323233;\r\n --rc-border: #dcdee0;\r\n --rc-white: #ffffff;\r\n\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 36px;\r\n padding: 0 16px;\r\n border: 1px solid var(--rc-border);\r\n border-radius: 6px;\r\n background: var(--rc-white);\r\n color: var(--rc-text);\r\n cursor: pointer;\r\n user-select: none;\r\n transition: all .2s ease;\r\n\r\n &.is-disabled { cursor: not-allowed; opacity: .6; }\r\n &.is-block { display: flex; width: 100%; }\r\n &.is-plain { background: var(--rc-white); }\r\n &.is-loading { opacity: .85; }\r\n\r\n &__spinner {\r\n width: 14px;\r\n height: 14px;\r\n margin-right: 6px;\r\n border: 2px solid currentColor;\r\n border-top-color: transparent;\r\n border-radius: 50%;\r\n animation: rc-spin 0.8s linear infinite;\r\n }\r\n\r\n &--primary { background: var(--rc-primary); color: var(--rc-white); border-color: var(--rc-primary); }\r\n &--success { background: var(--rc-success); color: var(--rc-white); border-color: var(--rc-success); }\r\n &--warning { background: var(--rc-warning); color: var(--rc-white); border-color: var(--rc-warning); }\r\n &--danger { background: var(--rc-danger); color: var(--rc-white); border-color: var(--rc-danger); }\r\n\r\n &--mini { height: 24px; padding: 0 8px; font-size: 12px; }\r\n &--small { height: 28px; padding: 0 10px; font-size: 13px; }\r\n &--medium { height: 36px; padding: 0 16px; font-size: 14px; }\r\n &--large { height: 44px; padding: 0 20px; font-size: 16px; }\r\n}\r\n\r\n@keyframes rc-spin { to { transform: rotate(360deg) } }\r\n</style>\r\n\r\n\r\n\r\n","import type { App } from 'vue';\r\nimport Button from './index.vue';\r\n\r\n// 组件名使用全小写,以 <rc-button> 形式在模板中使用\r\n(Button as any).name = 'rc-button';\r\n\r\nexport function install(app: App) {\r\n app.component((Button as any).name, Button);\r\n return app;\r\n}\r\n\r\n\r\nexport default Button;\r\n","<template>\n <div class=\"rc-desc-item\" :style=\"{ width: computedWidth, flex: `0 0 ${computedWidth}` }\">\n <div class=\"rc-desc-item__label\" :style=\"labelStyle\">\n <slot name=\"label\">\n {{ label }}\n </slot>\n </div>\n <div class=\"rc-desc-item__value\">\n <slot>\n {{ value }}\n </slot>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, Ref } from 'vue';\n\ndefineOptions({ name: 'rc-descriptions-item' });\n\nconst props = withDefaults(defineProps<{\n label?: string | number;\n value?: any;\n labelWidth?: string | number;\n /** 跨越的列数,默认 1,可传字符串数字 */\n span?: number | string;\n}>(), {\n label: '',\n value: '',\n labelWidth: '',\n span: 1,\n});\n\nconst providedWidth = inject<Ref<string>>('rcDescItemWidth', undefined as unknown as Ref<string>);\nconst providedSingleWidth = inject<Ref<string> | string>('rcDescSingleWidth', '' as unknown as Ref<string>);\nconst providedGap = inject<string>('rcDescGap', '0px');\nconst providedGapPx = inject<Ref<number> | number>('rcDescGapPx', 0 as unknown as Ref<number>);\nconst providedColCount = inject<Ref<number> | number>('rcDescColCount', 1 as unknown as Ref<number>);\nconst providedLabelWidth = inject<Ref<string> | string>('rcDescLabelWidth', '' as unknown as Ref<string>);\n\nconst spanNum = computed(() => {\n const n = typeof props.span === 'string' ? parseInt(props.span, 10) : props.span;\n const max = typeof (providedColCount as any)?.value === 'number' ? (providedColCount as any).value : (providedColCount as any);\n const safe = !Number.isNaN(n as number) && (n as number) > 0 ? (n as number) : 1;\n return Math.min(safe, max || 1);\n});\n\nconst computedWidth = computed(() => {\n const n = typeof (providedColCount as any)?.value === 'number' ? (providedColCount as any).value : (providedColCount as any);\n const gapPx = typeof (providedGapPx as any)?.value === 'number' ? (providedGapPx as any).value : (providedGapPx as any);\n const k = spanNum.value;\n if (!n || n <= 1) return '100%';\n if (k >= n) return '100%';\n // 展开为单层 calc:((100% - (n-1)*gap) * k / n + (k-1)*gap)\n const totalGap = (n - 1) * gapPx;\n const interGap = (k - 1) * gapPx;\n return `calc((100% - ${totalGap}px) * ${k} / ${n} + ${interGap}px)`;\n});\n\nconst labelStyle = computed(() => {\n const injected = typeof (providedLabelWidth as any)?.value === 'string'\n ? (providedLabelWidth as any).value\n : (providedLabelWidth as any);\n const w = props.labelWidth !== '' ? props.labelWidth : (injected || '');\n return w ? { width: typeof w === 'number' ? `${w}px` : String(w), flex: '0 0 auto' } : {};\n});\n</script>\n\n<style scoped>\n.rc-desc-item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 6px 0;\n flex: 0 0 auto;\n}\n.rc-desc-item__label {\n color: #666;\n font-size: 14px;\n line-height: 22px;\n /* 不强制最小宽度,交由 label-width 控制 */\n min-width: 0;\n}\n.rc-desc-item__value {\n flex: 1 1 auto;\n font-size: 14px;\n line-height: 22px;\n}\n\n</style>\n\n\n","<template>\n <div class=\"rc-descriptions\">\n <div v-if=\"$slots.title || title\" class=\"rc-descriptions__title\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div class=\"rc-descriptions__body\" :style=\"{ gap: gapStyle }\" ref=\"wrapEl\">\n <template v-if=\"normalizedData.length\">\n <rcDescriptionsItem\n v-for=\"(it, idx) in normalizedData\"\n :key=\"idx\"\n :label=\"it.label\"\n :value=\"it.value\"\n :label-width=\"labelWidth\"\n />\n </template>\n <slot v-else />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, watchEffect } from 'vue';\nimport rcDescriptionsItem from './item.vue';\n\ndefineOptions({ name: 'rc-descriptions' });\n\ntype KeyMap = { key: string; value: string };\n\nconst props = withDefaults(defineProps<{\n title?: string;\n /** 每行展示的列数,支持数字或字符串数字 */\n column?: number | string;\n /** 列间距,支持数字(px)或字符串值,例如 '12px' */\n gap?: number | string;\n /** label 固定宽度,数字代表 px,也可直接传入 '120px' */\n labelWidth?: number | string | '';\n /** 直接通过数据渲染 */\n data?: Array<Record<string, any>>;\n /** data 的字段映射,如 { key: 'label', value: 'value' } */\n keyMap?: KeyMap;\n}>(), {\n column: 2,\n gap: 4,\n labelWidth: '',\n data: () => [],\n});\n\nconst wrapEl = ref<HTMLElement | null>(null);\nconst gapStyle = computed(() => (typeof props.gap === 'number' ? `${props.gap}px` : String(props.gap)));\nconst colCount = computed(() => {\n const n = typeof props.column === 'string' ? Number.parseInt(props.column as string, 10) : (props.column ?? 1);\n return !Number.isNaN(n) && n > 0 ? n : 1;\n});\n\n// compute child item width as percentage string or 'auto'\nconst itemWidth = ref<string>('100%');\nconst singleWidth = ref<string>('100%');\nwatchEffect(() => {\n const n = colCount.value;\n if (n <= 1) {\n itemWidth.value = '100%';\n singleWidth.value = '100%';\n } else {\n // subtract total horizontal gaps from 100%\n const gapPx = typeof props.gap === 'number' ? props.gap : parseFloat(String(props.gap)) || 0;\n const totalGap = (n - 1) * gapPx;\n const base = `calc((100% - ${totalGap}px) / ${n})`;\n singleWidth.value = base;\n itemWidth.value = base;\n }\n});\n\nprovide('rcDescItemWidth', itemWidth);\nprovide('rcDescSingleWidth', singleWidth);\nprovide('rcDescColCount', colCount);\nprovide('rcDescGapPx', computed(() => (typeof props.gap === 'number' ? props.gap : parseFloat(String(props.gap)) || 0)));\nconst labelWidthCss = computed(() => {\n if (props.labelWidth === '' || props.labelWidth === undefined) return '';\n return typeof props.labelWidth === 'number' ? `${props.labelWidth}px` : String(props.labelWidth);\n});\nprovide('rcDescLabelWidth', labelWidthCss);\nprovide('rcDescGap', computed(() => (typeof props.gap === 'number' ? `${props.gap}px` : String(props.gap))));\n\nconst normalizedData = computed(() => {\n const keyK = (props.keyMap?.key ?? 'label') as string;\n const keyV = (props.keyMap?.value ?? 'value') as string;\n if (!props.data?.length) return [];\n return props.data.map((it) => ({\n label: it?.[keyK],\n value: it?.[keyV],\n }));\n});\n\n</script>\n\n<style scoped>\n.rc-descriptions {\n width: 100%;\n}\n.rc-descriptions__title {\n font-weight: 600;\n font-size: 16px;\n margin: 0 0 12px 0;\n}\n.rc-description__row {\n display: contents;\n}\n.rc-descriptions__body {\n display: flex;\n flex-wrap: wrap;\n}\n\n</style>\n\n\n","import type { App } from 'vue';\r\nimport Descriptions from './index.vue';\r\nimport DescriptionsItem from './item.vue';\r\n\r\n(Descriptions as any).name = 'rc-descriptions';\r\n(DescriptionsItem as any).name = 'rc-descriptions-item';\r\n\r\nexport function install(app: App) {\r\n // 同时注册 kebab 与 PascalCase 名称,便于 <rc-descriptions>/<RcDescriptions> 使用\r\n app.component((Descriptions as any).name, Descriptions);\r\n app.component('RcDescriptions', Descriptions);\r\n app.component((DescriptionsItem as any).name, DescriptionsItem);\r\n app.component('RcDescriptionsItem', DescriptionsItem);\r\n return app;\r\n}\r\n\r\nexport const RcDescriptions = Descriptions;\r\nexport const RcDescriptionsItem = DescriptionsItem;\r\n\r\nexport default Descriptions;\r\n\r\n\r\n\r\n","<template>\n <div\n class=\"rc-card\"\n :class=\"[{ 'rc-card--bordered': bordered }]\"\n :style=\"wrapperStyle\"\n >\n <div\n v-if=\"$slots.title || title || $slots.status || status\"\n class=\"rc-card__top\"\n :style=\"{ backgroundColor: topBgColor || 'rgba(29, 133, 252, 0.05)' }\"\n >\n <div class=\"rc-card__title\">\n <slot name=\"title\">\n <span class=\"rc-card__title-text\">{{ title }}</span>\n </slot>\n </div>\n <div class=\"rc-card__status\" v-if=\"$slots.status || status\">\n <slot name=\"status\">\n <span class=\"rc-card__status-text\" :style=\"{ color: statusColor || 'var(--rc-primary)' }\">\n {{ status }}\n </span>\n </slot>\n </div>\n </div>\n\n <div class=\"rc-card__body\" :style=\"{ padding: bodyPadding, gap: bodyGap }\">\n <slot name=\"content\">\n <slot />\n </slot>\n </div>\n\n <div v-if=\"$slots.action\" class=\"rc-card__divider\" />\n\n <div v-if=\"$slots.action\" class=\"rc-card__action\">\n <slot name=\"action\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\ndefineOptions({ name: 'rc-card' });\n\ninterface Props {\n /** 卡片整体背景色,默认白色 */\n color?: string;\n /** 顶部色块背景色 */\n topBgColor?: string;\n /** 标题文本(可用 slot=\"title\" 自定义) */\n title?: string;\n /** 右侧状态文案(可用 slot=\"status\" 自定义) */\n status?: string;\n /** 状态文本颜色 */\n statusColor?: string;\n /** 圆角:数值代表 px,字符串可用百分比 */\n round?: number | string;\n /** 是否描边 */\n bordered?: boolean;\n /** 阴影强度:0/1/2/3... -> 转换为不同阴影强度 */\n elevation?: number;\n /** 内边距(CSS 值,如 '16px 12px') */\n padding?: string;\n /** 主体内容的垂直间距(px 或 CSS 字符串) */\n gap?: number | string;\n /** 宽度(px/百分比) */\n width?: string | number;\n /** 高度(px/百分比) */\n height?: string | number;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n color: 'var(--rc-white)',\n topBgColor: 'rgba(29, 133, 252, 0.05)',\n title: '',\n status: '',\n statusColor: 'var(--rc-primary)',\n round: 8,\n bordered: false,\n elevation: 2,\n padding: '16px',\n gap: 12,\n width: '100%',\n height: '',\n});\n\nconst wrapperStyle = computed(() => {\n const radius =\n typeof props.round === 'boolean'\n ? props.round\n ? '12px'\n : '0'\n : typeof props.round === 'number'\n ? `${props.round}px`\n : String(props.round);\n\n return {\n backgroundColor: props.color || 'var(--rc-white)',\n borderRadius: radius,\n boxShadow: shadowByLevel(props.elevation),\n width: toCssSize(props.width),\n height: toCssSize(props.height),\n } as Record<string, string>;\n});\n\nconst bodyPadding = computed(() => props.padding || '16px');\nconst bodyGap = computed(() =>\n typeof props.gap === 'number' ? `${props.gap}px` : String(props.gap)\n);\n\nfunction toCssSize(v?: string | number) {\n if (v === undefined || v === null || v === '') return '';\n return typeof v === 'number' ? `${v}px` : String(v);\n}\n\nfunction shadowByLevel(level: number) {\n if (!level || level <= 0) return 'none';\n // 简单的多层阴影(可按需微调)\n const base = 4 * level;\n return `0 ${Math.round(base / 2)}px ${base}px rgba(0,0,0,0.06), 0 ${Math.round(\n base / 4\n )}px ${Math.round(base / 2)}px rgba(0,0,0,0.04)`;\n}\n</script>\n\n<style scoped>\n.rc-card {\n --rc-white: #ffffff;\n --rc-border: #e5e6eb;\n --rc-primary: #1677ff;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n border: 1px solid transparent;\n background: var(.rc-white);\n}\n.rc-card--bordered {\n border-color: var(--rc-border);\n}\n\n.rc-card__top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n}\n.rc-card__title {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.rc-card__title-text {\n font-weight: 600;\n font-size: 16px;\n color: #1d2129;\n}\n.rc-card__status-text {\n font-size: 14px;\n}\n.rc-card__body {\n display: flex;\n flex-direction: column;\n}\n.rc-card__divider {\n height: 1px;\n background: var(--rc-border);\n}\n.rc-card__action {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n}\n</style>\n\n\n","import type { App } from 'vue';\r\nimport Card from './index.vue';\r\n\r\n// 同时注册小写与驼峰,便于 <rc-card> / <RcCard> 两种写法\r\n(Card as any).name = 'rc-card';\r\nconst PascalName = 'RcCard';\r\n\r\nexport function install(app: App) {\r\n app.component((Card as any).name, Card);\r\n app.component(PascalName, Card);\r\n return app;\r\n}\r\n\r\nexport default Card;\r\n\r\n\r\n","<template>\r\n <teleport to=\"body\">\r\n <transition name=\"rc-toast-fade\" @after-leave=\"onAfterLeave\">\r\n <div v-if=\"visible\" class=\"rc-toast\" :class=\"[`rc-toast--${type}`]\">\r\n <div v-if=\"mask\" class=\"rc-toast__mask\" />\r\n <div class=\"rc-toast__content\">\r\n <div v-if=\"type === 'loading'\" class=\"rc-toast__spinner\" />\r\n <div v-else-if=\"type === 'success'\" class=\"rc-toast__icon rc-toast__icon--success\" />\r\n <div v-else-if=\"type === 'fail'\" class=\"rc-toast__icon rc-toast__icon--fail\" />\r\n <div class=\"rc-toast__text\">{{ message }}</div>\r\n </div>\r\n </div>\r\n </transition>\r\n </teleport>\r\n <slot />\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, onUnmounted, ref, watch, defineExpose } from 'vue';\r\n\r\nexport type ToastType = 'text' | 'success' | 'fail' | 'loading';\r\nexport interface ToastProps {\r\n message?: string;\r\n type?: ToastType;\r\n duration?: number;\r\n mask?: boolean;\r\n /** 服务端关闭回调,用于卸载容器 */\r\n onAfterLeave?: () => void;\r\n}\r\n\r\nconst props = withDefaults(defineProps<ToastProps>(), {\r\n message: '',\r\n type: 'text',\r\n duration: 2000,\r\n mask: false,\r\n});\r\n\r\nconst visible = ref(true);\r\nlet timer: any;\r\n\r\nfunction clearTimer() {\r\n if (timer) {\r\n clearTimeout(timer);\r\n timer = null;\r\n }\r\n}\r\n\r\nfunction close() {\r\n clearTimer();\r\n visible.value = false;\r\n}\r\n\r\ndefineExpose({ close });\r\n\r\nonMounted(() => {\r\n if (props.duration && props.duration > 0) {\r\n timer = setTimeout(() => {\r\n close();\r\n }, props.duration);\r\n }\r\n});\r\n\r\nonUnmounted(() => {\r\n clearTimer();\r\n});\r\n</script>\r\n\r\n<style scoped>\r\n.rc-toast {\r\n position: fixed;\r\n inset: 0;\r\n z-index: 9999;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n.rc-toast__mask {\r\n position: absolute;\r\n inset: 0;\r\n background: rgba(0, 0, 0, 0.35);\r\n pointer-events: auto;\r\n backdrop-filter: blur(1px);\r\n}\r\n.rc-toast__content {\r\n position: relative;\r\n max-width: 80%;\r\n background: rgba(0, 0, 0, 0.75);\r\n color: #fff;\r\n border-radius: 12px;\r\n padding: 12px 14px;\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 8px;\r\n box-shadow: 0 6px 16px rgba(0,0,0,0.2);\r\n}\r\n.rc-toast__text {\r\n font-size: 14px;\r\n line-height: 1.4;\r\n}\r\n.rc-toast__spinner {\r\n width: 18px;\r\n height: 18px;\r\n border: 2px solid rgba(255,255,255,0.35);\r\n border-top-color: #fff;\r\n border-radius: 50%;\r\n animation: rc-toast-spin 0.8s linear infinite;\r\n}\r\n.rc-toast__icon {\r\n width: 18px;\r\n height: 18px;\r\n border-radius: 50%;\r\n position: relative;\r\n flex: 0 0 18px;\r\n}\r\n.rc-toast__icon--success::before {\r\n content: '';\r\n position: absolute;\r\n left: 3px;\r\n top: 3px;\r\n width: 10px;\r\n height: 10px;\r\n border-right: 2px solid #fff;\r\n border-bottom: 2px solid #fff;\r\n transform: rotate(45deg);\r\n}\r\n.rc-toast__icon--fail::before,\r\n.rc-toast__icon--fail::after {\r\n content: '';\r\n position: absolute;\r\n left: 3px;\r\n right: 3px;\r\n top: 8px;\r\n height: 2px;\r\n background: #fff;\r\n}\r\n.rc-toast__icon--fail::before {\r\n transform: rotate(45deg);\r\n}\r\n.rc-toast__icon--fail::after {\r\n transform: rotate(-45deg);\r\n}\r\n\r\n.rc-toast-fade-enter-active,\r\n.rc-toast-fade-leave-active {\r\n transition: opacity .2s ease;\r\n}\r\n.rc-toast-fade-enter-from,\r\n.rc-toast-fade-leave-to {\r\n opacity: 0;\r\n}\r\n@keyframes rc-toast-spin {\r\n to { transform: rotate(360deg); }\r\n}\r\n</style>\r\n\r\n\r\n","import { App, createApp } from 'vue';\r\nimport Toast, { type ToastProps } from './index.vue';\r\n\r\nexport type { ToastProps };\r\nexport interface ShowToastOptions {\r\n message?: string;\r\n type?: 'text' | 'success' | 'fail' | 'loading';\r\n duration?: number;\r\n mask?: boolean;\r\n /** 关闭时回调(仅服务方式有效) */\r\n onClose?: () => void;\r\n}\r\n\r\nlet app: App<Element> | null = null;\r\nlet host: HTMLDivElement | null = null;\r\n\r\nfunction unmount() {\r\n if (app) {\r\n app.unmount();\r\n app = null;\r\n }\r\n if (host) {\r\n document.body.removeChild(host);\r\n host = null;\r\n }\r\n}\r\n\r\nexport function showToast(options: string | ShowToastOptions) {\r\n const opt: ShowToastOptions =\r\n typeof options === 'string' ? { message: options } : (options || {});\r\n unmount();\r\n host = document.createElement('div');\r\n document.body.appendChild(host);\r\n const toastProps: ToastProps = {\r\n message: opt.message,\r\n type: (opt as any).type ?? 'text',\r\n duration: (opt as any).duration ?? 2000,\r\n mask: (opt as any).mask ?? false,\r\n onAfterLeave: () => {\r\n unmount();\r\n opt.onClose?.();\r\n },\r\n };\r\n app = createApp(Toast, toastProps as any);\r\n app.mount(host);\r\n return {\r\n close: hideToast,\r\n };\r\n}\r\n\r\nexport function hideToast() {\r\n if (!app) return;\r\n // 调用暴露的 close 方法\r\n // @ts-ignore\r\n app._instance?.exposed?.close?.();\r\n}\r\n\r\n// 组件注册(可选,提供 rc-toast 用于手动放置 Portal)\r\n(Toast as any).name = 'rc-toast';\r\nexport function install(app: App) {\r\n app.component((Toast as any).name, Toast);\r\n return app;\r\n}\r\n\r\nexport default Toast;\r\n\r\n\r\n","<template>\r\n <div class=\"rc-message\" role=\"alert\" aria-live=\"polite\">\r\n <transition-group name=\"rc-message-fade\" tag=\"div\">\r\n <div\r\n v-for=\"m in messages\"\r\n :key=\"m.id\"\r\n class=\"rc-message__item\"\r\n :class=\"`rc-message--${m.type}`\"\r\n >\r\n <span class=\"rc-message__content\">{{ m.content }}</span>\r\n </div>\r\n </transition-group>\r\n </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { reactive } from 'vue';\r\n\r\nexport type MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading';\r\nexport interface MessageItem {\r\n id: number;\r\n type: MessageType;\r\n content: string;\r\n duration: number; // ms; 0 = persistent (except loading default)\r\n}\r\n\r\nconst messages = reactive<MessageItem[]>([]);\r\nlet uid = 1;\r\n\r\nfunction remove(id: number) {\r\n const idx = messages.findIndex((x) => x.id === id);\r\n if (idx >= 0) messages.splice(idx, 1);\r\n}\r\n\r\nfunction add(type: MessageType, content: string, duration: number) {\r\n const id = uid++;\r\n messages.push({ id, type, content, duration });\r\n if (duration > 0) {\r\n window.setTimeout(() => remove(id), duration);\r\n }\r\n return id;\r\n}\r\n\r\ndefineExpose({ add, remove });\r\n</script>\r\n\r\n<style scoped>\r\n.rc-message {\r\n position: fixed;\r\n top: 16px;\r\n left: 0;\r\n right: 0;\r\n z-index: 10000;\r\n pointer-events: none;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 8px;\r\n}\r\n.rc-message__item {\r\n pointer-events: auto;\r\n min-width: 120px;\r\n max-width: 80%;\r\n padding: 8px 12px;\r\n border-radius: 6px;\r\n color: #fff;\r\n background: rgba(0, 0, 0, 0.78);\r\n box-shadow: 0 6px 16px rgba(0,0,0,0.2);\r\n font-size: 14px;\r\n}\r\n.rc-message--success { background: rgba(22,119,255,0.9); }\r\n.rc-message--warning { background: rgba(250,173,20,0.95); }\r\n.rc-message--error { background: rgba(245,63,63,0.95); }\r\n.rc-message--info { background: rgba(0,0,0,0.78); }\r\n.rc-message--loading { background: rgba(0,0,0,0.78); }\r\n\r\n.rc-message-fade-enter-active,\r\n.rc-message-fade-leave-active {\r\n transition: all .2s ease;\r\n}\r\n.rc-message-fade-enter-from,\r\n.rc-message-fade-leave-to {\r\n opacity: 0;\r\n transform: translateY(-6px);\r\n}\r\n</style>\r\n\r\n\r\n","import { createVNode, render, type App } from 'vue';\r\nimport MessageHost from './index.vue';\r\n\r\ntype MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading';\r\n\r\nexport interface MessageOptions {\r\n content: string;\r\n duration?: number; // ms; default 2000, loading 默认 0\r\n type?: MessageType;\r\n}\r\n\r\nlet container: HTMLElement | null = null;\r\nlet hostExposed: any = null;\r\n\r\nfunction ensureHost() {\r\n if (container && hostExposed) return;\r\n container = document.createElement('div');\r\n document.body.appendChild(container);\r\n const vnode = createVNode(MessageHost, {});\r\n render(vnode, container);\r\n hostExposed = (vnode.component as any)?.exposed;\r\n}\r\n\r\nfunction open(type: MessageType, content: string, duration?: number) {\r\n ensureHost();\r\n const d = typeof duration === 'number'\r\n ? duration\r\n : (type === 'loading' ? 0 : 2000);\r\n return hostExposed?.add?.(type, content, d);\r\n}\r\n\r\nexport const message = {\r\n open(opts: MessageOptions) {\r\n return open(opts.type || 'info', opts.content, opts.duration);\r\n },\r\n info(content: string, duration?: number) {\r\n return open('info', content, duration);\r\n },\r\n success(content: string, duration?: number) {\r\n return open('success', content, duration);\r\n },\r\n warning(content: string, duration?: number) {\r\n return open('warning', content, duration);\r\n },\r\n error(content: string, duration?: number) {\r\n return open('error', content, duration);\r\n },\r\n loading(content: string, duration?: number) {\r\n return open('loading', content, duration);\r\n },\r\n destroy() {\r\n if (container) {\r\n render(null, container);\r\n container.remove();\r\n container = null;\r\n hostExposed = null;\r\n }\r\n },\r\n};\r\n\r\nexport default message;\r\n\r\n// 可选:提供 install,注入到 app.config.globalProperties 以便 this.$message 使用\r\nexport function install(app: App) {\r\n (app.config.globalProperties as any).$message = message;\r\n return app;\r\n}\r\n\r\n\r\n","<template>\r\n <i\r\n class=\"rc-icon\"\r\n :class=\"[baseClass, iconClassName, { 'rc-icon--spin': spin }]\"\r\n :style=\"iconStyle\"\r\n aria-hidden=\"true\"\r\n >\r\n <span v-if=\"char\" class=\"rc-icon__unicode\">{{ char }}</span>\r\n </i>\r\n </template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, inject, onMounted } from 'vue';\r\nimport type { RecycleUIOptions } from '../../types';\r\nimport { RECYCLE_UI_SYMBOL, defaultRecycleUIConfig } from '../../index';\r\n\r\ndefineOptions({ name: 'rc-icon' });\r\n\r\nconst props = withDefaults(defineProps<{\r\n /** 图标名,例如 'icon_a_in_store',也可直接传完整类名 */\r\n name: string;\r\n /** 尺寸,数字按 px 处理,也可传 '1.2em' 等 */\r\n size?: number | string;\r\n /** 颜色 */\r\n color?: string;\r\n /** 是否旋转(用于 loading 类图标) */\r\n spin?: boolean;\r\n /** Unicode 码点(不带 \\\\u,十六进制,如 'e609' 或 0xe609),用于无类名时渲染 */\r\n code?: string | number;\r\n}>(), {\r\n size: 16,\r\n color: '',\r\n spin: false,\r\n code: '',\r\n});\r\n\r\nconst cfg = inject<RecycleUIOptions>(RECYCLE_UI_SYMBOL, {} as RecycleUIOptions);\r\n\r\nconst baseClass = computed(() => cfg?.iconClass || 'iconfont');\r\nconst iconClassName = computed(() => props.name || '');\r\n\r\nconst sizeCss = computed(() => (typeof props.size === 'number' ? `${props.size}px` : (props.size || '16px')));\r\nconst iconStyle = computed(() => ({\r\n fontSize: sizeCss.value,\r\n color: props.color || undefined,\r\n lineHeight: 1,\r\n fontFamily: cfg?.iconClass || 'iconfont',\r\n}));\r\n\r\n// 将 code 转为字符\r\nconst char = computed(() => {\r\n const c = props.code as any;\r\n if (c === undefined || c === null || c === '' || c === 0) return '';\r\n if (typeof c === 'number') {\r\n return String.fromCharCode(c);\r\n }\r\n const hex = String(c).replace(/^0x/i, '');\r\n const num = parseInt(hex, 16);\r\n if (Number.isNaN(num)) return '';\r\n return String.fromCharCode(num);\r\n});\r\n\r\n// 兜底:若未通过 app.use 安装插件,则在组件挂载时尝试注入默认的 iconfont 样式\r\nonMounted(() => {\r\n if (typeof window === 'undefined') return;\r\n const url = (cfg && cfg.iconCssUrl) || defaultRecycleUIConfig.iconCssUrl;\r\n if (!url) return;\r\n const selector = `link[rel=\"stylesheet\"][data-rcui-icon=\"true\"][href=\"${url}\"]`;\r\n const exists = document.head.querySelector(selector);\r\n if (!exists) {\r\n const link = document.createElement('link');\r\n link.rel = 'stylesheet';\r\n link.href = url as string;\r\n link.setAttribute('data-rcui-icon', 'true');\r\n document.head.appendChild(link);\r\n }\r\n});\r\n</script>\r\n\r\n<style scoped>\r\n.rc-icon {\r\n display: inline-block;\r\n vertical-align: -0.125em;\r\n}\r\n.rc-icon__unicode {\r\n /* 让 Unicode 文本走同一字体,确保显示 */\r\n font-family: inherit;\r\n line-height: 1;\r\n}\r\n.rc-icon--spin {\r\n animation: rc-icon-rot 1s linear infinite;\r\n}\r\n@keyframes rc-icon-rot {\r\n to { transform: rotate(360deg); }\r\n}\r\n</style>\r\n\r\n\r\n","import type { App } from 'vue';\r\nimport Icon from './index.vue';\r\n\r\n(Icon as any).name = 'rc-icon';\r\n\r\nexport function install(app: App) {\r\n app.component((Icon as any).name, Icon);\r\n app.component('RcIcon', Icon);\r\n return app;\r\n}\r\n\r\nexport const RcIcon = Icon;\r\nexport default Icon;\r\n\r\n\r\n","// library entry\r\nimport type { App, Plugin } from 'vue';\r\nimport { install as installButton } from './components/button';\r\nimport { install as installDescriptions } from './components/descriptions';\r\nimport { install as installCard } from './components/card';\r\nimport { install as installToast } from './components/toast';\r\nimport { install as installMessage } from './components/message';\r\nimport { install as installIcon } from './components/icon/index';\r\nimport type { RecycleUIOptions } from './types';\r\n\r\nexport const RECYCLE_UI_SYMBOL = Symbol('RECYCLE_UI_CONFIG');\r\n\r\nexport const defaultRecycleUIConfig: RecycleUIOptions = {\r\n prefix: 'rc',\r\n autoRegister: true,\r\n provideKey: RECYCLE_UI_SYMBOL,\r\n // 预留主题/其他全局配置\r\n theme: {},\r\n // IconFont 默认配置(可在 app.use 时覆盖)\r\n iconCssUrl: '//at.alicdn.com/t/c/font_4252799_9vcnw0pnmkh.css',\r\n iconClass: 'iconfont',\r\n};\r\n\r\nfunction doAutoRegister(app: App, opts: RecycleUIOptions) {\r\n if (opts.autoRegister === false) return;\r\n if (typeof installButton === 'function') installButton(app);\r\n if (typeof installDescriptions === 'function') installDescriptions(app);\r\n if (typeof installCard === 'function') installCard(app);\r\n if (typeof installToast === 'function') installToast(app);\r\n if (typeof installIcon === 'function') installIcon(app);\r\n if (typeof installMessage === 'function') installMessage(app);\r\n}\r\n\r\nexport const install = (app: App, options?: RecycleUIOptions) => {\r\n const cfg: RecycleUIOptions = { ...defaultRecycleUIConfig, ...(options || {}) };\r\n // 提供全局配置\r\n app.provide(cfg.provideKey ?? RECYCLE_UI_SYMBOL, cfg);\r\n // 供模板/实例访问:this.$recycleUI\r\n (app.config.globalProperties as any).$recycleUI = cfg;\r\n // 注入 IconFont 样式链接(浏览器环境)\r\n if (typeof window !== 'undefined' && cfg.iconCssUrl) {\r\n const selector = `link[rel=\"stylesheet\"][data-rcui-icon=\"true\"][href=\"${cfg.iconCssUrl}\"]`;\r\n const exists = document.head.querySelector(selector);\r\n if (!exists) {\r\n const link = document.createElement('link');\r\n link.rel = 'stylesheet';\r\n link.href = cfg.iconCssUrl;\r\n link.setAttribute('data-rcui-icon', 'true');\r\n document.head.appendChild(link);\r\n }\r\n }\r\n // 自动注册内置组件(可通过 autoRegister 关闭)\r\n doAutoRegister(app, cfg);\r\n return app;\r\n};\r\n\r\n// 默认导出为插件,支持 app.use(recycleUi, options)\r\nconst plugin: Plugin = { install };\r\nexport default plugin;\r\n\r\n// 也导出命名组件安装器与默认配置(defaultRecycleUIConfig 已在上方以常量形式导出)\r\n\r\n// 可选:工厂方法,便于创建带预设配置的插件\r\nexport function createRecycleUI(options?: RecycleUIOptions): Plugin {\r\n return {\r\n install(app: App) {\r\n install(app, options);\r\n },\r\n };\r\n}\r\n\r\n// 按需导出组件与其安装器(供文档与业务直接使用)\r\nexport { default as RcButton } from './components/button';\r\nexport { RcDescriptions, RcDescriptionsItem } from './components/descriptions';\r\nexport { install as installButton } from './components/button';\r\nexport { install as installDescriptions } from './components/descriptions';\r\nexport { default as RcCard } from './components/card';\r\nexport { install as installCard } from './components/card';\r\n// 兼容别名导出(文档示例中的 rcXxx)\r\nexport { RcDescriptions as rcDescriptions, RcDescriptionsItem as rcDescriptionsItem } from './components/descriptions';\r\n// Toast 服务导出\r\nexport { default as RcToast, showToast, hideToast } from './components/toast';\r\n// Icon 组件导出\r\nexport { default as RcIcon } from './components/icon/index';\r\nexport { install as installIcon } from './components/icon/index';\r\n// Message 服务(对标 antd 的 message)\r\nexport { default as message } from './components/message';\r\nexport { install as installMessage } from './components/message';\r\n"],"names":["props","__props","emit","__emit","onClick","ev","radius","computed","v","_createElementBlock","_normalizeClass","_openBlock","_hoisted_2","_renderSlot","_ctx","Button","install","app","inject","providedGapPx","providedColCount","providedLabelWidth","spanNum","n","max","safe","computedWidth","gapPx","k","totalGap","interGap","labelStyle","injected","w","_normalizeStyle","_createElementVNode","_hoisted_1","wrapEl","ref","gapStyle","colCount","itemWidth","singleWidth","watchEffect","base","provide","labelWidthCss","normalizedData","keyK","_a","keyV","_b","_c","it","$slots","_Fragment","_renderList","idx","_createBlock","rcDescriptionsItem","Descriptions","DescriptionsItem","RcDescriptions","RcDescriptionsItem","wrapperStyle","shadowByLevel","toCssSize","bodyPadding","bodyGap","level","_toDisplayString","_hoisted_3","_hoisted_4","_hoisted_5","Card","PascalName","visible","timer","clearTimer","close","__expose","onMounted","onUnmounted","_Teleport","_createVNode","_Transition","_hoisted_6","host","unmount","showToast","options","opt","toastProps","createApp","Toast","hideToast","messages","reactive","uid","remove","id","x","add","type","content","duration","_TransitionGroup","m","container","hostExposed","ensureHost","vnode","createVNode","MessageHost","render","open","d","message","opts","cfg","RECYCLE_UI_SYMBOL","baseClass","iconClassName","sizeCss","iconStyle","char","hex","num","url","defaultRecycleUIConfig","selector","link","Icon","doAutoRegister","installButton","installDescriptions","installCard","installToast","installIcon","installMessage","plugin","createRecycleUI"],"mappings":"6fA+BA,MAAMA,EAAQC,EAWRC,EAAOC,EAIPC,EAAWC,GAAmB,CAC9B,CAACL,EAAM,UAAY,CAACA,EAAM,SAASE,EAAK,QAASG,CAAE,CACzD,EAEMC,EAASC,EAAAA,SAAS,IAAM,CAC5B,MAAMC,EAAIR,EAAM,MAChB,OAAI,OAAOQ,GAAM,UAAkBA,EAAI,QAAU,MAC7C,OAAOA,GAAM,SAAiB,GAAGA,CAAC,KAC/B,OAAOA,CAAC,CACjB,CAAC,8BAtDCC,EAAAA,mBASS,SAAA,CARP,MAAKC,EAAAA,eAAA,CAAC,YAAW,CAAA,cACMT,EAAA,IAAI,GAAA,cAAkBA,EAAA,IAAI,GAAA,CAAA,WAAkBA,EAAA,MAAK,WAAcA,EAAA,MAAK,cAAiBA,EAAA,sBAAwBA,EAAA,OAAA,CAAO,CAAA,CAAA,EAC1I,qCAAuBK,EAAA,MAAM,EAC7B,SAAUL,EAAA,UAAYA,EAAA,QACtB,QAAAG,CAAA,GAEWH,EAAA,SAAZU,EAAAA,UAAA,EAAAF,EAAAA,mBAAkD,OAAlDG,CAAkD,+BAClDC,EAAAA,WAAwBC,sBAAxB,IAAwB,qCAAfb,EAAA,KAAK,EAAA,CAAA,CAAA,+HCLjBc,EAAe,KAAO,YAEhB,SAASC,EAAQC,EAAU,CAChC,OAAAA,EAAI,UAAWF,EAAe,KAAMA,CAAM,EACnCE,CACT,sMCWA,MAAMjB,EAAQC,EAaQiB,EAAAA,OAAoB,kBAAmB,MAAmC,EACpEA,EAAAA,OAA6B,oBAAqB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, normalizeStyle as h, normalizeClass as z, createCommentVNode as g, renderSlot as y, createTextVNode as M, toDisplayString as _, inject as x, createElementVNode as b, ref as T, watchEffect as oe, provide as D, Fragment as A, renderList as Q, createBlock as X, onMounted as Z, onUnmounted as ae, Teleport as ce, createVNode as P, Transition as re, withCtx as ee, createApp as le, reactive as ie, TransitionGroup as ue, render as te } from "vue";
|
|
2
|
+
const de = ["disabled"], fe = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "rc-button__spinner"
|
|
5
|
+
}, me = /* @__PURE__ */ S({
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
type: { default: "default" },
|
|
9
|
+
size: { default: "medium" },
|
|
10
|
+
plain: { type: Boolean, default: !1 },
|
|
11
|
+
block: { type: Boolean, default: !1 },
|
|
12
|
+
label: { default: "" },
|
|
13
|
+
round: { type: [Number, String, Boolean], default: 6 },
|
|
14
|
+
disabled: { type: Boolean, default: !1 },
|
|
15
|
+
loading: { type: Boolean, default: !1 }
|
|
16
|
+
},
|
|
17
|
+
emits: ["click"],
|
|
18
|
+
setup(e, { emit: t }) {
|
|
19
|
+
const n = e, c = t, r = (l) => {
|
|
20
|
+
!n.disabled && !n.loading && c("click", l);
|
|
21
|
+
}, u = f(() => {
|
|
22
|
+
const l = n.round;
|
|
23
|
+
return typeof l == "boolean" ? l ? "999px" : "6px" : typeof l == "number" ? `${l}px` : String(l);
|
|
24
|
+
});
|
|
25
|
+
return (l, o) => (i(), d("button", {
|
|
26
|
+
class: z(["rc-button", [`rc-button--${e.type}`, `rc-button--${e.size}`, { "is-plain": e.plain, "is-block": e.block, "is-disabled": e.disabled, "is-loading": e.loading }]]),
|
|
27
|
+
style: h({ borderRadius: u.value }),
|
|
28
|
+
disabled: e.disabled || e.loading,
|
|
29
|
+
onClick: r
|
|
30
|
+
}, [
|
|
31
|
+
e.loading ? (i(), d("span", fe)) : g("", !0),
|
|
32
|
+
y(l.$slots, "default", {}, () => [
|
|
33
|
+
M(_(e.label), 1)
|
|
34
|
+
], !0)
|
|
35
|
+
], 14, de));
|
|
36
|
+
}
|
|
37
|
+
}), w = (e, t) => {
|
|
38
|
+
const n = e.__vccOpts || e;
|
|
39
|
+
for (const [c, r] of t)
|
|
40
|
+
n[c] = r;
|
|
41
|
+
return n;
|
|
42
|
+
}, G = /* @__PURE__ */ w(me, [["__scopeId", "data-v-a70e95bb"]]);
|
|
43
|
+
G.name = "rc-button";
|
|
44
|
+
function H(e) {
|
|
45
|
+
return e.component(G.name, G), e;
|
|
46
|
+
}
|
|
47
|
+
const pe = { class: "rc-desc-item__value" }, ye = /* @__PURE__ */ S({
|
|
48
|
+
name: "rc-descriptions-item",
|
|
49
|
+
__name: "item",
|
|
50
|
+
props: {
|
|
51
|
+
label: { default: "" },
|
|
52
|
+
value: { default: "" },
|
|
53
|
+
labelWidth: { default: "" },
|
|
54
|
+
span: { default: 1 }
|
|
55
|
+
},
|
|
56
|
+
setup(e) {
|
|
57
|
+
const t = e;
|
|
58
|
+
x("rcDescItemWidth", void 0), x("rcDescSingleWidth", ""), x("rcDescGap", "0px");
|
|
59
|
+
const n = x("rcDescGapPx", 0), c = x("rcDescColCount", 1), r = x("rcDescLabelWidth", ""), u = f(() => {
|
|
60
|
+
const s = typeof t.span == "string" ? parseInt(t.span, 10) : t.span, a = typeof (c == null ? void 0 : c.value) == "number" ? c.value : c, m = !Number.isNaN(s) && s > 0 ? s : 1;
|
|
61
|
+
return Math.min(m, a || 1);
|
|
62
|
+
}), l = f(() => {
|
|
63
|
+
const s = typeof (c == null ? void 0 : c.value) == "number" ? c.value : c, a = typeof (n == null ? void 0 : n.value) == "number" ? n.value : n, m = u.value;
|
|
64
|
+
if (!s || s <= 1 || m >= s) return "100%";
|
|
65
|
+
const p = (s - 1) * a, v = (m - 1) * a;
|
|
66
|
+
return `calc((100% - ${p}px) * ${m} / ${s} + ${v}px)`;
|
|
67
|
+
}), o = f(() => {
|
|
68
|
+
const s = typeof (r == null ? void 0 : r.value) == "string" ? r.value : r, a = t.labelWidth !== "" ? t.labelWidth : s || "";
|
|
69
|
+
return a ? { width: typeof a == "number" ? `${a}px` : String(a), flex: "0 0 auto" } : {};
|
|
70
|
+
});
|
|
71
|
+
return (s, a) => (i(), d("div", {
|
|
72
|
+
class: "rc-desc-item",
|
|
73
|
+
style: h({ width: l.value, flex: `0 0 ${l.value}` })
|
|
74
|
+
}, [
|
|
75
|
+
b("div", {
|
|
76
|
+
class: "rc-desc-item__label",
|
|
77
|
+
style: h(o.value)
|
|
78
|
+
}, [
|
|
79
|
+
y(s.$slots, "label", {}, () => [
|
|
80
|
+
M(_(e.label), 1)
|
|
81
|
+
], !0)
|
|
82
|
+
], 4),
|
|
83
|
+
b("div", pe, [
|
|
84
|
+
y(s.$slots, "default", {}, () => [
|
|
85
|
+
M(_(e.value), 1)
|
|
86
|
+
], !0)
|
|
87
|
+
])
|
|
88
|
+
], 4));
|
|
89
|
+
}
|
|
90
|
+
}), R = /* @__PURE__ */ w(ye, [["__scopeId", "data-v-970d0b99"]]), ge = { class: "rc-descriptions" }, be = {
|
|
91
|
+
key: 0,
|
|
92
|
+
class: "rc-descriptions__title"
|
|
93
|
+
}, ve = /* @__PURE__ */ S({
|
|
94
|
+
name: "rc-descriptions",
|
|
95
|
+
__name: "index",
|
|
96
|
+
props: {
|
|
97
|
+
title: {},
|
|
98
|
+
column: { default: 2 },
|
|
99
|
+
gap: { default: 4 },
|
|
100
|
+
labelWidth: { default: "" },
|
|
101
|
+
data: { default: () => [] },
|
|
102
|
+
keyMap: {}
|
|
103
|
+
},
|
|
104
|
+
setup(e) {
|
|
105
|
+
const t = e, n = T(null), c = f(() => typeof t.gap == "number" ? `${t.gap}px` : String(t.gap)), r = f(() => {
|
|
106
|
+
const a = typeof t.column == "string" ? Number.parseInt(t.column, 10) : t.column ?? 1;
|
|
107
|
+
return !Number.isNaN(a) && a > 0 ? a : 1;
|
|
108
|
+
}), u = T("100%"), l = T("100%");
|
|
109
|
+
oe(() => {
|
|
110
|
+
const a = r.value;
|
|
111
|
+
if (a <= 1)
|
|
112
|
+
u.value = "100%", l.value = "100%";
|
|
113
|
+
else {
|
|
114
|
+
const m = typeof t.gap == "number" ? t.gap : parseFloat(String(t.gap)) || 0, v = `calc((100% - ${(a - 1) * m}px) / ${a})`;
|
|
115
|
+
l.value = v, u.value = v;
|
|
116
|
+
}
|
|
117
|
+
}), D("rcDescItemWidth", u), D("rcDescSingleWidth", l), D("rcDescColCount", r), D("rcDescGapPx", f(() => typeof t.gap == "number" ? t.gap : parseFloat(String(t.gap)) || 0));
|
|
118
|
+
const o = f(() => t.labelWidth === "" || t.labelWidth === void 0 ? "" : typeof t.labelWidth == "number" ? `${t.labelWidth}px` : String(t.labelWidth));
|
|
119
|
+
D("rcDescLabelWidth", o), D("rcDescGap", f(() => typeof t.gap == "number" ? `${t.gap}px` : String(t.gap)));
|
|
120
|
+
const s = f(() => {
|
|
121
|
+
var p, v, V;
|
|
122
|
+
const a = ((p = t.keyMap) == null ? void 0 : p.key) ?? "label", m = ((v = t.keyMap) == null ? void 0 : v.value) ?? "value";
|
|
123
|
+
return (V = t.data) != null && V.length ? t.data.map((I) => ({
|
|
124
|
+
label: I == null ? void 0 : I[a],
|
|
125
|
+
value: I == null ? void 0 : I[m]
|
|
126
|
+
})) : [];
|
|
127
|
+
});
|
|
128
|
+
return (a, m) => (i(), d("div", ge, [
|
|
129
|
+
a.$slots.title || e.title ? (i(), d("div", be, [
|
|
130
|
+
y(a.$slots, "title", {}, () => [
|
|
131
|
+
M(_(e.title), 1)
|
|
132
|
+
], !0)
|
|
133
|
+
])) : g("", !0),
|
|
134
|
+
b("div", {
|
|
135
|
+
class: "rc-descriptions__body",
|
|
136
|
+
style: h({ gap: c.value }),
|
|
137
|
+
ref_key: "wrapEl",
|
|
138
|
+
ref: n
|
|
139
|
+
}, [
|
|
140
|
+
s.value.length ? (i(!0), d(A, { key: 0 }, Q(s.value, (p, v) => (i(), X(R, {
|
|
141
|
+
key: v,
|
|
142
|
+
label: p.label,
|
|
143
|
+
value: p.value,
|
|
144
|
+
"label-width": e.labelWidth
|
|
145
|
+
}, null, 8, ["label", "value", "label-width"]))), 128)) : y(a.$slots, "default", { key: 1 }, void 0, !0)
|
|
146
|
+
], 4)
|
|
147
|
+
]));
|
|
148
|
+
}
|
|
149
|
+
}), B = /* @__PURE__ */ w(ve, [["__scopeId", "data-v-5fcaa235"]]);
|
|
150
|
+
B.name = "rc-descriptions";
|
|
151
|
+
R.name = "rc-descriptions-item";
|
|
152
|
+
function K(e) {
|
|
153
|
+
return e.component(B.name, B), e.component("RcDescriptions", B), e.component(R.name, R), e.component("RcDescriptionsItem", R), e;
|
|
154
|
+
}
|
|
155
|
+
const He = B, Ke = R, he = { class: "rc-card__title" }, _e = { class: "rc-card__title-text" }, $e = {
|
|
156
|
+
key: 0,
|
|
157
|
+
class: "rc-card__status"
|
|
158
|
+
}, ke = {
|
|
159
|
+
key: 1,
|
|
160
|
+
class: "rc-card__divider"
|
|
161
|
+
}, xe = {
|
|
162
|
+
key: 2,
|
|
163
|
+
class: "rc-card__action"
|
|
164
|
+
}, Ce = /* @__PURE__ */ S({
|
|
165
|
+
name: "rc-card",
|
|
166
|
+
__name: "index",
|
|
167
|
+
props: {
|
|
168
|
+
color: { default: "var(--rc-white)" },
|
|
169
|
+
topBgColor: { default: "rgba(29, 133, 252, 0.05)" },
|
|
170
|
+
title: { default: "" },
|
|
171
|
+
status: { default: "" },
|
|
172
|
+
statusColor: { default: "var(--rc-primary)" },
|
|
173
|
+
round: { default: 8 },
|
|
174
|
+
bordered: { type: Boolean, default: !1 },
|
|
175
|
+
elevation: { default: 2 },
|
|
176
|
+
padding: { default: "16px" },
|
|
177
|
+
gap: { default: 12 },
|
|
178
|
+
width: { default: "100%" },
|
|
179
|
+
height: { default: "" }
|
|
180
|
+
},
|
|
181
|
+
setup(e) {
|
|
182
|
+
const t = e, n = f(() => {
|
|
183
|
+
const o = typeof t.round == "boolean" ? t.round ? "12px" : "0" : typeof t.round == "number" ? `${t.round}px` : String(t.round);
|
|
184
|
+
return {
|
|
185
|
+
backgroundColor: t.color || "var(--rc-white)",
|
|
186
|
+
borderRadius: o,
|
|
187
|
+
boxShadow: l(t.elevation),
|
|
188
|
+
width: u(t.width),
|
|
189
|
+
height: u(t.height)
|
|
190
|
+
};
|
|
191
|
+
}), c = f(() => t.padding || "16px"), r = f(
|
|
192
|
+
() => typeof t.gap == "number" ? `${t.gap}px` : String(t.gap)
|
|
193
|
+
);
|
|
194
|
+
function u(o) {
|
|
195
|
+
return o == null || o === "" ? "" : typeof o == "number" ? `${o}px` : String(o);
|
|
196
|
+
}
|
|
197
|
+
function l(o) {
|
|
198
|
+
if (!o || o <= 0) return "none";
|
|
199
|
+
const s = 4 * o;
|
|
200
|
+
return `0 ${Math.round(s / 2)}px ${s}px rgba(0,0,0,0.06), 0 ${Math.round(
|
|
201
|
+
s / 4
|
|
202
|
+
)}px ${Math.round(s / 2)}px rgba(0,0,0,0.04)`;
|
|
203
|
+
}
|
|
204
|
+
return (o, s) => (i(), d("div", {
|
|
205
|
+
class: z(["rc-card", [{ "rc-card--bordered": e.bordered }]]),
|
|
206
|
+
style: h(n.value)
|
|
207
|
+
}, [
|
|
208
|
+
o.$slots.title || e.title || o.$slots.status || e.status ? (i(), d("div", {
|
|
209
|
+
key: 0,
|
|
210
|
+
class: "rc-card__top",
|
|
211
|
+
style: h({ backgroundColor: e.topBgColor || "rgba(29, 133, 252, 0.05)" })
|
|
212
|
+
}, [
|
|
213
|
+
b("div", he, [
|
|
214
|
+
y(o.$slots, "title", {}, () => [
|
|
215
|
+
b("span", _e, _(e.title), 1)
|
|
216
|
+
], !0)
|
|
217
|
+
]),
|
|
218
|
+
o.$slots.status || e.status ? (i(), d("div", $e, [
|
|
219
|
+
y(o.$slots, "status", {}, () => [
|
|
220
|
+
b("span", {
|
|
221
|
+
class: "rc-card__status-text",
|
|
222
|
+
style: h({ color: e.statusColor || "var(--rc-primary)" })
|
|
223
|
+
}, _(e.status), 5)
|
|
224
|
+
], !0)
|
|
225
|
+
])) : g("", !0)
|
|
226
|
+
], 4)) : g("", !0),
|
|
227
|
+
b("div", {
|
|
228
|
+
class: "rc-card__body",
|
|
229
|
+
style: h({ padding: c.value, gap: r.value })
|
|
230
|
+
}, [
|
|
231
|
+
y(o.$slots, "content", {}, () => [
|
|
232
|
+
y(o.$slots, "default", {}, void 0, !0)
|
|
233
|
+
], !0)
|
|
234
|
+
], 4),
|
|
235
|
+
o.$slots.action ? (i(), d("div", ke)) : g("", !0),
|
|
236
|
+
o.$slots.action ? (i(), d("div", xe, [
|
|
237
|
+
y(o.$slots, "action", {}, void 0, !0)
|
|
238
|
+
])) : g("", !0)
|
|
239
|
+
], 6));
|
|
240
|
+
}
|
|
241
|
+
}), U = /* @__PURE__ */ w(Ce, [["__scopeId", "data-v-a7b95214"]]);
|
|
242
|
+
U.name = "rc-card";
|
|
243
|
+
const Se = "RcCard";
|
|
244
|
+
function O(e) {
|
|
245
|
+
return e.component(U.name, U), e.component(Se, U), e;
|
|
246
|
+
}
|
|
247
|
+
const we = {
|
|
248
|
+
key: 0,
|
|
249
|
+
class: "rc-toast__mask"
|
|
250
|
+
}, Ie = { class: "rc-toast__content" }, De = {
|
|
251
|
+
key: 0,
|
|
252
|
+
class: "rc-toast__spinner"
|
|
253
|
+
}, Ne = {
|
|
254
|
+
key: 1,
|
|
255
|
+
class: "rc-toast__icon rc-toast__icon--success"
|
|
256
|
+
}, Re = {
|
|
257
|
+
key: 2,
|
|
258
|
+
class: "rc-toast__icon rc-toast__icon--fail"
|
|
259
|
+
}, We = { class: "rc-toast__text" }, Be = /* @__PURE__ */ S({
|
|
260
|
+
__name: "index",
|
|
261
|
+
props: {
|
|
262
|
+
message: { default: "" },
|
|
263
|
+
type: { default: "text" },
|
|
264
|
+
duration: { default: 2e3 },
|
|
265
|
+
mask: { type: Boolean, default: !1 },
|
|
266
|
+
onAfterLeave: {}
|
|
267
|
+
},
|
|
268
|
+
setup(e, { expose: t }) {
|
|
269
|
+
const n = e, c = T(!0);
|
|
270
|
+
let r;
|
|
271
|
+
function u() {
|
|
272
|
+
r && (clearTimeout(r), r = null);
|
|
273
|
+
}
|
|
274
|
+
function l() {
|
|
275
|
+
u(), c.value = !1;
|
|
276
|
+
}
|
|
277
|
+
return t({ close: l }), Z(() => {
|
|
278
|
+
n.duration && n.duration > 0 && (r = setTimeout(() => {
|
|
279
|
+
l();
|
|
280
|
+
}, n.duration));
|
|
281
|
+
}), ae(() => {
|
|
282
|
+
u();
|
|
283
|
+
}), (o, s) => (i(), d(A, null, [
|
|
284
|
+
(i(), X(ce, { to: "body" }, [
|
|
285
|
+
P(re, {
|
|
286
|
+
name: "rc-toast-fade",
|
|
287
|
+
onAfterLeave: e.onAfterLeave
|
|
288
|
+
}, {
|
|
289
|
+
default: ee(() => [
|
|
290
|
+
c.value ? (i(), d("div", {
|
|
291
|
+
key: 0,
|
|
292
|
+
class: z(["rc-toast", [`rc-toast--${e.type}`]])
|
|
293
|
+
}, [
|
|
294
|
+
e.mask ? (i(), d("div", we)) : g("", !0),
|
|
295
|
+
b("div", Ie, [
|
|
296
|
+
e.type === "loading" ? (i(), d("div", De)) : e.type === "success" ? (i(), d("div", Ne)) : e.type === "fail" ? (i(), d("div", Re)) : g("", !0),
|
|
297
|
+
b("div", We, _(e.message), 1)
|
|
298
|
+
])
|
|
299
|
+
], 2)) : g("", !0)
|
|
300
|
+
]),
|
|
301
|
+
_: 1
|
|
302
|
+
}, 8, ["onAfterLeave"])
|
|
303
|
+
])),
|
|
304
|
+
y(o.$slots, "default", {}, void 0, !0)
|
|
305
|
+
], 64));
|
|
306
|
+
}
|
|
307
|
+
}), E = /* @__PURE__ */ w(Be, [["__scopeId", "data-v-d234c9c5"]]);
|
|
308
|
+
let C = null, W = null;
|
|
309
|
+
function Y() {
|
|
310
|
+
C && (C.unmount(), C = null), W && (document.body.removeChild(W), W = null);
|
|
311
|
+
}
|
|
312
|
+
function Oe(e) {
|
|
313
|
+
const t = typeof e == "string" ? { message: e } : e || {};
|
|
314
|
+
Y(), W = document.createElement("div"), document.body.appendChild(W);
|
|
315
|
+
const n = {
|
|
316
|
+
message: t.message,
|
|
317
|
+
type: t.type ?? "text",
|
|
318
|
+
duration: t.duration ?? 2e3,
|
|
319
|
+
mask: t.mask ?? !1,
|
|
320
|
+
onAfterLeave: () => {
|
|
321
|
+
var c;
|
|
322
|
+
Y(), (c = t.onClose) == null || c.call(t);
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
return C = le(E, n), C.mount(W), {
|
|
326
|
+
close: ze
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
function ze() {
|
|
330
|
+
var e, t, n;
|
|
331
|
+
C && ((n = (t = (e = C._instance) == null ? void 0 : e.exposed) == null ? void 0 : t.close) == null || n.call(t));
|
|
332
|
+
}
|
|
333
|
+
E.name = "rc-toast";
|
|
334
|
+
function j(e) {
|
|
335
|
+
return e.component(E.name, E), e;
|
|
336
|
+
}
|
|
337
|
+
const Te = {
|
|
338
|
+
class: "rc-message",
|
|
339
|
+
role: "alert",
|
|
340
|
+
"aria-live": "polite"
|
|
341
|
+
}, Ue = { class: "rc-message__content" }, Le = /* @__PURE__ */ S({
|
|
342
|
+
__name: "index",
|
|
343
|
+
setup(e, { expose: t }) {
|
|
344
|
+
const n = ie([]);
|
|
345
|
+
let c = 1;
|
|
346
|
+
function r(l) {
|
|
347
|
+
const o = n.findIndex((s) => s.id === l);
|
|
348
|
+
o >= 0 && n.splice(o, 1);
|
|
349
|
+
}
|
|
350
|
+
function u(l, o, s) {
|
|
351
|
+
const a = c++;
|
|
352
|
+
return n.push({ id: a, type: l, content: o, duration: s }), s > 0 && window.setTimeout(() => r(a), s), a;
|
|
353
|
+
}
|
|
354
|
+
return t({ add: u, remove: r }), (l, o) => (i(), d("div", Te, [
|
|
355
|
+
P(ue, {
|
|
356
|
+
name: "rc-message-fade",
|
|
357
|
+
tag: "div"
|
|
358
|
+
}, {
|
|
359
|
+
default: ee(() => [
|
|
360
|
+
(i(!0), d(A, null, Q(n, (s) => (i(), d("div", {
|
|
361
|
+
key: s.id,
|
|
362
|
+
class: z(["rc-message__item", `rc-message--${s.type}`])
|
|
363
|
+
}, [
|
|
364
|
+
b("span", Ue, _(s.content), 1)
|
|
365
|
+
], 2))), 128))
|
|
366
|
+
]),
|
|
367
|
+
_: 1
|
|
368
|
+
})
|
|
369
|
+
]));
|
|
370
|
+
}
|
|
371
|
+
}), Me = /* @__PURE__ */ w(Le, [["__scopeId", "data-v-87811df0"]]);
|
|
372
|
+
let k = null, $ = null;
|
|
373
|
+
function Ee() {
|
|
374
|
+
var t;
|
|
375
|
+
if (k && $) return;
|
|
376
|
+
k = document.createElement("div"), document.body.appendChild(k);
|
|
377
|
+
const e = P(Me, {});
|
|
378
|
+
te(e, k), $ = (t = e.component) == null ? void 0 : t.exposed;
|
|
379
|
+
}
|
|
380
|
+
function N(e, t, n) {
|
|
381
|
+
var r;
|
|
382
|
+
Ee();
|
|
383
|
+
const c = typeof n == "number" ? n : e === "loading" ? 0 : 2e3;
|
|
384
|
+
return (r = $ == null ? void 0 : $.add) == null ? void 0 : r.call($, e, t, c);
|
|
385
|
+
}
|
|
386
|
+
const Ge = {
|
|
387
|
+
open(e) {
|
|
388
|
+
return N(e.type || "info", e.content, e.duration);
|
|
389
|
+
},
|
|
390
|
+
info(e, t) {
|
|
391
|
+
return N("info", e, t);
|
|
392
|
+
},
|
|
393
|
+
success(e, t) {
|
|
394
|
+
return N("success", e, t);
|
|
395
|
+
},
|
|
396
|
+
warning(e, t) {
|
|
397
|
+
return N("warning", e, t);
|
|
398
|
+
},
|
|
399
|
+
error(e, t) {
|
|
400
|
+
return N("error", e, t);
|
|
401
|
+
},
|
|
402
|
+
loading(e, t) {
|
|
403
|
+
return N("loading", e, t);
|
|
404
|
+
},
|
|
405
|
+
destroy() {
|
|
406
|
+
k && (te(null, k), k.remove(), k = null, $ = null);
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
function q(e) {
|
|
410
|
+
return e.config.globalProperties.$message = Ge, e;
|
|
411
|
+
}
|
|
412
|
+
const Ae = {
|
|
413
|
+
key: 0,
|
|
414
|
+
class: "rc-icon__unicode"
|
|
415
|
+
}, Pe = /* @__PURE__ */ S({
|
|
416
|
+
name: "rc-icon",
|
|
417
|
+
__name: "index",
|
|
418
|
+
props: {
|
|
419
|
+
name: {},
|
|
420
|
+
size: { default: 16 },
|
|
421
|
+
color: { default: "" },
|
|
422
|
+
spin: { type: Boolean, default: !1 },
|
|
423
|
+
code: { default: "" }
|
|
424
|
+
},
|
|
425
|
+
setup(e) {
|
|
426
|
+
const t = e, n = x(F, {}), c = f(() => (n == null ? void 0 : n.iconClass) || "iconfont"), r = f(() => t.name || ""), u = f(() => typeof t.size == "number" ? `${t.size}px` : t.size || "16px"), l = f(() => ({
|
|
427
|
+
fontSize: u.value,
|
|
428
|
+
color: t.color || void 0,
|
|
429
|
+
lineHeight: 1,
|
|
430
|
+
fontFamily: (n == null ? void 0 : n.iconClass) || "iconfont"
|
|
431
|
+
})), o = f(() => {
|
|
432
|
+
const s = t.code;
|
|
433
|
+
if (s == null || s === "" || s === 0) return "";
|
|
434
|
+
if (typeof s == "number")
|
|
435
|
+
return String.fromCharCode(s);
|
|
436
|
+
const a = String(s).replace(/^0x/i, ""), m = parseInt(a, 16);
|
|
437
|
+
return Number.isNaN(m) ? "" : String.fromCharCode(m);
|
|
438
|
+
});
|
|
439
|
+
return Z(() => {
|
|
440
|
+
if (typeof window > "u") return;
|
|
441
|
+
const s = n && n.iconCssUrl || ne.iconCssUrl;
|
|
442
|
+
if (!s) return;
|
|
443
|
+
const a = `link[rel="stylesheet"][data-rcui-icon="true"][href="${s}"]`;
|
|
444
|
+
if (!document.head.querySelector(a)) {
|
|
445
|
+
const p = document.createElement("link");
|
|
446
|
+
p.rel = "stylesheet", p.href = s, p.setAttribute("data-rcui-icon", "true"), document.head.appendChild(p);
|
|
447
|
+
}
|
|
448
|
+
}), (s, a) => (i(), d("i", {
|
|
449
|
+
class: z(["rc-icon", [c.value, r.value, { "rc-icon--spin": e.spin }]]),
|
|
450
|
+
style: h(l.value),
|
|
451
|
+
"aria-hidden": "true"
|
|
452
|
+
}, [
|
|
453
|
+
o.value ? (i(), d("span", Ae, _(o.value), 1)) : g("", !0)
|
|
454
|
+
], 6));
|
|
455
|
+
}
|
|
456
|
+
}), L = /* @__PURE__ */ w(Pe, [["__scopeId", "data-v-3857a892"]]);
|
|
457
|
+
L.name = "rc-icon";
|
|
458
|
+
function J(e) {
|
|
459
|
+
return e.component(L.name, L), e.component("RcIcon", L), e;
|
|
460
|
+
}
|
|
461
|
+
const F = Symbol("RECYCLE_UI_CONFIG"), ne = {
|
|
462
|
+
prefix: "rc",
|
|
463
|
+
autoRegister: !0,
|
|
464
|
+
provideKey: F,
|
|
465
|
+
// 预留主题/其他全局配置
|
|
466
|
+
theme: {},
|
|
467
|
+
// IconFont 默认配置(可在 app.use 时覆盖)
|
|
468
|
+
iconCssUrl: "//at.alicdn.com/t/c/font_4252799_9vcnw0pnmkh.css",
|
|
469
|
+
iconClass: "iconfont"
|
|
470
|
+
};
|
|
471
|
+
function Fe(e, t) {
|
|
472
|
+
t.autoRegister !== !1 && (typeof H == "function" && H(e), typeof K == "function" && K(e), typeof O == "function" && O(e), typeof j == "function" && j(e), typeof J == "function" && J(e), typeof q == "function" && q(e));
|
|
473
|
+
}
|
|
474
|
+
const se = (e, t) => {
|
|
475
|
+
const n = { ...ne, ...t || {} };
|
|
476
|
+
if (e.provide(n.provideKey ?? F, n), e.config.globalProperties.$recycleUI = n, typeof window < "u" && n.iconCssUrl) {
|
|
477
|
+
const c = `link[rel="stylesheet"][data-rcui-icon="true"][href="${n.iconCssUrl}"]`;
|
|
478
|
+
if (!document.head.querySelector(c)) {
|
|
479
|
+
const u = document.createElement("link");
|
|
480
|
+
u.rel = "stylesheet", u.href = n.iconCssUrl, u.setAttribute("data-rcui-icon", "true"), document.head.appendChild(u);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return Fe(e, n), e;
|
|
484
|
+
}, Ye = { install: se };
|
|
485
|
+
function je(e) {
|
|
486
|
+
return {
|
|
487
|
+
install(t) {
|
|
488
|
+
se(t, e);
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
export {
|
|
493
|
+
F as RECYCLE_UI_SYMBOL,
|
|
494
|
+
G as RcButton,
|
|
495
|
+
U as RcCard,
|
|
496
|
+
He as RcDescriptions,
|
|
497
|
+
Ke as RcDescriptionsItem,
|
|
498
|
+
L as RcIcon,
|
|
499
|
+
E as RcToast,
|
|
500
|
+
je as createRecycleUI,
|
|
501
|
+
Ye as default,
|
|
502
|
+
ne as defaultRecycleUIConfig,
|
|
503
|
+
ze as hideToast,
|
|
504
|
+
se as install,
|
|
505
|
+
H as installButton,
|
|
506
|
+
O as installCard,
|
|
507
|
+
K as installDescriptions,
|
|
508
|
+
J as installIcon,
|
|
509
|
+
q as installMessage,
|
|
510
|
+
Ge as message,
|
|
511
|
+
He as rcDescriptions,
|
|
512
|
+
Ke as rcDescriptionsItem,
|
|
513
|
+
Oe as showToast
|
|
514
|
+
};
|
|
515
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/components/button/index.vue","../src/components/button/index.ts","../src/components/descriptions/item.vue","../src/components/descriptions/index.vue","../src/components/descriptions/index.ts","../src/components/card/index.vue","../src/components/card/index.ts","../src/components/toast/index.vue","../src/components/toast/index.ts","../src/components/message/index.vue","../src/components/message/index.ts","../src/components/icon/index.vue","../src/components/icon/index.ts","../src/index.ts"],"sourcesContent":["<template>\r\n <button\r\n class=\"rc-button\"\r\n :class=\"[`rc-button--${type}`, `rc-button--${size}`, { 'is-plain': plain, 'is-block': block, 'is-disabled': disabled, 'is-loading': loading }]\"\r\n :style=\"{ borderRadius: radius }\"\r\n :disabled=\"disabled || loading\"\r\n @click=\"onClick\"\r\n >\r\n <span v-if=\"loading\" class=\"rc-button__spinner\" />\r\n <slot>{{ label }}</slot>\r\n </button>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\ntype ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'danger';\r\ntype ButtonSize = 'mini' | 'small' | 'medium' | 'large';\r\n\r\ninterface Props {\r\n type?: ButtonType;\r\n size?: ButtonSize;\r\n plain?: boolean;\r\n block?: boolean;\r\n /** 按钮文本,提供时可不写默认插槽 */\r\n label?: string;\r\n /** 圆角;number 代表 px,string 支持百分比等写法(如 '50%')。也兼容 boolean,true 表示大圆角。 */\r\n round?: number | string | boolean;\r\n disabled?: boolean;\r\n loading?: boolean;\r\n}\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n type: 'default',\r\n size: 'medium',\r\n plain: false,\r\n block: false,\r\n label: '',\r\n round: 6,\r\n disabled: false,\r\n loading: false,\r\n});\r\n\r\nconst emit = defineEmits<{\r\n (e: 'click', ev: MouseEvent): void\r\n}>();\r\n\r\nconst onClick = (ev: MouseEvent) => {\r\n if (!props.disabled && !props.loading) emit('click', ev);\r\n};\r\n\r\nconst radius = computed(() => {\r\n const v = props.round;\r\n if (typeof v === 'boolean') return v ? '999px' : '6px';\r\n if (typeof v === 'number') return `${v}px`;\r\n return String(v);\r\n});\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n.rc-button {\r\n --rc-primary: #1677ff;\r\n --rc-success: #00b578;\r\n --rc-warning: #ff8f1f;\r\n --rc-danger: #ff3141;\r\n --rc-text: #323233;\r\n --rc-border: #dcdee0;\r\n --rc-white: #ffffff;\r\n\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 36px;\r\n padding: 0 16px;\r\n border: 1px solid var(--rc-border);\r\n border-radius: 6px;\r\n background: var(--rc-white);\r\n color: var(--rc-text);\r\n cursor: pointer;\r\n user-select: none;\r\n transition: all .2s ease;\r\n\r\n &.is-disabled { cursor: not-allowed; opacity: .6; }\r\n &.is-block { display: flex; width: 100%; }\r\n &.is-plain { background: var(--rc-white); }\r\n &.is-loading { opacity: .85; }\r\n\r\n &__spinner {\r\n width: 14px;\r\n height: 14px;\r\n margin-right: 6px;\r\n border: 2px solid currentColor;\r\n border-top-color: transparent;\r\n border-radius: 50%;\r\n animation: rc-spin 0.8s linear infinite;\r\n }\r\n\r\n &--primary { background: var(--rc-primary); color: var(--rc-white); border-color: var(--rc-primary); }\r\n &--success { background: var(--rc-success); color: var(--rc-white); border-color: var(--rc-success); }\r\n &--warning { background: var(--rc-warning); color: var(--rc-white); border-color: var(--rc-warning); }\r\n &--danger { background: var(--rc-danger); color: var(--rc-white); border-color: var(--rc-danger); }\r\n\r\n &--mini { height: 24px; padding: 0 8px; font-size: 12px; }\r\n &--small { height: 28px; padding: 0 10px; font-size: 13px; }\r\n &--medium { height: 36px; padding: 0 16px; font-size: 14px; }\r\n &--large { height: 44px; padding: 0 20px; font-size: 16px; }\r\n}\r\n\r\n@keyframes rc-spin { to { transform: rotate(360deg) } }\r\n</style>\r\n\r\n\r\n\r\n","import type { App } from 'vue';\r\nimport Button from './index.vue';\r\n\r\n// 组件名使用全小写,以 <rc-button> 形式在模板中使用\r\n(Button as any).name = 'rc-button';\r\n\r\nexport function install(app: App) {\r\n app.component((Button as any).name, Button);\r\n return app;\r\n}\r\n\r\n\r\nexport default Button;\r\n","<template>\n <div class=\"rc-desc-item\" :style=\"{ width: computedWidth, flex: `0 0 ${computedWidth}` }\">\n <div class=\"rc-desc-item__label\" :style=\"labelStyle\">\n <slot name=\"label\">\n {{ label }}\n </slot>\n </div>\n <div class=\"rc-desc-item__value\">\n <slot>\n {{ value }}\n </slot>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, Ref } from 'vue';\n\ndefineOptions({ name: 'rc-descriptions-item' });\n\nconst props = withDefaults(defineProps<{\n label?: string | number;\n value?: any;\n labelWidth?: string | number;\n /** 跨越的列数,默认 1,可传字符串数字 */\n span?: number | string;\n}>(), {\n label: '',\n value: '',\n labelWidth: '',\n span: 1,\n});\n\nconst providedWidth = inject<Ref<string>>('rcDescItemWidth', undefined as unknown as Ref<string>);\nconst providedSingleWidth = inject<Ref<string> | string>('rcDescSingleWidth', '' as unknown as Ref<string>);\nconst providedGap = inject<string>('rcDescGap', '0px');\nconst providedGapPx = inject<Ref<number> | number>('rcDescGapPx', 0 as unknown as Ref<number>);\nconst providedColCount = inject<Ref<number> | number>('rcDescColCount', 1 as unknown as Ref<number>);\nconst providedLabelWidth = inject<Ref<string> | string>('rcDescLabelWidth', '' as unknown as Ref<string>);\n\nconst spanNum = computed(() => {\n const n = typeof props.span === 'string' ? parseInt(props.span, 10) : props.span;\n const max = typeof (providedColCount as any)?.value === 'number' ? (providedColCount as any).value : (providedColCount as any);\n const safe = !Number.isNaN(n as number) && (n as number) > 0 ? (n as number) : 1;\n return Math.min(safe, max || 1);\n});\n\nconst computedWidth = computed(() => {\n const n = typeof (providedColCount as any)?.value === 'number' ? (providedColCount as any).value : (providedColCount as any);\n const gapPx = typeof (providedGapPx as any)?.value === 'number' ? (providedGapPx as any).value : (providedGapPx as any);\n const k = spanNum.value;\n if (!n || n <= 1) return '100%';\n if (k >= n) return '100%';\n // 展开为单层 calc:((100% - (n-1)*gap) * k / n + (k-1)*gap)\n const totalGap = (n - 1) * gapPx;\n const interGap = (k - 1) * gapPx;\n return `calc((100% - ${totalGap}px) * ${k} / ${n} + ${interGap}px)`;\n});\n\nconst labelStyle = computed(() => {\n const injected = typeof (providedLabelWidth as any)?.value === 'string'\n ? (providedLabelWidth as any).value\n : (providedLabelWidth as any);\n const w = props.labelWidth !== '' ? props.labelWidth : (injected || '');\n return w ? { width: typeof w === 'number' ? `${w}px` : String(w), flex: '0 0 auto' } : {};\n});\n</script>\n\n<style scoped>\n.rc-desc-item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 6px 0;\n flex: 0 0 auto;\n}\n.rc-desc-item__label {\n color: #666;\n font-size: 14px;\n line-height: 22px;\n /* 不强制最小宽度,交由 label-width 控制 */\n min-width: 0;\n}\n.rc-desc-item__value {\n flex: 1 1 auto;\n font-size: 14px;\n line-height: 22px;\n}\n\n</style>\n\n\n","<template>\n <div class=\"rc-descriptions\">\n <div v-if=\"$slots.title || title\" class=\"rc-descriptions__title\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div class=\"rc-descriptions__body\" :style=\"{ gap: gapStyle }\" ref=\"wrapEl\">\n <template v-if=\"normalizedData.length\">\n <rcDescriptionsItem\n v-for=\"(it, idx) in normalizedData\"\n :key=\"idx\"\n :label=\"it.label\"\n :value=\"it.value\"\n :label-width=\"labelWidth\"\n />\n </template>\n <slot v-else />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, watchEffect } from 'vue';\nimport rcDescriptionsItem from './item.vue';\n\ndefineOptions({ name: 'rc-descriptions' });\n\ntype KeyMap = { key: string; value: string };\n\nconst props = withDefaults(defineProps<{\n title?: string;\n /** 每行展示的列数,支持数字或字符串数字 */\n column?: number | string;\n /** 列间距,支持数字(px)或字符串值,例如 '12px' */\n gap?: number | string;\n /** label 固定宽度,数字代表 px,也可直接传入 '120px' */\n labelWidth?: number | string | '';\n /** 直接通过数据渲染 */\n data?: Array<Record<string, any>>;\n /** data 的字段映射,如 { key: 'label', value: 'value' } */\n keyMap?: KeyMap;\n}>(), {\n column: 2,\n gap: 4,\n labelWidth: '',\n data: () => [],\n});\n\nconst wrapEl = ref<HTMLElement | null>(null);\nconst gapStyle = computed(() => (typeof props.gap === 'number' ? `${props.gap}px` : String(props.gap)));\nconst colCount = computed(() => {\n const n = typeof props.column === 'string' ? Number.parseInt(props.column as string, 10) : (props.column ?? 1);\n return !Number.isNaN(n) && n > 0 ? n : 1;\n});\n\n// compute child item width as percentage string or 'auto'\nconst itemWidth = ref<string>('100%');\nconst singleWidth = ref<string>('100%');\nwatchEffect(() => {\n const n = colCount.value;\n if (n <= 1) {\n itemWidth.value = '100%';\n singleWidth.value = '100%';\n } else {\n // subtract total horizontal gaps from 100%\n const gapPx = typeof props.gap === 'number' ? props.gap : parseFloat(String(props.gap)) || 0;\n const totalGap = (n - 1) * gapPx;\n const base = `calc((100% - ${totalGap}px) / ${n})`;\n singleWidth.value = base;\n itemWidth.value = base;\n }\n});\n\nprovide('rcDescItemWidth', itemWidth);\nprovide('rcDescSingleWidth', singleWidth);\nprovide('rcDescColCount', colCount);\nprovide('rcDescGapPx', computed(() => (typeof props.gap === 'number' ? props.gap : parseFloat(String(props.gap)) || 0)));\nconst labelWidthCss = computed(() => {\n if (props.labelWidth === '' || props.labelWidth === undefined) return '';\n return typeof props.labelWidth === 'number' ? `${props.labelWidth}px` : String(props.labelWidth);\n});\nprovide('rcDescLabelWidth', labelWidthCss);\nprovide('rcDescGap', computed(() => (typeof props.gap === 'number' ? `${props.gap}px` : String(props.gap))));\n\nconst normalizedData = computed(() => {\n const keyK = (props.keyMap?.key ?? 'label') as string;\n const keyV = (props.keyMap?.value ?? 'value') as string;\n if (!props.data?.length) return [];\n return props.data.map((it) => ({\n label: it?.[keyK],\n value: it?.[keyV],\n }));\n});\n\n</script>\n\n<style scoped>\n.rc-descriptions {\n width: 100%;\n}\n.rc-descriptions__title {\n font-weight: 600;\n font-size: 16px;\n margin: 0 0 12px 0;\n}\n.rc-description__row {\n display: contents;\n}\n.rc-descriptions__body {\n display: flex;\n flex-wrap: wrap;\n}\n\n</style>\n\n\n","import type { App } from 'vue';\r\nimport Descriptions from './index.vue';\r\nimport DescriptionsItem from './item.vue';\r\n\r\n(Descriptions as any).name = 'rc-descriptions';\r\n(DescriptionsItem as any).name = 'rc-descriptions-item';\r\n\r\nexport function install(app: App) {\r\n // 同时注册 kebab 与 PascalCase 名称,便于 <rc-descriptions>/<RcDescriptions> 使用\r\n app.component((Descriptions as any).name, Descriptions);\r\n app.component('RcDescriptions', Descriptions);\r\n app.component((DescriptionsItem as any).name, DescriptionsItem);\r\n app.component('RcDescriptionsItem', DescriptionsItem);\r\n return app;\r\n}\r\n\r\nexport const RcDescriptions = Descriptions;\r\nexport const RcDescriptionsItem = DescriptionsItem;\r\n\r\nexport default Descriptions;\r\n\r\n\r\n\r\n","<template>\n <div\n class=\"rc-card\"\n :class=\"[{ 'rc-card--bordered': bordered }]\"\n :style=\"wrapperStyle\"\n >\n <div\n v-if=\"$slots.title || title || $slots.status || status\"\n class=\"rc-card__top\"\n :style=\"{ backgroundColor: topBgColor || 'rgba(29, 133, 252, 0.05)' }\"\n >\n <div class=\"rc-card__title\">\n <slot name=\"title\">\n <span class=\"rc-card__title-text\">{{ title }}</span>\n </slot>\n </div>\n <div class=\"rc-card__status\" v-if=\"$slots.status || status\">\n <slot name=\"status\">\n <span class=\"rc-card__status-text\" :style=\"{ color: statusColor || 'var(--rc-primary)' }\">\n {{ status }}\n </span>\n </slot>\n </div>\n </div>\n\n <div class=\"rc-card__body\" :style=\"{ padding: bodyPadding, gap: bodyGap }\">\n <slot name=\"content\">\n <slot />\n </slot>\n </div>\n\n <div v-if=\"$slots.action\" class=\"rc-card__divider\" />\n\n <div v-if=\"$slots.action\" class=\"rc-card__action\">\n <slot name=\"action\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\ndefineOptions({ name: 'rc-card' });\n\ninterface Props {\n /** 卡片整体背景色,默认白色 */\n color?: string;\n /** 顶部色块背景色 */\n topBgColor?: string;\n /** 标题文本(可用 slot=\"title\" 自定义) */\n title?: string;\n /** 右侧状态文案(可用 slot=\"status\" 自定义) */\n status?: string;\n /** 状态文本颜色 */\n statusColor?: string;\n /** 圆角:数值代表 px,字符串可用百分比 */\n round?: number | string;\n /** 是否描边 */\n bordered?: boolean;\n /** 阴影强度:0/1/2/3... -> 转换为不同阴影强度 */\n elevation?: number;\n /** 内边距(CSS 值,如 '16px 12px') */\n padding?: string;\n /** 主体内容的垂直间距(px 或 CSS 字符串) */\n gap?: number | string;\n /** 宽度(px/百分比) */\n width?: string | number;\n /** 高度(px/百分比) */\n height?: string | number;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n color: 'var(--rc-white)',\n topBgColor: 'rgba(29, 133, 252, 0.05)',\n title: '',\n status: '',\n statusColor: 'var(--rc-primary)',\n round: 8,\n bordered: false,\n elevation: 2,\n padding: '16px',\n gap: 12,\n width: '100%',\n height: '',\n});\n\nconst wrapperStyle = computed(() => {\n const radius =\n typeof props.round === 'boolean'\n ? props.round\n ? '12px'\n : '0'\n : typeof props.round === 'number'\n ? `${props.round}px`\n : String(props.round);\n\n return {\n backgroundColor: props.color || 'var(--rc-white)',\n borderRadius: radius,\n boxShadow: shadowByLevel(props.elevation),\n width: toCssSize(props.width),\n height: toCssSize(props.height),\n } as Record<string, string>;\n});\n\nconst bodyPadding = computed(() => props.padding || '16px');\nconst bodyGap = computed(() =>\n typeof props.gap === 'number' ? `${props.gap}px` : String(props.gap)\n);\n\nfunction toCssSize(v?: string | number) {\n if (v === undefined || v === null || v === '') return '';\n return typeof v === 'number' ? `${v}px` : String(v);\n}\n\nfunction shadowByLevel(level: number) {\n if (!level || level <= 0) return 'none';\n // 简单的多层阴影(可按需微调)\n const base = 4 * level;\n return `0 ${Math.round(base / 2)}px ${base}px rgba(0,0,0,0.06), 0 ${Math.round(\n base / 4\n )}px ${Math.round(base / 2)}px rgba(0,0,0,0.04)`;\n}\n</script>\n\n<style scoped>\n.rc-card {\n --rc-white: #ffffff;\n --rc-border: #e5e6eb;\n --rc-primary: #1677ff;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n border: 1px solid transparent;\n background: var(.rc-white);\n}\n.rc-card--bordered {\n border-color: var(--rc-border);\n}\n\n.rc-card__top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n}\n.rc-card__title {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.rc-card__title-text {\n font-weight: 600;\n font-size: 16px;\n color: #1d2129;\n}\n.rc-card__status-text {\n font-size: 14px;\n}\n.rc-card__body {\n display: flex;\n flex-direction: column;\n}\n.rc-card__divider {\n height: 1px;\n background: var(--rc-border);\n}\n.rc-card__action {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n}\n</style>\n\n\n","import type { App } from 'vue';\r\nimport Card from './index.vue';\r\n\r\n// 同时注册小写与驼峰,便于 <rc-card> / <RcCard> 两种写法\r\n(Card as any).name = 'rc-card';\r\nconst PascalName = 'RcCard';\r\n\r\nexport function install(app: App) {\r\n app.component((Card as any).name, Card);\r\n app.component(PascalName, Card);\r\n return app;\r\n}\r\n\r\nexport default Card;\r\n\r\n\r\n","<template>\r\n <teleport to=\"body\">\r\n <transition name=\"rc-toast-fade\" @after-leave=\"onAfterLeave\">\r\n <div v-if=\"visible\" class=\"rc-toast\" :class=\"[`rc-toast--${type}`]\">\r\n <div v-if=\"mask\" class=\"rc-toast__mask\" />\r\n <div class=\"rc-toast__content\">\r\n <div v-if=\"type === 'loading'\" class=\"rc-toast__spinner\" />\r\n <div v-else-if=\"type === 'success'\" class=\"rc-toast__icon rc-toast__icon--success\" />\r\n <div v-else-if=\"type === 'fail'\" class=\"rc-toast__icon rc-toast__icon--fail\" />\r\n <div class=\"rc-toast__text\">{{ message }}</div>\r\n </div>\r\n </div>\r\n </transition>\r\n </teleport>\r\n <slot />\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, onUnmounted, ref, watch, defineExpose } from 'vue';\r\n\r\nexport type ToastType = 'text' | 'success' | 'fail' | 'loading';\r\nexport interface ToastProps {\r\n message?: string;\r\n type?: ToastType;\r\n duration?: number;\r\n mask?: boolean;\r\n /** 服务端关闭回调,用于卸载容器 */\r\n onAfterLeave?: () => void;\r\n}\r\n\r\nconst props = withDefaults(defineProps<ToastProps>(), {\r\n message: '',\r\n type: 'text',\r\n duration: 2000,\r\n mask: false,\r\n});\r\n\r\nconst visible = ref(true);\r\nlet timer: any;\r\n\r\nfunction clearTimer() {\r\n if (timer) {\r\n clearTimeout(timer);\r\n timer = null;\r\n }\r\n}\r\n\r\nfunction close() {\r\n clearTimer();\r\n visible.value = false;\r\n}\r\n\r\ndefineExpose({ close });\r\n\r\nonMounted(() => {\r\n if (props.duration && props.duration > 0) {\r\n timer = setTimeout(() => {\r\n close();\r\n }, props.duration);\r\n }\r\n});\r\n\r\nonUnmounted(() => {\r\n clearTimer();\r\n});\r\n</script>\r\n\r\n<style scoped>\r\n.rc-toast {\r\n position: fixed;\r\n inset: 0;\r\n z-index: 9999;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n.rc-toast__mask {\r\n position: absolute;\r\n inset: 0;\r\n background: rgba(0, 0, 0, 0.35);\r\n pointer-events: auto;\r\n backdrop-filter: blur(1px);\r\n}\r\n.rc-toast__content {\r\n position: relative;\r\n max-width: 80%;\r\n background: rgba(0, 0, 0, 0.75);\r\n color: #fff;\r\n border-radius: 12px;\r\n padding: 12px 14px;\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 8px;\r\n box-shadow: 0 6px 16px rgba(0,0,0,0.2);\r\n}\r\n.rc-toast__text {\r\n font-size: 14px;\r\n line-height: 1.4;\r\n}\r\n.rc-toast__spinner {\r\n width: 18px;\r\n height: 18px;\r\n border: 2px solid rgba(255,255,255,0.35);\r\n border-top-color: #fff;\r\n border-radius: 50%;\r\n animation: rc-toast-spin 0.8s linear infinite;\r\n}\r\n.rc-toast__icon {\r\n width: 18px;\r\n height: 18px;\r\n border-radius: 50%;\r\n position: relative;\r\n flex: 0 0 18px;\r\n}\r\n.rc-toast__icon--success::before {\r\n content: '';\r\n position: absolute;\r\n left: 3px;\r\n top: 3px;\r\n width: 10px;\r\n height: 10px;\r\n border-right: 2px solid #fff;\r\n border-bottom: 2px solid #fff;\r\n transform: rotate(45deg);\r\n}\r\n.rc-toast__icon--fail::before,\r\n.rc-toast__icon--fail::after {\r\n content: '';\r\n position: absolute;\r\n left: 3px;\r\n right: 3px;\r\n top: 8px;\r\n height: 2px;\r\n background: #fff;\r\n}\r\n.rc-toast__icon--fail::before {\r\n transform: rotate(45deg);\r\n}\r\n.rc-toast__icon--fail::after {\r\n transform: rotate(-45deg);\r\n}\r\n\r\n.rc-toast-fade-enter-active,\r\n.rc-toast-fade-leave-active {\r\n transition: opacity .2s ease;\r\n}\r\n.rc-toast-fade-enter-from,\r\n.rc-toast-fade-leave-to {\r\n opacity: 0;\r\n}\r\n@keyframes rc-toast-spin {\r\n to { transform: rotate(360deg); }\r\n}\r\n</style>\r\n\r\n\r\n","import { App, createApp } from 'vue';\r\nimport Toast, { type ToastProps } from './index.vue';\r\n\r\nexport type { ToastProps };\r\nexport interface ShowToastOptions {\r\n message?: string;\r\n type?: 'text' | 'success' | 'fail' | 'loading';\r\n duration?: number;\r\n mask?: boolean;\r\n /** 关闭时回调(仅服务方式有效) */\r\n onClose?: () => void;\r\n}\r\n\r\nlet app: App<Element> | null = null;\r\nlet host: HTMLDivElement | null = null;\r\n\r\nfunction unmount() {\r\n if (app) {\r\n app.unmount();\r\n app = null;\r\n }\r\n if (host) {\r\n document.body.removeChild(host);\r\n host = null;\r\n }\r\n}\r\n\r\nexport function showToast(options: string | ShowToastOptions) {\r\n const opt: ShowToastOptions =\r\n typeof options === 'string' ? { message: options } : (options || {});\r\n unmount();\r\n host = document.createElement('div');\r\n document.body.appendChild(host);\r\n const toastProps: ToastProps = {\r\n message: opt.message,\r\n type: (opt as any).type ?? 'text',\r\n duration: (opt as any).duration ?? 2000,\r\n mask: (opt as any).mask ?? false,\r\n onAfterLeave: () => {\r\n unmount();\r\n opt.onClose?.();\r\n },\r\n };\r\n app = createApp(Toast, toastProps as any);\r\n app.mount(host);\r\n return {\r\n close: hideToast,\r\n };\r\n}\r\n\r\nexport function hideToast() {\r\n if (!app) return;\r\n // 调用暴露的 close 方法\r\n // @ts-ignore\r\n app._instance?.exposed?.close?.();\r\n}\r\n\r\n// 组件注册(可选,提供 rc-toast 用于手动放置 Portal)\r\n(Toast as any).name = 'rc-toast';\r\nexport function install(app: App) {\r\n app.component((Toast as any).name, Toast);\r\n return app;\r\n}\r\n\r\nexport default Toast;\r\n\r\n\r\n","<template>\r\n <div class=\"rc-message\" role=\"alert\" aria-live=\"polite\">\r\n <transition-group name=\"rc-message-fade\" tag=\"div\">\r\n <div\r\n v-for=\"m in messages\"\r\n :key=\"m.id\"\r\n class=\"rc-message__item\"\r\n :class=\"`rc-message--${m.type}`\"\r\n >\r\n <span class=\"rc-message__content\">{{ m.content }}</span>\r\n </div>\r\n </transition-group>\r\n </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { reactive } from 'vue';\r\n\r\nexport type MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading';\r\nexport interface MessageItem {\r\n id: number;\r\n type: MessageType;\r\n content: string;\r\n duration: number; // ms; 0 = persistent (except loading default)\r\n}\r\n\r\nconst messages = reactive<MessageItem[]>([]);\r\nlet uid = 1;\r\n\r\nfunction remove(id: number) {\r\n const idx = messages.findIndex((x) => x.id === id);\r\n if (idx >= 0) messages.splice(idx, 1);\r\n}\r\n\r\nfunction add(type: MessageType, content: string, duration: number) {\r\n const id = uid++;\r\n messages.push({ id, type, content, duration });\r\n if (duration > 0) {\r\n window.setTimeout(() => remove(id), duration);\r\n }\r\n return id;\r\n}\r\n\r\ndefineExpose({ add, remove });\r\n</script>\r\n\r\n<style scoped>\r\n.rc-message {\r\n position: fixed;\r\n top: 16px;\r\n left: 0;\r\n right: 0;\r\n z-index: 10000;\r\n pointer-events: none;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 8px;\r\n}\r\n.rc-message__item {\r\n pointer-events: auto;\r\n min-width: 120px;\r\n max-width: 80%;\r\n padding: 8px 12px;\r\n border-radius: 6px;\r\n color: #fff;\r\n background: rgba(0, 0, 0, 0.78);\r\n box-shadow: 0 6px 16px rgba(0,0,0,0.2);\r\n font-size: 14px;\r\n}\r\n.rc-message--success { background: rgba(22,119,255,0.9); }\r\n.rc-message--warning { background: rgba(250,173,20,0.95); }\r\n.rc-message--error { background: rgba(245,63,63,0.95); }\r\n.rc-message--info { background: rgba(0,0,0,0.78); }\r\n.rc-message--loading { background: rgba(0,0,0,0.78); }\r\n\r\n.rc-message-fade-enter-active,\r\n.rc-message-fade-leave-active {\r\n transition: all .2s ease;\r\n}\r\n.rc-message-fade-enter-from,\r\n.rc-message-fade-leave-to {\r\n opacity: 0;\r\n transform: translateY(-6px);\r\n}\r\n</style>\r\n\r\n\r\n","import { createVNode, render, type App } from 'vue';\r\nimport MessageHost from './index.vue';\r\n\r\ntype MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading';\r\n\r\nexport interface MessageOptions {\r\n content: string;\r\n duration?: number; // ms; default 2000, loading 默认 0\r\n type?: MessageType;\r\n}\r\n\r\nlet container: HTMLElement | null = null;\r\nlet hostExposed: any = null;\r\n\r\nfunction ensureHost() {\r\n if (container && hostExposed) return;\r\n container = document.createElement('div');\r\n document.body.appendChild(container);\r\n const vnode = createVNode(MessageHost, {});\r\n render(vnode, container);\r\n hostExposed = (vnode.component as any)?.exposed;\r\n}\r\n\r\nfunction open(type: MessageType, content: string, duration?: number) {\r\n ensureHost();\r\n const d = typeof duration === 'number'\r\n ? duration\r\n : (type === 'loading' ? 0 : 2000);\r\n return hostExposed?.add?.(type, content, d);\r\n}\r\n\r\nexport const message = {\r\n open(opts: MessageOptions) {\r\n return open(opts.type || 'info', opts.content, opts.duration);\r\n },\r\n info(content: string, duration?: number) {\r\n return open('info', content, duration);\r\n },\r\n success(content: string, duration?: number) {\r\n return open('success', content, duration);\r\n },\r\n warning(content: string, duration?: number) {\r\n return open('warning', content, duration);\r\n },\r\n error(content: string, duration?: number) {\r\n return open('error', content, duration);\r\n },\r\n loading(content: string, duration?: number) {\r\n return open('loading', content, duration);\r\n },\r\n destroy() {\r\n if (container) {\r\n render(null, container);\r\n container.remove();\r\n container = null;\r\n hostExposed = null;\r\n }\r\n },\r\n};\r\n\r\nexport default message;\r\n\r\n// 可选:提供 install,注入到 app.config.globalProperties 以便 this.$message 使用\r\nexport function install(app: App) {\r\n (app.config.globalProperties as any).$message = message;\r\n return app;\r\n}\r\n\r\n\r\n","<template>\r\n <i\r\n class=\"rc-icon\"\r\n :class=\"[baseClass, iconClassName, { 'rc-icon--spin': spin }]\"\r\n :style=\"iconStyle\"\r\n aria-hidden=\"true\"\r\n >\r\n <span v-if=\"char\" class=\"rc-icon__unicode\">{{ char }}</span>\r\n </i>\r\n </template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, inject, onMounted } from 'vue';\r\nimport type { RecycleUIOptions } from '../../types';\r\nimport { RECYCLE_UI_SYMBOL, defaultRecycleUIConfig } from '../../index';\r\n\r\ndefineOptions({ name: 'rc-icon' });\r\n\r\nconst props = withDefaults(defineProps<{\r\n /** 图标名,例如 'icon_a_in_store',也可直接传完整类名 */\r\n name: string;\r\n /** 尺寸,数字按 px 处理,也可传 '1.2em' 等 */\r\n size?: number | string;\r\n /** 颜色 */\r\n color?: string;\r\n /** 是否旋转(用于 loading 类图标) */\r\n spin?: boolean;\r\n /** Unicode 码点(不带 \\\\u,十六进制,如 'e609' 或 0xe609),用于无类名时渲染 */\r\n code?: string | number;\r\n}>(), {\r\n size: 16,\r\n color: '',\r\n spin: false,\r\n code: '',\r\n});\r\n\r\nconst cfg = inject<RecycleUIOptions>(RECYCLE_UI_SYMBOL, {} as RecycleUIOptions);\r\n\r\nconst baseClass = computed(() => cfg?.iconClass || 'iconfont');\r\nconst iconClassName = computed(() => props.name || '');\r\n\r\nconst sizeCss = computed(() => (typeof props.size === 'number' ? `${props.size}px` : (props.size || '16px')));\r\nconst iconStyle = computed(() => ({\r\n fontSize: sizeCss.value,\r\n color: props.color || undefined,\r\n lineHeight: 1,\r\n fontFamily: cfg?.iconClass || 'iconfont',\r\n}));\r\n\r\n// 将 code 转为字符\r\nconst char = computed(() => {\r\n const c = props.code as any;\r\n if (c === undefined || c === null || c === '' || c === 0) return '';\r\n if (typeof c === 'number') {\r\n return String.fromCharCode(c);\r\n }\r\n const hex = String(c).replace(/^0x/i, '');\r\n const num = parseInt(hex, 16);\r\n if (Number.isNaN(num)) return '';\r\n return String.fromCharCode(num);\r\n});\r\n\r\n// 兜底:若未通过 app.use 安装插件,则在组件挂载时尝试注入默认的 iconfont 样式\r\nonMounted(() => {\r\n if (typeof window === 'undefined') return;\r\n const url = (cfg && cfg.iconCssUrl) || defaultRecycleUIConfig.iconCssUrl;\r\n if (!url) return;\r\n const selector = `link[rel=\"stylesheet\"][data-rcui-icon=\"true\"][href=\"${url}\"]`;\r\n const exists = document.head.querySelector(selector);\r\n if (!exists) {\r\n const link = document.createElement('link');\r\n link.rel = 'stylesheet';\r\n link.href = url as string;\r\n link.setAttribute('data-rcui-icon', 'true');\r\n document.head.appendChild(link);\r\n }\r\n});\r\n</script>\r\n\r\n<style scoped>\r\n.rc-icon {\r\n display: inline-block;\r\n vertical-align: -0.125em;\r\n}\r\n.rc-icon__unicode {\r\n /* 让 Unicode 文本走同一字体,确保显示 */\r\n font-family: inherit;\r\n line-height: 1;\r\n}\r\n.rc-icon--spin {\r\n animation: rc-icon-rot 1s linear infinite;\r\n}\r\n@keyframes rc-icon-rot {\r\n to { transform: rotate(360deg); }\r\n}\r\n</style>\r\n\r\n\r\n","import type { App } from 'vue';\r\nimport Icon from './index.vue';\r\n\r\n(Icon as any).name = 'rc-icon';\r\n\r\nexport function install(app: App) {\r\n app.component((Icon as any).name, Icon);\r\n app.component('RcIcon', Icon);\r\n return app;\r\n}\r\n\r\nexport const RcIcon = Icon;\r\nexport default Icon;\r\n\r\n\r\n","// library entry\r\nimport type { App, Plugin } from 'vue';\r\nimport { install as installButton } from './components/button';\r\nimport { install as installDescriptions } from './components/descriptions';\r\nimport { install as installCard } from './components/card';\r\nimport { install as installToast } from './components/toast';\r\nimport { install as installMessage } from './components/message';\r\nimport { install as installIcon } from './components/icon/index';\r\nimport type { RecycleUIOptions } from './types';\r\n\r\nexport const RECYCLE_UI_SYMBOL = Symbol('RECYCLE_UI_CONFIG');\r\n\r\nexport const defaultRecycleUIConfig: RecycleUIOptions = {\r\n prefix: 'rc',\r\n autoRegister: true,\r\n provideKey: RECYCLE_UI_SYMBOL,\r\n // 预留主题/其他全局配置\r\n theme: {},\r\n // IconFont 默认配置(可在 app.use 时覆盖)\r\n iconCssUrl: '//at.alicdn.com/t/c/font_4252799_9vcnw0pnmkh.css',\r\n iconClass: 'iconfont',\r\n};\r\n\r\nfunction doAutoRegister(app: App, opts: RecycleUIOptions) {\r\n if (opts.autoRegister === false) return;\r\n if (typeof installButton === 'function') installButton(app);\r\n if (typeof installDescriptions === 'function') installDescriptions(app);\r\n if (typeof installCard === 'function') installCard(app);\r\n if (typeof installToast === 'function') installToast(app);\r\n if (typeof installIcon === 'function') installIcon(app);\r\n if (typeof installMessage === 'function') installMessage(app);\r\n}\r\n\r\nexport const install = (app: App, options?: RecycleUIOptions) => {\r\n const cfg: RecycleUIOptions = { ...defaultRecycleUIConfig, ...(options || {}) };\r\n // 提供全局配置\r\n app.provide(cfg.provideKey ?? RECYCLE_UI_SYMBOL, cfg);\r\n // 供模板/实例访问:this.$recycleUI\r\n (app.config.globalProperties as any).$recycleUI = cfg;\r\n // 注入 IconFont 样式链接(浏览器环境)\r\n if (typeof window !== 'undefined' && cfg.iconCssUrl) {\r\n const selector = `link[rel=\"stylesheet\"][data-rcui-icon=\"true\"][href=\"${cfg.iconCssUrl}\"]`;\r\n const exists = document.head.querySelector(selector);\r\n if (!exists) {\r\n const link = document.createElement('link');\r\n link.rel = 'stylesheet';\r\n link.href = cfg.iconCssUrl;\r\n link.setAttribute('data-rcui-icon', 'true');\r\n document.head.appendChild(link);\r\n }\r\n }\r\n // 自动注册内置组件(可通过 autoRegister 关闭)\r\n doAutoRegister(app, cfg);\r\n return app;\r\n};\r\n\r\n// 默认导出为插件,支持 app.use(recycleUi, options)\r\nconst plugin: Plugin = { install };\r\nexport default plugin;\r\n\r\n// 也导出命名组件安装器与默认配置(defaultRecycleUIConfig 已在上方以常量形式导出)\r\n\r\n// 可选:工厂方法,便于创建带预设配置的插件\r\nexport function createRecycleUI(options?: RecycleUIOptions): Plugin {\r\n return {\r\n install(app: App) {\r\n install(app, options);\r\n },\r\n };\r\n}\r\n\r\n// 按需导出组件与其安装器(供文档与业务直接使用)\r\nexport { default as RcButton } from './components/button';\r\nexport { RcDescriptions, RcDescriptionsItem } from './components/descriptions';\r\nexport { install as installButton } from './components/button';\r\nexport { install as installDescriptions } from './components/descriptions';\r\nexport { default as RcCard } from './components/card';\r\nexport { install as installCard } from './components/card';\r\n// 兼容别名导出(文档示例中的 rcXxx)\r\nexport { RcDescriptions as rcDescriptions, RcDescriptionsItem as rcDescriptionsItem } from './components/descriptions';\r\n// Toast 服务导出\r\nexport { default as RcToast, showToast, hideToast } from './components/toast';\r\n// Icon 组件导出\r\nexport { default as RcIcon } from './components/icon/index';\r\nexport { install as installIcon } from './components/icon/index';\r\n// Message 服务(对标 antd 的 message)\r\nexport { default as message } from './components/message';\r\nexport { install as installMessage } from './components/message';\r\n"],"names":["props","__props","emit","__emit","onClick","ev","radius","computed","v","_createElementBlock","_normalizeClass","_openBlock","_hoisted_2","_renderSlot","_ctx","Button","install","app","inject","providedGapPx","providedColCount","providedLabelWidth","spanNum","n","max","safe","computedWidth","gapPx","k","totalGap","interGap","labelStyle","injected","w","_normalizeStyle","_createElementVNode","_hoisted_1","wrapEl","ref","gapStyle","colCount","itemWidth","singleWidth","watchEffect","base","provide","labelWidthCss","normalizedData","keyK","_a","keyV","_b","_c","it","$slots","_Fragment","_renderList","idx","_createBlock","rcDescriptionsItem","Descriptions","DescriptionsItem","RcDescriptions","RcDescriptionsItem","wrapperStyle","shadowByLevel","toCssSize","bodyPadding","bodyGap","level","_toDisplayString","_hoisted_3","_hoisted_4","_hoisted_5","Card","PascalName","visible","timer","clearTimer","close","__expose","onMounted","onUnmounted","_Teleport","_createVNode","_Transition","_hoisted_6","host","unmount","showToast","options","opt","toastProps","createApp","Toast","hideToast","messages","reactive","uid","remove","id","x","add","type","content","duration","_TransitionGroup","m","container","hostExposed","ensureHost","vnode","createVNode","MessageHost","render","open","d","message","opts","cfg","RECYCLE_UI_SYMBOL","baseClass","iconClassName","sizeCss","iconStyle","char","c","hex","num","url","defaultRecycleUIConfig","selector","link","Icon","doAutoRegister","installButton","installDescriptions","installCard","installToast","installIcon","installMessage","plugin","createRecycleUI"],"mappings":";;;;;;;;;;;;;;;;;;AA+BA,UAAMA,IAAQC,GAWRC,IAAOC,GAIPC,IAAU,CAACC,MAAmB;AAClC,MAAI,CAACL,EAAM,YAAY,CAACA,EAAM,WAASE,EAAK,SAASG,CAAE;AAAA,IACzD,GAEMC,IAASC,EAAS,MAAM;AAC5B,YAAMC,IAAIR,EAAM;AAChB,aAAI,OAAOQ,KAAM,YAAkBA,IAAI,UAAU,QAC7C,OAAOA,KAAM,WAAiB,GAAGA,CAAC,OAC/B,OAAOA,CAAC;AAAA,IACjB,CAAC;2BAtDCC,EASS,UAAA;AAAA,MARP,OAAKC,EAAA,CAAC,aAAW,CAAA,cACMT,EAAA,IAAI,IAAA,cAAkBA,EAAA,IAAI,IAAA,EAAA,YAAkBA,EAAA,OAAK,YAAcA,EAAA,OAAK,eAAiBA,EAAA,wBAAwBA,EAAA,QAAA,CAAO,CAAA,CAAA;AAAA,MAC1I,yBAAuBK,EAAA,OAAM;AAAA,MAC7B,UAAUL,EAAA,YAAYA,EAAA;AAAA,MACtB,SAAAG;AAAA,IAAA;MAEWH,EAAA,WAAZU,EAAA,GAAAF,EAAkD,QAAlDG,EAAkD;MAClDC,EAAwBC,yBAAxB,MAAwB;AAAA,YAAfb,EAAA,KAAK,GAAA,CAAA;AAAA,MAAA;;;;;;;;;ACLjBc,EAAe,OAAO;AAEhB,SAASC,EAAQC,GAAU;AAChC,SAAAA,EAAI,UAAWF,EAAe,MAAMA,CAAM,GACnCE;AACT;;;;;;;;;;;ACWA,UAAMjB,IAAQC;AAaQ,I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YAChBa,EAAK,aAAa,kBAAkB,MAAM,GAC1C,SAAS,KAAK,YAAYA,CAAI;AAAA,IAChC;AAAA,EACF;AAEA,SAAAE,GAAerH,GAAKsG,CAAG,GAChBtG;AACT,GAGM4H,KAAiB,EAAE,SAAA7H,GAAA;AAMlB,SAAS8H,GAAgBpD,GAAoC;AAClE,SAAO;AAAA,IACL,QAAQzE,GAAU;AAChB,MAAAD,GAAQC,GAAKyE,CAAO;AAAA,IACtB;AAAA,EAAA;AAEJ;"}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.rc-button[data-v-a70e95bb]{--rc-primary: #1677ff;--rc-success: #00b578;--rc-warning: #ff8f1f;--rc-danger: #ff3141;--rc-text: #323233;--rc-border: #dcdee0;--rc-white: #ffffff;display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 16px;border:1px solid var(--rc-border);border-radius:6px;background:var(--rc-white);color:var(--rc-text);cursor:pointer;-webkit-user-select:none;user-select:none;transition:all .2s ease}.rc-button.is-disabled[data-v-a70e95bb]{cursor:not-allowed;opacity:.6}.rc-button.is-block[data-v-a70e95bb]{display:flex;width:100%}.rc-button.is-plain[data-v-a70e95bb]{background:var(--rc-white)}.rc-button.is-loading[data-v-a70e95bb]{opacity:.85}.rc-button__spinner[data-v-a70e95bb]{width:14px;height:14px;margin-right:6px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:rc-spin-a70e95bb .8s linear infinite}.rc-button--primary[data-v-a70e95bb]{background:var(--rc-primary);color:var(--rc-white);border-color:var(--rc-primary)}.rc-button--success[data-v-a70e95bb]{background:var(--rc-success);color:var(--rc-white);border-color:var(--rc-success)}.rc-button--warning[data-v-a70e95bb]{background:var(--rc-warning);color:var(--rc-white);border-color:var(--rc-warning)}.rc-button--danger[data-v-a70e95bb]{background:var(--rc-danger);color:var(--rc-white);border-color:var(--rc-danger)}.rc-button--mini[data-v-a70e95bb]{height:24px;padding:0 8px;font-size:12px}.rc-button--small[data-v-a70e95bb]{height:28px;padding:0 10px;font-size:13px}.rc-button--medium[data-v-a70e95bb]{height:36px;padding:0 16px;font-size:14px}.rc-button--large[data-v-a70e95bb]{height:44px;padding:0 20px;font-size:16px}@keyframes rc-spin-a70e95bb{to{transform:rotate(360deg)}}.rc-desc-item[data-v-970d0b99]{display:flex;align-items:flex-start;gap:8px;padding:6px 0;flex:0 0 auto}.rc-desc-item__label[data-v-970d0b99]{color:#666;font-size:14px;line-height:22px;min-width:0}.rc-desc-item__value[data-v-970d0b99]{flex:1 1 auto;font-size:14px;line-height:22px}.rc-descriptions[data-v-5fcaa235]{width:100%}.rc-descriptions__title[data-v-5fcaa235]{font-weight:600;font-size:16px;margin:0 0 12px}.rc-description__row[data-v-5fcaa235]{display:contents}.rc-descriptions__body[data-v-5fcaa235]{display:flex;flex-wrap:wrap}.rc-card[data-v-a7b95214]{--rc-white: #ffffff;--rc-border: #e5e6eb;--rc-primary: #1677ff;display:flex;flex-direction:column;width:100%;border:1px solid transparent;background:var(.rc-white)}.rc-card--bordered[data-v-a7b95214]{border-color:var(--rc-border)}.rc-card__top[data-v-a7b95214]{display:flex;align-items:center;justify-content:space-between;padding:16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.rc-card__title[data-v-a7b95214]{display:flex;align-items:center;gap:4px}.rc-card__title-text[data-v-a7b95214]{font-weight:600;font-size:16px;color:#1d2129}.rc-card__status-text[data-v-a7b95214]{font-size:14px}.rc-card__body[data-v-a7b95214]{display:flex;flex-direction:column}.rc-card__divider[data-v-a7b95214]{height:1px;background:var(--rc-border)}.rc-card__action[data-v-a7b95214]{display:flex;align-items:center;gap:8px;padding:12px 16px}.rc-toast[data-v-d234c9c5]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;align-items:center;justify-content:center}.rc-toast__mask[data-v-d234c9c5]{position:absolute;top:0;right:0;bottom:0;left:0;background:#00000059;pointer-events:auto;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}.rc-toast__content[data-v-d234c9c5]{position:relative;max-width:80%;background:#000000bf;color:#fff;border-radius:12px;padding:12px 14px;display:inline-flex;align-items:center;gap:8px;box-shadow:0 6px 16px #0003}.rc-toast__text[data-v-d234c9c5]{font-size:14px;line-height:1.4}.rc-toast__spinner[data-v-d234c9c5]{width:18px;height:18px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:rc-toast-spin-d234c9c5 .8s linear infinite}.rc-toast__icon[data-v-d234c9c5]{width:18px;height:18px;border-radius:50%;position:relative;flex:0 0 18px}.rc-toast__icon--success[data-v-d234c9c5]:before{content:"";position:absolute;left:3px;top:3px;width:10px;height:10px;border-right:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(45deg)}.rc-toast__icon--fail[data-v-d234c9c5]:before,.rc-toast__icon--fail[data-v-d234c9c5]:after{content:"";position:absolute;left:3px;right:3px;top:8px;height:2px;background:#fff}.rc-toast__icon--fail[data-v-d234c9c5]:before{transform:rotate(45deg)}.rc-toast__icon--fail[data-v-d234c9c5]:after{transform:rotate(-45deg)}.rc-toast-fade-enter-active[data-v-d234c9c5],.rc-toast-fade-leave-active[data-v-d234c9c5]{transition:opacity .2s ease}.rc-toast-fade-enter-from[data-v-d234c9c5],.rc-toast-fade-leave-to[data-v-d234c9c5]{opacity:0}@keyframes rc-toast-spin-d234c9c5{to{transform:rotate(360deg)}}.rc-message[data-v-87811df0]{position:fixed;top:16px;left:0;right:0;z-index:10000;pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:8px}.rc-message__item[data-v-87811df0]{pointer-events:auto;min-width:120px;max-width:80%;padding:8px 12px;border-radius:6px;color:#fff;background:#000000c7;box-shadow:0 6px 16px #0003;font-size:14px}.rc-message--success[data-v-87811df0]{background:#1677ffe6}.rc-message--warning[data-v-87811df0]{background:#faad14f2}.rc-message--error[data-v-87811df0]{background:#f53f3ff2}.rc-message--info[data-v-87811df0],.rc-message--loading[data-v-87811df0]{background:#000000c7}.rc-message-fade-enter-active[data-v-87811df0],.rc-message-fade-leave-active[data-v-87811df0]{transition:all .2s ease}.rc-message-fade-enter-from[data-v-87811df0],.rc-message-fade-leave-to[data-v-87811df0]{opacity:0;transform:translateY(-6px)}.rc-icon[data-v-3857a892]{display:inline-block;vertical-align:-.125em}.rc-icon__unicode[data-v-3857a892]{font-family:inherit;line-height:1}.rc-icon--spin[data-v-3857a892]{animation:rc-icon-rot-3857a892 1s linear infinite}@keyframes rc-icon-rot-3857a892{to{transform:rotate(360deg)}}
|