@rft-rc/recycle-ui 0.0.2 → 0.0.3-rc.2
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/README.md +38 -34
- package/dist/components/button/index.vue.d.ts +18 -6
- package/dist/components/button/index.vue.d.ts.map +1 -1
- package/dist/components/calendar/index.d.ts +5 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/index.vue.d.ts +64 -0
- package/dist/components/calendar/index.vue.d.ts.map +1 -0
- package/dist/components/calendar/panel-content.vue.d.ts +38 -0
- package/dist/components/calendar/panel-content.vue.d.ts.map +1 -0
- package/dist/components/card/index.vue.d.ts +2 -2
- package/dist/components/card/index.vue.d.ts.map +1 -1
- package/dist/components/dropdown/index.d.ts +8 -0
- package/dist/components/dropdown/index.d.ts.map +1 -0
- package/dist/components/dropdown/index.vue.d.ts +49 -0
- package/dist/components/dropdown/index.vue.d.ts.map +1 -0
- package/dist/components/dropdown/item.vue.d.ts +24 -0
- package/dist/components/dropdown/item.vue.d.ts.map +1 -0
- package/dist/components/dropdown/menu.vue.d.ts +32 -0
- package/dist/components/dropdown/menu.vue.d.ts.map +1 -0
- package/dist/components/dropdown/types.d.ts +2 -0
- package/dist/components/dropdown/types.d.ts.map +1 -0
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/index.vue.d.ts +1 -1
- package/dist/components/icon/index.vue.d.ts.map +1 -1
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.vue.d.ts +139 -0
- package/dist/components/input/index.vue.d.ts.map +1 -0
- package/dist/components/popup/index.d.ts +5 -0
- package/dist/components/popup/index.d.ts.map +1 -0
- package/dist/components/popup/index.vue.d.ts +70 -0
- package/dist/components/popup/index.vue.d.ts.map +1 -0
- package/dist/components/search-area/index.vue.d.ts +51 -11
- package/dist/components/search-area/index.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +2165 -477
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
type PopupPosition = 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
2
|
+
type CloseIconPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** 是否显示弹出层 */
|
|
5
|
+
modelValue?: boolean;
|
|
6
|
+
/** 弹出位置 */
|
|
7
|
+
position?: PopupPosition;
|
|
8
|
+
/** 是否显示遮罩层 */
|
|
9
|
+
overlay?: boolean;
|
|
10
|
+
/** 遮罩层样式类名 */
|
|
11
|
+
overlayClass?: string;
|
|
12
|
+
/** 遮罩层样式 */
|
|
13
|
+
overlayStyle?: Record<string, string>;
|
|
14
|
+
/** 是否显示关闭图标 */
|
|
15
|
+
closeable?: boolean;
|
|
16
|
+
/** 关闭图标位置 */
|
|
17
|
+
closeIconPosition?: CloseIconPosition;
|
|
18
|
+
/** 自定义关闭图标 */
|
|
19
|
+
closeIcon?: string;
|
|
20
|
+
/** 是否显示圆角 */
|
|
21
|
+
round?: boolean;
|
|
22
|
+
/** 弹出层样式 */
|
|
23
|
+
popupStyle?: Record<string, string>;
|
|
24
|
+
/** 是否点击遮罩层关闭 */
|
|
25
|
+
closeOnClickOverlay?: boolean;
|
|
26
|
+
/** 是否锁定背景滚动 */
|
|
27
|
+
lockScroll?: boolean;
|
|
28
|
+
}
|
|
29
|
+
declare function close(): void;
|
|
30
|
+
declare function open(): void;
|
|
31
|
+
declare var __VLS_16: {};
|
|
32
|
+
type __VLS_Slots = {} & {
|
|
33
|
+
default?: (props: typeof __VLS_16) => any;
|
|
34
|
+
};
|
|
35
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
36
|
+
open: typeof open;
|
|
37
|
+
close: typeof close;
|
|
38
|
+
visible: import("vue").Ref<boolean, boolean>;
|
|
39
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
40
|
+
close: () => any;
|
|
41
|
+
"update:modelValue": (value: boolean) => any;
|
|
42
|
+
open: () => any;
|
|
43
|
+
"click-overlay": () => any;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
45
|
+
onClose?: (() => any) | undefined;
|
|
46
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
47
|
+
onOpen?: (() => any) | undefined;
|
|
48
|
+
"onClick-overlay"?: (() => any) | undefined;
|
|
49
|
+
}>, {
|
|
50
|
+
round: boolean;
|
|
51
|
+
modelValue: boolean;
|
|
52
|
+
position: PopupPosition;
|
|
53
|
+
overlay: boolean;
|
|
54
|
+
overlayClass: string;
|
|
55
|
+
overlayStyle: Record<string, string>;
|
|
56
|
+
closeable: boolean;
|
|
57
|
+
closeIconPosition: CloseIconPosition;
|
|
58
|
+
closeIcon: string;
|
|
59
|
+
popupStyle: Record<string, string>;
|
|
60
|
+
closeOnClickOverlay: boolean;
|
|
61
|
+
lockScroll: boolean;
|
|
62
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
64
|
+
export default _default;
|
|
65
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$slots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/popup/index.vue"],"names":[],"mappings":"AA0WA,KAAK,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AACpE,KAAK,iBAAiB,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAEnF,UAAU,KAAK;IACb,cAAc;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW;IACX,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,cAAc;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa;IACb,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,cAAc;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,gBAAgB;IAChB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAiGD,iBAAS,KAAK,SAEb;AAGD,iBAAS,IAAI,SAEZ;AA8ID,QAAA,IAAI,QAAQ,IAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA4BhD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;WA3RX,OAAO;gBAhBF,OAAO;cAET,aAAa;aAEd,OAAO;kBAEF,MAAM;kBAEN,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;eAEzB,OAAO;uBAEC,iBAAiB;eAEzB,MAAM;gBAIL,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;yBAEb,OAAO;gBAEhB,OAAO;6EA8RpB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -8,12 +8,42 @@ export interface FilterItem {
|
|
|
8
8
|
label: string;
|
|
9
9
|
/** 筛选项唯一标识 */
|
|
10
10
|
key: string;
|
|
11
|
+
/** 筛选类型:single 单选,multiple 多选,tree-single 树形单选,tree-multiple 树形多选,input 输入框,calendar 日期选择器(默认 multiple) */
|
|
12
|
+
type: 'single' | 'multiple' | 'tree-single' | 'tree-multiple' | 'input' | 'calendar';
|
|
11
13
|
/** 选项列表 */
|
|
12
|
-
options
|
|
13
|
-
/** 筛选类型:single 单选,multiple 多选(默认) */
|
|
14
|
-
type?: 'single' | 'multiple';
|
|
14
|
+
options?: FilterOption[] | string[];
|
|
15
15
|
/** 多选时的列数(默认 2) */
|
|
16
16
|
column?: number;
|
|
17
|
+
/** 格式化 value,默认返回原始数据。为 string 时,会作为 key 从原始数据中获取值,相当于 (d) => d[format]。为函数时,以函数返回结果作为 value */
|
|
18
|
+
format?: ((data: FilterOption) => any) | string;
|
|
19
|
+
/** 渲染选项内容。为 string 时,返回 d[string]。为 function 时,返回函数结果 */
|
|
20
|
+
renderItem?: ((data: FilterOption) => any) | string;
|
|
21
|
+
/** 选中后在结果中显示的内容,默认和 renderItem 相同 */
|
|
22
|
+
renderResult?: ((data: FilterOption) => any) | string;
|
|
23
|
+
/** 树形数据下,指定子数据的属性名,有值时可以展示树形结构 */
|
|
24
|
+
childrenKey?: string;
|
|
25
|
+
/** 输入框类型的占位符(仅 type='input' 时有效) */
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
/** 是否使用插槽自定义渲染,为 true 时使用名为 key 的插槽 */
|
|
28
|
+
slot?: boolean;
|
|
29
|
+
/** 日期选择器相关配置(仅 type='calendar' 时有效) */
|
|
30
|
+
calendarConfig?: {
|
|
31
|
+
/** 是否支持区间选择:true/false 或数字(表示区间可选的最大天数) */
|
|
32
|
+
range?: boolean | number;
|
|
33
|
+
/** 最小可选日期,格式为 YYYY-MM-DD */
|
|
34
|
+
minDate?: string;
|
|
35
|
+
/** 最大可选日期,格式为 YYYY-MM-DD */
|
|
36
|
+
maxDate?: string;
|
|
37
|
+
/** 禁用日期函数 */
|
|
38
|
+
disabledDate?: (date: Date) => boolean;
|
|
39
|
+
/** 日期格式化函数 */
|
|
40
|
+
formatter?: (day: any) => {
|
|
41
|
+
text?: string;
|
|
42
|
+
bottomInfo?: string;
|
|
43
|
+
};
|
|
44
|
+
/** 区间模式下,结束日期是否自动加一天(选中日期为结束日期时,实际返回的结束日期会加一天) */
|
|
45
|
+
endDateOffset?: boolean;
|
|
46
|
+
};
|
|
17
47
|
}
|
|
18
48
|
type __VLS_Props = {
|
|
19
49
|
/** 筛选项配置 */
|
|
@@ -22,8 +52,17 @@ type __VLS_Props = {
|
|
|
22
52
|
modelValue?: Record<string, any>;
|
|
23
53
|
/** 是否显示蒙层 */
|
|
24
54
|
showMask?: boolean;
|
|
55
|
+
/** 是否自动确认:为 true 时,每次修改立即触发 change 事件并关闭弹窗,不显示确定和重置按钮 */
|
|
56
|
+
autoConfirm?: boolean;
|
|
57
|
+
};
|
|
58
|
+
declare var __VLS_14: string, __VLS_15: {
|
|
59
|
+
value: any;
|
|
60
|
+
'update:value': (val: any) => void;
|
|
61
|
+
};
|
|
62
|
+
type __VLS_Slots = {} & {
|
|
63
|
+
[K in NonNullable<typeof __VLS_14>]?: (props: typeof __VLS_15) => any;
|
|
25
64
|
};
|
|
26
|
-
declare const
|
|
65
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
27
66
|
/** 获取当前筛选值 */
|
|
28
67
|
getValues: () => {
|
|
29
68
|
[x: string]: any;
|
|
@@ -33,19 +72,20 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
|
33
72
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
34
73
|
"update:modelValue": (values: Record<string, any>) => any;
|
|
35
74
|
change: (values: Record<string, any>, item: FilterItem) => any;
|
|
36
|
-
confirm: (values: Record<string, any>, item: FilterItem) => any;
|
|
37
|
-
reset: (key?: string | undefined) => any;
|
|
38
|
-
"item-change": (key: string, value: any) => any;
|
|
39
75
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
40
76
|
"onUpdate:modelValue"?: ((values: Record<string, any>) => any) | undefined;
|
|
41
77
|
onChange?: ((values: Record<string, any>, item: FilterItem) => any) | undefined;
|
|
42
|
-
onConfirm?: ((values: Record<string, any>, item: FilterItem) => any) | undefined;
|
|
43
|
-
onReset?: ((key?: string | undefined) => any) | undefined;
|
|
44
|
-
"onItem-change"?: ((key: string, value: any) => any) | undefined;
|
|
45
78
|
}>, {
|
|
46
|
-
items: FilterItem[];
|
|
47
79
|
modelValue: Record<string, any>;
|
|
80
|
+
items: FilterItem[];
|
|
48
81
|
showMask: boolean;
|
|
82
|
+
autoConfirm: boolean;
|
|
49
83
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
84
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
50
85
|
export default _default;
|
|
86
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
87
|
+
new (): {
|
|
88
|
+
$slots: S;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
51
91
|
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search-area/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search-area/index.vue"],"names":[],"mappings":"AAuyCA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,YAAY;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,cAAc;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,2GAA2G;IAC3G,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,eAAe,GAAG,OAAO,GAAG,UAAU,CAAC;IACrF,WAAW;IACX,OAAO,CAAC,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,CAAC;IACpC,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gGAAgG;IAChG,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC;IAChD,yDAAyD;IACzD,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC;IACpD,qCAAqC;IACrC,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC;IACtD,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,cAAc,CAAC,EAAE;QACf,2CAA2C;QAC3C,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACzB,4BAA4B;QAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,4BAA4B;QAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa;QACb,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;QACvC,cAAc;QACd,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,UAAU,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACjE,kDAAkD;QAClD,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACH;AAED,KAAK,WAAW,GAAG;IACjB,YAAY;IACZ,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,wBAAwB;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,aAAa;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAutCF,QAAA,IAAI,QAAQ,QAAW,EAAE,QAAQ;;0BA3UV,GAAG;CA2UmB,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG;CAAE,CAAC;AAmD5E,QAAA,MAAM,eAAe;IA9fnB,cAAc;;;;IAEd,aAAa;;;;;;;;;gBArxBA,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WAFzB,UAAU,EAAE;cAIR,OAAO;iBAEJ,OAAO;6EAsxCrB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),me=["disabled"],fe={key:0,class:"rc-button__spinner"},pe=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 l=t,i=n,m=f=>{!l.disabled&&!l.loading&&i("click",f)},d=e.computed(()=>{const f=l.round;return typeof f=="boolean"?f?"999px":"6px":typeof f=="number"?`${f}px`:String(f)});return(f,c)=>(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:m},[t.loading?(e.openBlock(),e.createElementBlock("span",fe)):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],14,me))}}),E=(t,n)=>{const l=t.__vccOpts||t;for(const[i,m]of n)l[i]=m;return l},D=E(pe,[["__scopeId","data-v-a70e95bb"]]);D.name="rc-button";function F(t){return t.component(D.name,D),t}const ve={class:"rc-desc-item__value"},ye=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 l=e.inject("rcDescGapPx",0),i=e.inject("rcDescColCount",1),m=e.inject("rcDescLabelWidth",""),d=e.computed(()=>{const r=typeof n.span=="string"?parseInt(n.span,10):n.span,s=typeof(i==null?void 0:i.value)=="number"?i.value:i,g=!Number.isNaN(r)&&r>0?r:1;return Math.min(g,s||1)}),f=e.computed(()=>{const r=typeof(i==null?void 0:i.value)=="number"?i.value:i,s=typeof(l==null?void 0:l.value)=="number"?l.value:l,g=d.value;if(!r||r<=1||g>=r)return"100%";const v=(r-1)*s,k=(g-1)*s;return`calc((100% - ${v}px) * ${g} / ${r} + ${k}px)`}),c=e.computed(()=>{const r=typeof(m==null?void 0:m.value)=="string"?m.value:m,s=n.labelWidth!==""?n.labelWidth:r||"";return s?{width:typeof s=="number"?`${s}px`:String(s),flex:"0 0 auto"}:{}});return(r,s)=>(e.openBlock(),e.createElementBlock("div",{class:"rc-desc-item",style:e.normalizeStyle({width:f.value,flex:`0 0 ${f.value}`})},[e.createElementVNode("div",{class:"rc-desc-item__label",style:e.normalizeStyle(c.value)},[e.renderSlot(r.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],4),e.createElementVNode("div",ve,[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.value),1)],!0)])],4))}}),x=E(ye,[["__scopeId","data-v-970d0b99"]]),ke={class:"rc-descriptions"},ge={key:0,class:"rc-descriptions__title"},he=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,l=e.ref(null),i=e.computed(()=>typeof n.gap=="number"?`${n.gap}px`:String(n.gap)),m=e.computed(()=>{const s=typeof n.column=="string"?Number.parseInt(n.column,10):n.column??1;return!Number.isNaN(s)&&s>0?s:1}),d=e.ref("100%"),f=e.ref("100%");e.watchEffect(()=>{const s=m.value;if(s<=1)d.value="100%",f.value="100%";else{const g=typeof n.gap=="number"?n.gap:parseFloat(String(n.gap))||0,k=`calc((100% - ${(s-1)*g}px) / ${s})`;f.value=k,d.value=k}}),e.provide("rcDescItemWidth",d),e.provide("rcDescSingleWidth",f),e.provide("rcDescColCount",m),e.provide("rcDescGapPx",e.computed(()=>typeof n.gap=="number"?n.gap:parseFloat(String(n.gap))||0));const c=e.computed(()=>n.labelWidth===""||n.labelWidth===void 0?"":typeof n.labelWidth=="number"?`${n.labelWidth}px`:String(n.labelWidth));e.provide("rcDescLabelWidth",c),e.provide("rcDescGap",e.computed(()=>typeof n.gap=="number"?`${n.gap}px`:String(n.gap)));const r=e.computed(()=>{var v,k,y;const s=((v=n.keyMap)==null?void 0:v.key)??"label",g=((k=n.keyMap)==null?void 0:k.value)??"value";return(y=n.data)!=null&&y.length?n.data.map(C=>({label:C==null?void 0:C[s],value:C==null?void 0:C[g]})):[]});return(s,g)=>(e.openBlock(),e.createElementBlock("div",ke,[s.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",ge,[e.renderSlot(s.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-descriptions__body",style:e.normalizeStyle({gap:i.value}),ref_key:"wrapEl",ref:l},[r.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(v,k)=>(e.openBlock(),e.createBlock(x,{key:k,label:v.label,value:v.value,"label-width":t.labelWidth},null,8,["label","value","label-width"]))),128)):e.renderSlot(s.$slots,"default",{key:1},void 0,!0)],4)]))}}),I=E(he,[["__scopeId","data-v-5fcaa235"]]);I.name="rc-descriptions";x.name="rc-descriptions-item";function O(t){return t.component(I.name,I),t.component("RcDescriptions",I),t.component(x.name,x),t.component("RcDescriptionsItem",x),t}const ee=I,te=x,_e={class:"rc-card__title"},be={class:"rc-card__title-text"},Ce={key:0,class:"rc-card__status"},Be={key:1,class:"rc-card__divider"},$e={key:2,class:"rc-card__action"},Se=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,l=e.computed(()=>{const c=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:c,boxShadow:f(n.elevation),width:d(n.width),height:d(n.height)}}),i=e.computed(()=>n.padding||"16px"),m=e.computed(()=>typeof n.gap=="number"?`${n.gap}px`:String(n.gap));function d(c){return c==null||c===""?"":typeof c=="number"?`${c}px`:String(c)}function f(c){if(!c||c<=0)return"none";const r=4*c;return`0 ${Math.round(r/2)}px ${r}px rgba(0,0,0,0.06), 0 ${Math.round(r/4)}px ${Math.round(r/2)}px rgba(0,0,0,0.04)`}return(c,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-card",[{"rc-card--bordered":t.bordered}]]),style:e.normalizeStyle(l.value)},[c.$slots.title||t.title||c.$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",_e,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("span",be,e.toDisplayString(t.title),1)],!0)]),c.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(c.$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:i.value,gap:m.value})},[e.renderSlot(c.$slots,"content",{},()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)],!0)],4),c.$slots.action?(e.openBlock(),e.createElementBlock("div",Be)):e.createCommentVNode("",!0),c.$slots.action?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(c.$slots,"action",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),R=E(Se,[["__scopeId","data-v-a7b95214"]]);R.name="rc-card";const Ee="RcCard";function j(t){return t.component(R.name,R),t.component(Ee,R),t}const Ve={key:0,class:"rc-toast__mask"},Ne={class:"rc-toast__content"},xe={key:0,class:"rc-toast__spinner"},we={key:1,class:"rc-toast__icon rc-toast__icon--success"},De={key:2,class:"rc-toast__icon rc-toast__icon--fail"},Ie={class:"rc-toast__text"},Re=e.defineComponent({__name:"index",props:{message:{default:""},type:{default:"text"},duration:{default:2e3},mask:{type:Boolean,default:!1},onAfterLeave:{}},setup(t,{expose:n}){const l=t,i=e.ref(!0);let m;function d(){m&&(clearTimeout(m),m=null)}function f(){d(),i.value=!1}return n({close:f}),e.onMounted(()=>{l.duration&&l.duration>0&&(m=setTimeout(()=>{f()},l.duration))}),e.onUnmounted(()=>{d()}),(c,r)=>(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(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-toast",[`rc-toast--${t.type}`]])},[t.mask?(e.openBlock(),e.createElementBlock("div",Ve)):e.createCommentVNode("",!0),e.createElementVNode("div",Ne,[t.type==="loading"?(e.openBlock(),e.createElementBlock("div",xe)):t.type==="success"?(e.openBlock(),e.createElementBlock("div",we)):t.type==="fail"?(e.openBlock(),e.createElementBlock("div",De)):e.createCommentVNode("",!0),e.createElementVNode("div",Ie,e.toDisplayString(t.message),1)])],2)):e.createCommentVNode("",!0)]),_:1},8,["onAfterLeave"])])),e.renderSlot(c.$slots,"default",{},void 0,!0)],64))}}),z=E(Re,[["__scopeId","data-v-d234c9c5"]]);let V=null,w=null;function X(){V&&(V.unmount(),V=null),w&&(document.body.removeChild(w),w=null)}function ze(t){const n=typeof t=="string"?{message:t}:t||{};X(),w=document.createElement("div"),document.body.appendChild(w);const l={message:n.message,type:n.type??"text",duration:n.duration??2e3,mask:n.mask??!1,onAfterLeave:()=>{var i;X(),(i=n.onClose)==null||i.call(n)}};return V=e.createApp(z,l),V.mount(w),{close:ne}}function ne(){var t,n,l;V&&((l=(n=(t=V._instance)==null?void 0:t.exposed)==null?void 0:n.close)==null||l.call(n))}z.name="rc-toast";function Z(t){return t.component(z.name,z),t}const Ae={class:"rc-message",role:"alert","aria-live":"polite"},Te={class:"rc-message__content"},Le=e.defineComponent({__name:"index",setup(t,{expose:n}){const l=e.reactive([]);let i=1;function m(f){const c=l.findIndex(r=>r.id===f);c>=0&&l.splice(c,1)}function d(f,c,r){const s=i++;return l.push({id:s,type:f,content:c,duration:r}),r>0&&window.setTimeout(()=>m(s),r),s}return n({add:d,remove:m}),(f,c)=>(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(e.TransitionGroup,{name:"rc-message-fade",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id,class:e.normalizeClass(["rc-message__item",`rc-message--${r.type}`])},[e.createElementVNode("span",Te,e.toDisplayString(r.content),1)],2))),128))]),_:1})]))}}),We=E(Le,[["__scopeId","data-v-87811df0"]]);let $=null,B=null;function Me(){var n;if($&&B)return;$=document.createElement("div"),document.body.appendChild($);const t=e.createVNode(We,{});e.render(t,$),B=(n=t.component)==null?void 0:n.exposed}function N(t,n,l){var m;Me();const i=typeof l=="number"?l:t==="loading"?0:2e3;return(m=B==null?void 0:B.add)==null?void 0:m.call(B,t,n,i)}const oe={open(t){return N(t.type||"info",t.content,t.duration)},info(t,n){return N("info",t,n)},success(t,n){return N("success",t,n)},warning(t,n){return N("warning",t,n)},error(t,n){return N("error",t,n)},loading(t,n){return N("loading",t,n)},destroy(){$&&(e.render(null,$),$.remove(),$=null,B=null)}};function G(t){return t.config.globalProperties.$message=oe,t}const Ue={key:0,class:"rc-icon__unicode"},Fe=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,l=e.inject(W,{}),i=e.computed(()=>(l==null?void 0:l.iconClass)||"iconfont"),m=e.computed(()=>n.name||""),d=e.computed(()=>typeof n.size=="number"?`${n.size}px`:n.size||"16px"),f=e.computed(()=>({fontSize:d.value,color:n.color||void 0,lineHeight:1,fontFamily:(l==null?void 0:l.iconClass)||"iconfont"})),c=e.computed(()=>{const r=n.code;if(r==null||r===""||r===0)return"";if(typeof r=="number")return String.fromCharCode(r);const s=String(r).replace(/^0x/i,""),g=parseInt(s,16);return Number.isNaN(g)?"":String.fromCharCode(g)});return e.onMounted(()=>{if(typeof window>"u")return;const r=l&&l.iconCssUrl||H.iconCssUrl;if(!r)return;const s=`link[rel="stylesheet"][data-rcui-icon="true"][href="${r}"]`;if(!document.head.querySelector(s)){const v=document.createElement("link");v.rel="stylesheet",v.href=r,v.setAttribute("data-rcui-icon","true"),document.head.appendChild(v)}}),(r,s)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["rc-icon",[i.value,m.value,{"rc-icon--spin":t.spin}]]),style:e.normalizeStyle(f.value),"aria-hidden":"true"},[c.value?(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)],6))}}),S=E(Fe,[["__scopeId","data-v-3857a892"]]);S.name="rc-icon";function P(t){return t.component(S.name,S),t.component("RcIcon",S),t}const Oe={class:"rc-search-area"},je={class:"rc-search-area__bar"},Ge=["onClick"],Pe={class:"rc-search-area__item-label"},Ye={class:"rc-search-area__panel-content"},qe={key:0,class:"rc-search-area__options-grid"},He=["onClick"],Ke={class:"rc-search-area__option-label"},Je={key:1,class:"rc-search-area__options-grid"},Qe=["onClick"],Xe={class:"rc-search-area__option-label"},Ze={key:2,class:"rc-search-area__empty"},et={class:"rc-search-area__panel-footer"},tt=e.defineComponent({name:"rc-search-area",__name:"index",props:{items:{default:()=>[]},modelValue:{default:()=>({})},showMask:{type:Boolean,default:!0}},emits:["update:modelValue","change","confirm","reset","item-change"],setup(t,{expose:n,emit:l}){const i=t,m=l,d=e.ref(null),f=e.ref(null),c=e.ref(null),r=e.ref({top:"0px"}),s=async()=>{if(d.value===null||!f.value)return;await e.nextTick();const a=f.value.getBoundingClientRect().top;r.value={top:`${a}px`}},g=o=>{if(d.value===null||!f.value)return;const a=o.target;if(f.value.contains(a))return;const u=f.value.closest(".rc-search-area");if(u){const p=u.querySelector(".rc-search-area__bar");if(p&&p.contains(a))return}M()};e.watch(d,async o=>{o!==null?(await e.nextTick(),s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),document.addEventListener("click",g,!0)):(window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),document.removeEventListener("click",g,!0))}),e.onUnmounted(()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),document.removeEventListener("click",g,!0)});const v=e.ref({}),k=e.ref({...i.modelValue});e.watch(()=>i.modelValue,o=>{k.value={...o||{}}},{deep:!0,immediate:!0});const y=e.computed(()=>d.value===null?null:i.items[d.value]),C=e.computed(()=>{if(!y.value)return"";const o=ue(y.value);return o>0?`(${o}项)`:""}),ae=o=>{const a=k.value[o.key];if(a==null||a==="")return o.label;if(o.type==="single"){const u=J(o,a);if(u)return`${o.label}: ${A(u)}`}else{const u=Array.isArray(a)?a:[a];if(u.length>0){const p=u.map(h=>{const _=J(o,h);return _?A(_):null}).filter(h=>h!==null);if(p.length>0)return`${o.label}: ${p.join("、")}`}}return o.label},le=o=>{const a=i.items[o];if(!a)return;if(d.value===o){d.value=null;return}const u=k.value[a.key];a.type==="single"?v.value[a.key]=u!==void 0?u:null:v.value[a.key]=u!==void 0?Array.isArray(u)?[...u]:[u]:[],d.value=o},M=()=>{d.value=null},A=o=>typeof o=="string"?o:o.label||String(o.value),T=o=>typeof o=="string"?o:o.value!==void 0?o.value:o,J=(o,a)=>o.options.find(u=>{const p=T(u);return p===a||String(p)===String(a)})||null,L=o=>{if(!y.value)return!1;const a=y.value.key,u=v.value[a],p=T(o);return y.value.type==="single"?u!=null&&u===p:(Array.isArray(u)?u:[]).some(_=>_===p||String(_)===String(p))},re=o=>{if(!y.value)return;const a=y.value.key,u=T(o);v.value[a]===u?v.value[a]=null:v.value[a]=u},ce=o=>{if(!y.value)return;const a=y.value.key,u=T(o),p=Array.isArray(v.value[a])?[...v.value[a]]:[],h=p.findIndex(_=>_===u||String(_)===String(u));h>=0?p.splice(h,1):p.push(u),v.value[a]=p},se=()=>{if(!y.value)return;const o=y.value.key;y.value.type==="single"?v.value[o]=null:v.value[o]=[]},ie=()=>{if(!y.value)return;const o=y.value.key,a=v.value[o],u=k.value[o];let p;y.value.type==="single"?(p=a??void 0,k.value[o]=p):(p=Array.isArray(a)&&a.length>0?a:void 0,k.value[o]=p),m("update:modelValue",{...k.value}),m("change",{...k.value},y.value),m("confirm",{...k.value},y.value),JSON.stringify(u)!==JSON.stringify(p)&&m("item-change",o,p),M()},Q=o=>{const a=k.value[o.key];return a==null||a===""?0:o.type==="single"?1:Array.isArray(a)?a.length:a?1:0},ue=o=>{const a=v.value[o.key];return a==null||a===""?0:o.type==="single"?1:Array.isArray(a)?a.length:0};return n({getValues:()=>({...k.value}),reset:()=>{k.value={},v.value={},m("update:modelValue",{}),m("change",{},null),m("reset")}}),(o,a)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.items,(u,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass(["rc-search-area__item",{"is-active":d.value===p,"has-value":Q(u)>0}]),onClick:h=>le(p)},[e.createElementVNode("span",Pe,e.toDisplayString(ae(u)),1),e.createVNode(e.unref(S),{name:"icon_a-xiala2",color:d.value!==p&&Q(u)>0?"#1677ff":"#969799",class:e.normalizeClass(["rc-search-area__item-arrow",{"is-up":d.value===p}])},null,8,["color","class"])],10,Ge))),128))]),e.createVNode(e.Transition,{name:"rc-search-area-fade"},{default:e.withCtx(()=>[d.value!==null&&i.showMask?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"maskRef",ref:c,class:"rc-search-area__mask",style:e.normalizeStyle(r.value),onClick:M},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"rc-search-area-slide"},{default:e.withCtx(()=>{var u,p,h,_;return[d.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:f,class:"rc-search-area__panel"},[e.createElementVNode("div",Ye,[((u=y.value)==null?void 0:u.type)==="single"?(e.openBlock(),e.createElementBlock("div",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.options,(b,U)=>(e.openBlock(),e.createElementBlock("div",{key:U,class:e.normalizeClass(["rc-search-area__option",{"is-selected":L(b)}]),onClick:de=>re(b)},[e.createElementVNode("span",Ke,e.toDisplayString(A(b)),1),L(b)?(e.openBlock(),e.createBlock(e.unref(S),{key:0,name:"icon_select",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,He))),128))])):(e.openBlock(),e.createElementBlock("div",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((p=y.value)==null?void 0:p.options)||[],(b,U)=>(e.openBlock(),e.createElementBlock("div",{key:U,class:e.normalizeClass(["rc-search-area__option",{"is-selected":L(b)}]),onClick:de=>ce(b)},[e.createElementVNode("span",Xe,e.toDisplayString(A(b)),1),L(b)?(e.openBlock(),e.createBlock(e.unref(S),{key:0,name:"icon_select",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Qe))),128))])),((_=(h=y.value)==null?void 0:h.options)==null?void 0:_.length)===0?(e.openBlock(),e.createElementBlock("div",Ze,[...a[0]||(a[0]=[e.createElementVNode("p",null,"暂无选项",-1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",et,[e.createVNode(e.unref(D),{block:"",onClick:se},{default:e.withCtx(()=>[...a[1]||(a[1]=[e.createTextVNode(" 重置 ",-1)])]),_:1}),e.createVNode(e.unref(D),{type:"primary",block:"",onClick:ie},{default:e.withCtx(()=>[e.createTextVNode(" 确定"+e.toDisplayString(C.value),1)]),_:1})])],512)):e.createCommentVNode("",!0)]}),_:1})]))}}),Y=E(tt,[["__scopeId","data-v-6a70650d"]]),q=t=>{t.component("RcSearchArea",Y),t.component("rc-search-area",Y)},W=Symbol("RECYCLE_UI_CONFIG"),H={prefix:"rc",autoRegister:!0,provideKey:W,theme:{},iconCssUrl:"//at.alicdn.com/t/c/font_4252799_9vcnw0pnmkh.css",iconClass:"iconfont"};function nt(t,n){n.autoRegister!==!1&&(typeof F=="function"&&F(t),typeof O=="function"&&O(t),typeof j=="function"&&j(t),typeof Z=="function"&&Z(t),typeof P=="function"&&P(t),typeof G=="function"&&G(t),typeof q=="function"&&q(t))}const K=(t,n)=>{const l={...H,...n||{}};if(t.provide(l.provideKey??W,l),t.config.globalProperties.$recycleUI=l,typeof window<"u"&&l.iconCssUrl){const i=`link[rel="stylesheet"][data-rcui-icon="true"][href="${l.iconCssUrl}"]`;if(!document.head.querySelector(i)){const d=document.createElement("link");d.rel="stylesheet",d.href=l.iconCssUrl,d.setAttribute("data-rcui-icon","true"),document.head.appendChild(d)}}return nt(t,l),t},ot={install:K};function at(t){return{install(n){K(n,t)}}}exports.RECYCLE_UI_SYMBOL=W;exports.RcButton=D;exports.RcCard=R;exports.RcDescriptions=ee;exports.RcDescriptionsItem=te;exports.RcIcon=S;exports.RcSearchArea=Y;exports.RcToast=z;exports.createRecycleUI=at;exports.default=ot;exports.defaultRecycleUIConfig=H;exports.hideToast=ne;exports.install=K;exports.installButton=F;exports.installCard=j;exports.installDescriptions=O;exports.installIcon=P;exports.installMessage=G;exports.installSearchArea=q;exports.message=oe;exports.rcDescriptions=ee;exports.rcDescriptionsItem=te;exports.showToast=ze;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),ct={key:0,class:"rc-icon__unicode"},st=e.defineComponent({name:"rc-icon",__name:"index",props:{name:{},size:{default:16},color:{default:""},spin:{type:Boolean,default:!1},code:{default:""}},setup(t){const s=t,m=e.inject(Ve,{}),n=e.computed(()=>(m==null?void 0:m.iconClass)||"iconfont"),y=e.computed(()=>s.name||""),g=e.computed(()=>typeof s.size=="number"?`${s.size}px`:s.size||"16px"),f=e.computed(()=>({fontSize:g.value,color:s.color||void 0,lineHeight:1,fontFamily:(m==null?void 0:m.iconClass)||"iconfont"})),d=e.computed(()=>{const c=s.code;if(c==null||c===""||c===0)return"";if(typeof c=="number")return String.fromCharCode(c);const v=String(c).replace(/^0x/i,""),S=parseInt(v,16);return Number.isNaN(S)?"":String.fromCharCode(S)});return e.onMounted(()=>{if(typeof window>"u")return;const c=m&&m.iconCssUrl||Fe.iconCssUrl;if(!c)return;const v=`link[rel="stylesheet"][data-rcui-icon="true"][href="${c}"]`;if(!document.head.querySelector(v)){const B=document.createElement("link");B.rel="stylesheet",B.href=c,B.setAttribute("data-rcui-icon","true"),document.head.appendChild(B)}}),(c,v)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["rc-icon",[n.value,y.value,{"rc-icon--spin":t.spin}]]),style:e.normalizeStyle(f.value),"aria-hidden":"true"},[d.value?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0)],6))}}),K=(t,s)=>{const m=t.__vccOpts||t;for(const[n,y]of s)m[n]=y;return m},P=K(st,[["__scopeId","data-v-3857a892"]]),it=["disabled"],ut={key:0,class:"rc-button__spinner"},dt={key:0,class:"rc-button__icon rc-button__icon--prefix"},ft={key:2,class:"rc-button__icon rc-button__icon--suffix"},mt=e.defineComponent({__name:"index",props:{type:{default:"default"},size:{default:"medium"},mode:{default:void 0},block:{type:Boolean,default:!1},label:{default:""},round:{type:[Number,String,Boolean],default:6},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},preIcon:{default:""},suffixIcon:{default:""}},emits:["click"],setup(t,{emit:s}){const m=t,n=s,y=f=>{!m.disabled&&!m.loading&&n("click",f)},g=e.computed(()=>{const f=m.round;return typeof f=="boolean"?f?"999px":"6px":typeof f=="number"?`${f}px`:String(f)});return(f,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["rc-button",[`rc-button--${t.type}`,`rc-button--${t.size}`,t.mode?`rc-button--${t.mode}`:"",{"is-block":t.block,"is-disabled":t.disabled,"is-loading":t.loading}]]),style:e.normalizeStyle({borderRadius:g.value}),disabled:t.disabled||t.loading,onClick:y},[t.loading?(e.openBlock(),e.createElementBlock("span",ut)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.preIcon||f.$slots.preIcon?(e.openBlock(),e.createElementBlock("span",dt,[e.renderSlot(f.$slots,"preIcon",{},()=>[t.preIcon?(e.openBlock(),e.createBlock(P,{key:0,name:t.preIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],64)),e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0),!t.loading&&(t.suffixIcon||f.$slots.suffixIcon)?(e.openBlock(),e.createElementBlock("span",ft,[e.renderSlot(f.$slots,"suffixIcon",{},()=>[t.suffixIcon?(e.openBlock(),e.createBlock(P,{key:0,name:t.suffixIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],14,it))}}),le=K(mt,[["__scopeId","data-v-4c6a5e4f"]]);le.name="rc-button";function Ae(t){return t.component(le.name,le),t}const vt={class:"rc-desc-item__value"},pt=e.defineComponent({name:"rc-descriptions-item",__name:"item",props:{label:{default:""},value:{default:""},labelWidth:{default:""},span:{default:1}},setup(t){const s=t;e.inject("rcDescItemWidth",void 0),e.inject("rcDescSingleWidth",""),e.inject("rcDescGap","0px");const m=e.inject("rcDescGapPx",0),n=e.inject("rcDescColCount",1),y=e.inject("rcDescLabelWidth",""),g=e.computed(()=>{const c=typeof s.span=="string"?parseInt(s.span,10):s.span,v=typeof(n==null?void 0:n.value)=="number"?n.value:n,S=!Number.isNaN(c)&&c>0?c:1;return Math.min(S,v||1)}),f=e.computed(()=>{const c=typeof(n==null?void 0:n.value)=="number"?n.value:n,v=typeof(m==null?void 0:m.value)=="number"?m.value:m,S=g.value;if(!c||c<=1||S>=c)return"100%";const B=(c-1)*v,k=(S-1)*v;return`calc((100% - ${B}px) * ${S} / ${c} + ${k}px)`}),d=e.computed(()=>{const c=typeof(y==null?void 0:y.value)=="string"?y.value:y,v=s.labelWidth!==""?s.labelWidth:c||"";return v?{width:typeof v=="number"?`${v}px`:String(v),flex:"0 0 auto"}:{}});return(c,v)=>(e.openBlock(),e.createElementBlock("div",{class:"rc-desc-item",style:e.normalizeStyle({width:f.value,flex:`0 0 ${f.value}`})},[e.createElementVNode("div",{class:"rc-desc-item__label",style:e.normalizeStyle(d.value)},[e.renderSlot(c.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],4),e.createElementVNode("div",vt,[e.renderSlot(c.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.value),1)],!0)])],4))}}),ye=K(pt,[["__scopeId","data-v-970d0b99"]]),yt={class:"rc-descriptions"},ht={key:0,class:"rc-descriptions__title"},gt=e.defineComponent({name:"rc-descriptions",__name:"index",props:{title:{},column:{default:2},gap:{default:4},labelWidth:{default:""},data:{default:()=>[]},keyMap:{}},setup(t){const s=t,m=e.ref(null),n=e.computed(()=>typeof s.gap=="number"?`${s.gap}px`:String(s.gap)),y=e.computed(()=>{const v=typeof s.column=="string"?Number.parseInt(s.column,10):s.column??1;return!Number.isNaN(v)&&v>0?v:1}),g=e.ref("100%"),f=e.ref("100%");e.watchEffect(()=>{const v=y.value;if(v<=1)g.value="100%",f.value="100%";else{const S=typeof s.gap=="number"?s.gap:parseFloat(String(s.gap))||0,k=`calc((100% - ${(v-1)*S}px) / ${v})`;f.value=k,g.value=k}}),e.provide("rcDescItemWidth",g),e.provide("rcDescSingleWidth",f),e.provide("rcDescColCount",y),e.provide("rcDescGapPx",e.computed(()=>typeof s.gap=="number"?s.gap:parseFloat(String(s.gap))||0));const d=e.computed(()=>s.labelWidth===""||s.labelWidth===void 0?"":typeof s.labelWidth=="number"?`${s.labelWidth}px`:String(s.labelWidth));e.provide("rcDescLabelWidth",d),e.provide("rcDescGap",e.computed(()=>typeof s.gap=="number"?`${s.gap}px`:String(s.gap)));const c=e.computed(()=>{var B,k,D;const v=((B=s.keyMap)==null?void 0:B.key)??"label",S=((k=s.keyMap)==null?void 0:k.value)??"value";return(D=s.data)!=null&&D.length?s.data.map(N=>({label:N==null?void 0:N[v],value:N==null?void 0:N[S]})):[]});return(v,S)=>(e.openBlock(),e.createElementBlock("div",yt,[v.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",ht,[e.renderSlot(v.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-descriptions__body",style:e.normalizeStyle({gap:n.value}),ref_key:"wrapEl",ref:m},[c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,(B,k)=>(e.openBlock(),e.createBlock(ye,{key:k,label:B.label,value:B.value,"label-width":t.labelWidth},null,8,["label","value","label-width"]))),128)):e.renderSlot(v.$slots,"default",{key:1},void 0,!0)],4)]))}}),_e=K(gt,[["__scopeId","data-v-5fcaa235"]]);_e.name="rc-descriptions";ye.name="rc-descriptions-item";function Ye(t){return t.component(_e.name,_e),t.component("RcDescriptions",_e),t.component(ye.name,ye),t.component("RcDescriptionsItem",ye),t}const nt=_e,at=ye,kt={class:"rc-card__title"},bt={class:"rc-card__title-text"},_t={key:0,class:"rc-card__status"},Ct={key:1,class:"rc-card__divider"},Bt={key:2,class:"rc-card__action"},wt=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 s=t,m=e.computed(()=>{const d=typeof s.round=="boolean"?s.round?"12px":"0":typeof s.round=="number"?`${s.round}px`:String(s.round);return{backgroundColor:s.color||"var(--rc-white)",borderRadius:d,boxShadow:f(s.elevation),width:g(s.width),height:g(s.height)}}),n=e.computed(()=>s.padding||"16px"),y=e.computed(()=>typeof s.gap=="number"?`${s.gap}px`:String(s.gap));function g(d){return d==null||d===""?"":typeof d=="number"?`${d}px`:String(d)}function f(d){if(!d||d<=0)return"none";const c=4*d;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(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-card",[{"rc-card--bordered":t.bordered}]]),style:e.normalizeStyle(m.value)},[d.$slots.title||t.title||d.$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",kt,[e.renderSlot(d.$slots,"title",{},()=>[e.createElementVNode("span",bt,e.toDisplayString(t.title),1)],!0)]),d.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",_t,[e.renderSlot(d.$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:n.value,gap:y.value})},[e.renderSlot(d.$slots,"content",{},()=>[e.renderSlot(d.$slots,"default",{},void 0,!0)],!0)],4),d.$slots.action?(e.openBlock(),e.createElementBlock("div",Ct)):e.createCommentVNode("",!0),d.$slots.action?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(d.$slots,"action",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),Ce=K(wt,[["__scopeId","data-v-a7b95214"]]);Ce.name="rc-card";const xt="RcCard";function Pe(t){return t.component(Ce.name,Ce),t.component(xt,Ce),t}const Vt={key:0,class:"rc-toast__mask"},Dt={class:"rc-toast__content"},$t={key:0,class:"rc-toast__spinner"},St={key:1,class:"rc-toast__icon rc-toast__icon--success"},Et={key:2,class:"rc-toast__icon rc-toast__icon--fail"},Nt={class:"rc-toast__text"},Mt=e.defineComponent({__name:"index",props:{message:{default:""},type:{default:"text"},duration:{default:2e3},mask:{type:Boolean,default:!1},onAfterLeave:{}},setup(t,{expose:s}){const m=t,n=e.ref(!0);let y;function g(){y&&(clearTimeout(y),y=null)}function f(){g(),n.value=!1}return s({close:f}),e.onMounted(()=>{m.duration&&m.duration>0&&(y=setTimeout(()=>{f()},m.duration))}),e.onUnmounted(()=>{g()}),(d,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(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-toast",[`rc-toast--${t.type}`]])},[t.mask?(e.openBlock(),e.createElementBlock("div",Vt)):e.createCommentVNode("",!0),e.createElementVNode("div",Dt,[t.type==="loading"?(e.openBlock(),e.createElementBlock("div",$t)):t.type==="success"?(e.openBlock(),e.createElementBlock("div",St)):t.type==="fail"?(e.openBlock(),e.createElementBlock("div",Et)):e.createCommentVNode("",!0),e.createElementVNode("div",Nt,e.toDisplayString(t.message),1)])],2)):e.createCommentVNode("",!0)]),_:1},8,["onAfterLeave"])])),e.renderSlot(d.$slots,"default",{},void 0,!0)],64))}}),Be=K(Mt,[["__scopeId","data-v-d234c9c5"]]);let me=null,he=null;function Ze(){me&&(me.unmount(),me=null),he&&(document.body.removeChild(he),he=null)}function It(t){const s=typeof t=="string"?{message:t}:t||{};Ze(),he=document.createElement("div"),document.body.appendChild(he);const m={message:s.message,type:s.type??"text",duration:s.duration??2e3,mask:s.mask??!1,onAfterLeave:()=>{var n;Ze(),(n=s.onClose)==null||n.call(s)}};return me=e.createApp(Be,m),me.mount(he),{close:ot}}function ot(){var t,s,m;me&&((m=(s=(t=me._instance)==null?void 0:t.exposed)==null?void 0:s.close)==null||m.call(s))}Be.name="rc-toast";function et(t){return t.component(Be.name,Be),t}const Tt={class:"rc-message",role:"alert","aria-live":"polite"},Rt={class:"rc-message__content"},zt=e.defineComponent({__name:"index",setup(t,{expose:s}){const m=e.reactive([]);let n=1;function y(f){const d=m.findIndex(c=>c.id===f);d>=0&&m.splice(d,1)}function g(f,d,c){const v=n++;return m.push({id:v,type:f,content:d,duration:c}),c>0&&window.setTimeout(()=>y(v),c),v}return s({add:g,remove:y}),(f,d)=>(e.openBlock(),e.createElementBlock("div",Tt,[e.createVNode(e.TransitionGroup,{name:"rc-message-fade",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:e.normalizeClass(["rc-message__item",`rc-message--${c.type}`])},[e.createElementVNode("span",Rt,e.toDisplayString(c.content),1)],2))),128))]),_:1})]))}}),Ft=K(zt,[["__scopeId","data-v-87811df0"]]);let fe=null,de=null;function Lt(){var s;if(fe&&de)return;fe=document.createElement("div"),document.body.appendChild(fe);const t=e.createVNode(Ft,{});e.render(t,fe),de=(s=t.component)==null?void 0:s.exposed}function pe(t,s,m){var y;Lt();const n=typeof m=="number"?m:t==="loading"?0:2e3;return(y=de==null?void 0:de.add)==null?void 0:y.call(de,t,s,n)}const lt={open(t){return pe(t.type||"info",t.content,t.duration)},info(t,s){return pe("info",t,s)},success(t,s){return pe("success",t,s)},warning(t,s){return pe("warning",t,s)},error(t,s){return pe("error",t,s)},loading(t,s){return pe("loading",t,s)},destroy(){fe&&(e.render(null,fe),fe.remove(),fe=null,de=null)}};function We(t){return t.config.globalProperties.$message=lt,t}P.name="rc-icon";function Oe(t){return t.component(P.name,P),t.component("RcIcon",P),t}const At={class:"rc-popup__content"},Yt=e.defineComponent({name:"rc-popup",__name:"index",props:{modelValue:{type:Boolean,default:!1},position:{default:"center"},overlay:{type:Boolean,default:!0},overlayClass:{default:""},overlayStyle:{default:void 0},closeable:{type:Boolean,default:!1},closeIconPosition:{default:"top-right"},closeIcon:{default:"icon_close"},round:{type:Boolean,default:!1},popupStyle:{default:void 0},closeOnClickOverlay:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0}},emits:["update:modelValue","open","close","click-overlay"],setup(t,{expose:s,emit:m}){const n=t,y=m,g=e.ref(),f=e.ref(n.modelValue);e.watch(()=>n.modelValue,i=>{f.value=i,i?(y("open"),n.lockScroll&&S()):(y("close"),n.lockScroll&&B())},{immediate:!0}),e.watch(f,i=>{i!==n.modelValue&&y("update:modelValue",i)});const d=e.computed(()=>`rc-popup-slide-${n.position}`),c=e.computed(()=>({...n.popupStyle||{}}));let v=!1;function S(){v||(v=!0,document.body.style.overflow="hidden")}function B(){v&&(v=!1,document.body.style.overflow="")}function k(){y("click-overlay"),n.closeOnClickOverlay&&N()}function D(){N()}function N(){f.value=!1}function x(){f.value=!0}return e.onUnmounted(()=>{B()}),s({open:x,close:N,visible:f}),(i,Z)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-popup-fade"},{default:e.withCtx(()=>[f.value&&n.overlay?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__overlay",{"rc-popup__overlay--transparent":n.overlayClass==="transparent"}]),style:e.normalizeStyle(n.overlayStyle),onClick:k},null,6)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:d.value},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popupRef",ref:g,class:e.normalizeClass(["rc-popup",[`rc-popup--${t.position}`,{"rc-popup--round":t.round}]]),style:e.normalizeStyle(c.value),onClick:Z[0]||(Z[0]=e.withModifiers(()=>{},["stop"]))},[t.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__close",`rc-popup__close--${t.closeIconPosition}`]),onClick:D},[e.createVNode(P,{name:t.closeIcon,class:"rc-popup__close-icon"},null,8,["name"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",At,[e.renderSlot(i.$slots,"default",{},void 0,!0)])],6)):e.createCommentVNode("",!0)]),_:3},8,["name"])]))}}),ge=K(Yt,[["__scopeId","data-v-f1696784"]]);ge.name="rc-popup";const Pt="RcPopup";function He(t){return t.component(ge.name,ge),t.component(Pt,ge),t}const Wt={key:0,class:"rc-calendar__header"},Ot={class:"rc-calendar__header-title"},Ht={key:1,class:"rc-calendar__shortcuts"},jt={class:"rc-calendar__shortcuts-scroll"},Ut=["onClick"],Kt={class:"rc-calendar__month-title"},Gt={class:"rc-calendar__weekdays"},qt={class:"rc-calendar__days"},Jt=["onClick"],Qt={class:"rc-calendar__day-content"},Xt={class:"rc-calendar__day-text"},Zt={key:0,class:"rc-calendar__day-bottom"},en={key:2,class:"rc-calendar__footer"},tn={key:0,class:"rc-calendar__month-picker-overlay"},nn={class:"rc-calendar__month-picker"},an={class:"rc-calendar__month-picker-header"},on={class:"rc-calendar__month-picker-title"},ln={key:0},rn={key:0,class:"rc-calendar__year-picker-content"},cn={class:"rc-calendar__year-picker-grid"},sn=["onClick"],un={key:1,class:"rc-calendar__month-picker-content"},dn=["onClick"],Te=48,Q=3,Le=7,fn=e.defineComponent({__name:"panel-content",props:{showTitle:{type:Boolean},title:{},range:{type:Boolean},selectedDate:{},rangeStart:{},rangeEnd:{},minDate:{},maxDate:{},disabledDate:{type:Function},formatter:{type:Function},showFooter:{type:Boolean},maxRangeDays:{}},emits:["select-day","clear","confirm","shortcut-select"],setup(t,{expose:s,emit:m}){const n=t,y=m,g=["日","一","二","三","四","五","六"];function f(o){if(!o)return null;const r=new Date(o);return isNaN(r.getTime())?null:r}function d(o){const r=o.getFullYear(),h=String(o.getMonth()+1).padStart(2,"0"),E=String(o.getDate()).padStart(2,"0");return`${r}-${h}-${E}`}const c=e.ref(new Date);e.watch(()=>[n.selectedDate,n.rangeStart],()=>{if(n.range&&n.rangeStart){const o=f(n.rangeStart);o&&(c.value=o)}else if(!n.range&&n.selectedDate){const o=f(n.selectedDate);o&&(c.value=o)}},{immediate:!0});function v(o){const r=new Date;return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()&&o.getDate()===r.getDate()}function S(o){if(!n.rangeStart||!n.rangeEnd)return!1;const r=d(o),h=n.rangeStart,E=n.rangeEnd;return r>h&&r<E}function B(o){if(n.disabledDate&&n.disabledDate(o))return!0;const r=d(o);return!!(n.minDate&&r<n.minDate||n.maxDate&&r>n.maxDate)}function k(o,r){const h=new Date(o,r,1),E=new Date(o,r+1,0),W=h.getDay(),ie=E.getDate(),ue=[],Qe=new Date(o,r,0).getDate();for(let G=W-1;G>=0;G--){const q={date:new Date(o,r-1,Qe-G),type:"prev-month",text:String(Qe-G)};if(n.formatter){const J=n.formatter(q);J.text&&(q.text=J.text),J.bottomInfo&&(q.bottomInfo=J.bottomInfo)}ue.push(q)}for(let G=1;G<=ie;G++){const q={date:new Date(o,r,G),type:"current-month",text:String(G)};if(n.formatter){const J=n.formatter(q);J.text&&(q.text=J.text),J.bottomInfo&&(q.bottomInfo=J.bottomInfo)}ue.push(q)}const rt=42-ue.length;for(let G=1;G<=rt;G++){const q={date:new Date(o,r+1,G),type:"next-month",text:String(G)};if(n.formatter){const J=n.formatter(q);J.text&&(q.text=J.text),J.bottomInfo&&(q.bottomInfo=J.bottomInfo)}ue.push(q)}return ue}const D=e.computed(()=>{const o=c.value.getFullYear(),r=c.value.getMonth();return k(o,r)}),N=e.computed(()=>{const o=c.value.getFullYear(),r=c.value.getMonth()+1;return`${o}年${r}月`});function x(o){const r=[];if(o.type!=="current-month"&&r.push("is-other-month"),v(o.date)&&r.push("is-today"),B(o.date))return r.push("is-disabled"),r;const h=d(o.date);return n.range?(n.rangeStart===h&&r.push("is-start"),n.rangeEnd===h&&r.push("is-end"),S(o.date)&&r.push("is-in-range")):n.selectedDate===h&&r.push("is-selected"),r}const i=e.computed(()=>!!(n.rangeStart&&n.rangeEnd)),Z=e.computed(()=>n.rangeStart&&n.rangeEnd?2:n.rangeStart||n.rangeEnd?1:0);function ee(o){if(!n.minDate&&!n.maxDate)return!1;const r=n.minDate?f(n.minDate):null,h=n.maxDate?f(n.maxDate):null;return!!(r&&o<r.getFullYear()||h&&o>h.getFullYear())}function te(o,r){const h=n.minDate?f(n.minDate):null,E=n.maxDate?f(n.maxDate):null;if(h){const W=h.getFullYear(),ie=h.getMonth()+1;if(o<W||o===W&&r<ie)return!0}if(E){const W=E.getFullYear(),ie=E.getMonth()+1;if(o>W||o===W&&r>ie)return!0}return!1}const L=e.ref(!1),F=e.ref("year"),A=e.ref(c.value.getFullYear()),M=e.ref(c.value.getMonth()+1),Y=e.ref(),w=e.ref(1900),$=e.ref(1920),V=e.ref(1900),I=e.ref(2100),ne=e.computed(()=>{const o=[],h=Math.floor((w.value-V.value)/Q)-3,E=Math.ceil(($.value-V.value)/Q)+3,W=V.value+Math.max(0,h)*Q,ie=V.value+E*Q-1;for(let ue=W;ue<=ie;ue++)o.push(ue);return o});e.watch(()=>c.value,o=>{A.value=o.getFullYear(),M.value=o.getMonth()+1},{immediate:!0});function ae(){if(!Y.value)return;const o=Y.value.scrollTop,h=Math.max(0,Math.floor(o/Te)),E=V.value+h*Q,W=E+Le*Q-1;E<V.value?V.value=E-100:W>I.value&&(I.value=W+100),(E!==w.value||W!==$.value)&&(w.value=E,$.value=W)}function oe(){A.value=c.value.getFullYear(),M.value=c.value.getMonth()+1,F.value="year",L.value=!0;const o=A.value;o<V.value?V.value=Math.floor(o/100)*100:o>I.value&&(I.value=Math.ceil(o/100)*100+99),e.nextTick(()=>{if(Y.value){const r=Math.floor((o-V.value)/Q),h=Math.max(0,r-2);w.value=V.value+h*Q,$.value=w.value+Le*Q-1,re(o)}})}function re(o){if(!Y.value)return;o<V.value?V.value=Math.floor(o/100)*100:o>I.value&&(I.value=Math.ceil(o/100)*100+99);const r=Math.floor((o-V.value)/Q),h=r*Te;Y.value.scrollTop=h;const E=Math.max(0,r-2);w.value=V.value+E*Q,$.value=w.value+Le*Q-1}function _(){const o=new Date(c.value);o.setMonth(o.getMonth()-1),c.value=o}function C(){const o=new Date(c.value);o.setMonth(o.getMonth()+1),c.value=o}function T(o){ee(o)||(A.value=o,F.value="month")}function j(o){te(A.value,o)||(M.value=o,p())}function p(){const o=new Date(c.value);o.setFullYear(A.value),o.setMonth(M.value-1),c.value=o,L.value=!1,F.value="year"}function O(o){y("select-day",o)}function a(){y("clear")}function l(){U.value&&a()}function u(){y("confirm")}function b(){L.value=!1}function z(o){F.value=o}function R(){const r=new Date().getFullYear();ee(r)||(A.value=r,F.value="month")}function H(){const r=new Date().getMonth()+1;te(A.value,r)||(M.value=r,p())}const U=e.computed(()=>n.range?!!(n.rangeStart||n.rangeEnd):!!n.selectedDate);function X(o,r){const h=f(o),E=f(r);if(!h||!E)return 0;const W=Math.abs(E.getTime()-h.getTime());return Math.ceil(W/(1e3*60*60*24))+1}function ce(){return d(new Date)}function ve(){const o=new Date,r=o.getDay(),h=o.getDate()-r+(r===0?-6:1);return new Date(o.getFullYear(),o.getMonth(),h)}function se(){const o=ve(),r=new Date(o);return r.setDate(o.getDate()+6),r}function De(){const o=new Date;return new Date(o.getFullYear(),o.getMonth(),1)}function be(){const o=new Date;return new Date(o.getFullYear(),o.getMonth()+1,0)}function $e(){const o=new Date;return new Date(o.getFullYear(),o.getMonth()-2,1)}function Se(){const o=new Date;return new Date(o.getFullYear(),0,1)}function Ee(){const o=new Date;return new Date(o.getFullYear(),11,31)}const Ne=[{key:"today",label:"本日",days:1,getRange:()=>{const o=ce();return[o,o]}},{key:"week",label:"本周",days:7,getRange:()=>{const o=d(ve()),r=d(se());return[o,r]}},{key:"month",label:"本月",getRange:()=>{const o=d(De()),r=d(be());return[o,r]}},{key:"threeMonths",label:"近三月",getRange:()=>{const o=d($e()),r=d(be());return[o,r]}},{key:"year",label:"本年",getRange:()=>{const o=d(Se()),r=d(Ee());return[o,r]}},{key:"last7Days",label:"近7天",days:7,getRange:()=>{const o=new Date,r=new Date(o);return r.setDate(o.getDate()-6),[d(r),ce()]}},{key:"last30Days",label:"近30天",days:30,getRange:()=>{const o=new Date,r=new Date(o);return r.setDate(o.getDate()-29),[d(r),ce()]}}],Me=e.computed(()=>Ne.filter(o=>{if(n.maxRangeDays!==void 0){if(o.days!==void 0)return o.days<=n.maxRangeDays;{const r=o.getRange();if(r)return X(r[0],r[1])<=n.maxRangeDays}}return!0}));function Ie(o){const r=o.getRange();if(r){if(n.minDate&&r[0]<n.minDate||n.maxDate&&r[1]>n.maxDate)return;y("shortcut-select",r)}}return s({yearScrollRef:Y}),(o,r)=>(e.openBlock(),e.createElementBlock("div",null,[t.showTitle?(e.openBlock(),e.createElementBlock("div",Wt,[e.createElementVNode("div",Ot,e.toDisplayString(t.title),1),e.createElementVNode("span",{class:e.normalizeClass(["rc-calendar__header-clear",{"is-disabled":!U.value}]),onClick:l}," 清空 ",2)])):e.createCommentVNode("",!0),t.range?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("div",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.key,class:"rc-calendar__shortcut-item",onClick:E=>Ie(h)},e.toDisplayString(h.label),9,Ut))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Kt,[e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:_},[e.createVNode(e.unref(P),{name:"icon_caret-left",class:"rc-calendar__nav-icon"})]),e.createElementVNode("div",{class:"rc-calendar__month-text",onClick:oe},e.toDisplayString(N.value),1),e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:C},[e.createVNode(e.unref(P),{name:"icon_caret-right",class:"rc-calendar__nav-icon"})])]),e.createElementVNode("div",Gt,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(g,h=>e.createElementVNode("div",{key:h,class:"rc-calendar__weekday"},e.toDisplayString(h),1)),64))]),e.createElementVNode("div",qt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(h,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass(["rc-calendar__day",x(h)]),onClick:W=>O(h)},[e.createElementVNode("div",Qt,[e.createElementVNode("span",Xt,e.toDisplayString(h.text),1),h.bottomInfo?(e.openBlock(),e.createElementBlock("span",Zt,e.toDisplayString(h.bottomInfo),1)):e.createCommentVNode("",!0)])],10,Jt))),128))]),t.range&&t.showFooter?(e.openBlock(),e.createElementBlock("div",en,[e.createVNode(e.unref(le),{type:"default",class:"rc-calendar__footer-reset",onClick:a},{default:e.withCtx(()=>[...r[2]||(r[2]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(le),{type:"primary",class:"rc-calendar__footer-confirm",disabled:!i.value,onClick:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value?`确定(${Z.value}项)`:"确定"),1)]),_:1},8,["disabled"])])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"rc-calendar-fade"},{default:e.withCtx(()=>[L.value?(e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("div",nn,[e.createElementVNode("div",an,[e.createVNode(e.unref(le),{type:"default",mode:"text",size:"small",onClick:b},{default:e.withCtx(()=>[...r[3]||(r[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createElementVNode("div",on,[e.createElementVNode("span",{onClick:r[0]||(r[0]=h=>z("year"))},e.toDisplayString(A.value)+"年",1),F.value==="month"?(e.openBlock(),e.createElementBlock("span",ln," - ")):e.createCommentVNode("",!0),F.value==="month"?(e.openBlock(),e.createElementBlock("span",{key:1,onClick:r[1]||(r[1]=h=>z("month"))},e.toDisplayString(M.value)+"月",1)):e.createCommentVNode("",!0)]),F.value==="year"?(e.openBlock(),e.createBlock(e.unref(le),{key:0,type:"primary",mode:"text",size:"small",onClick:R},{default:e.withCtx(()=>[...r[4]||(r[4]=[e.createTextVNode(" 本年 ",-1)])]),_:1})):e.createCommentVNode("",!0),F.value==="month"?(e.openBlock(),e.createBlock(e.unref(le),{key:1,type:"primary",mode:"text",size:"small",onClick:H},{default:e.withCtx(()=>[...r[5]||(r[5]=[e.createTextVNode(" 本月 ",-1)])]),_:1})):e.createCommentVNode("",!0)]),F.value==="year"?(e.openBlock(),e.createElementBlock("div",rn,[e.createElementVNode("div",{class:"rc-calendar__year-picker-scroll",ref_key:"yearScrollRef",ref:Y,onScroll:ae},[e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.floor((w.value-V.value)/Q)*Te}px`})},null,4),e.createElementVNode("div",cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h,class:e.normalizeClass(["rc-calendar__year-picker-item",{"is-selected":A.value===h,"is-disabled":ee(h)}]),onClick:E=>T(h)},e.toDisplayString(h),11,sn))),128))]),e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.ceil((I.value-$.value)/Q)*Te}px`})},null,4)],544)])):e.createCommentVNode("",!0),F.value==="month"?(e.openBlock(),e.createElementBlock("div",un,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(12,h=>e.createElementVNode("div",{key:h,class:e.normalizeClass(["rc-calendar__month-picker-item",{"is-selected":M.value===h,"is-disabled":te(A.value,h)}]),onClick:E=>j(h)},e.toDisplayString(h)+"月 ",11,dn)),64))])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1})]))}}),tt=K(fn,[["__scopeId","data-v-0bf1834b"]]),mn={class:"rc-calendar"},vn=["placeholder"],pn={class:"rc-calendar__input-actions"},yn={key:1,class:"rc-calendar__panel"},hn=e.defineComponent({name:"rc-calendar",__name:"index",props:{modelValue:{default:null},range:{type:[Boolean,Number],default:!1},mode:{default:"default"},placeholder:{default:"请选择日期"},showTitle:{type:Boolean,default:!0},title:{default:"选择日期"},minDate:{default:void 0},maxDate:{default:void 0},disabledDate:{type:Function,default:void 0},formatter:{type:Function,default:void 0},showFooter:{type:Boolean,default:!0},endDateOffset:{type:Boolean,default:!1}},emits:["update:modelValue","change","confirm"],setup(t,{emit:s}){const m=t,n=s,y=e.ref(),g=e.ref(),f=e.ref(!1),d=e.ref(""),c=e.computed(()=>m.range===!0||typeof m.range=="number"),v=e.computed(()=>typeof m.range=="number"?m.range:void 0),S=e.computed(()=>_=>{if(m.disabledDate&&m.disabledDate(_))return!0;if(v.value!==void 0&&k.value&&!D.value){const C=i(_);if(x(k.value)&&Z(k.value,C)>v.value)return!0}return!1}),B=e.ref(null),k=e.ref(null),D=e.ref(null);e.watch(()=>m.modelValue,_=>{c.value?Array.isArray(_)&&_.length===2?(k.value=_[0],D.value=F(_[1])):(k.value=null,D.value=null):B.value=typeof _=="string"?_:null,N()},{immediate:!0});function N(){m.mode==="popup"&&(c.value?k.value&&D.value?d.value=`${k.value} ~ ${D.value}`:k.value?d.value=`${k.value} ~ `:d.value="":d.value=B.value||"")}function x(_){if(!_)return null;const C=new Date(_);return isNaN(C.getTime())?null:C}function i(_){const C=_.getFullYear(),T=String(_.getMonth()+1).padStart(2,"0"),j=String(_.getDate()).padStart(2,"0");return`${C}-${T}-${j}`}function Z(_,C){const T=x(_),j=x(C);if(!T||!j)return 0;const p=Math.abs(j.getTime()-T.getTime());return Math.ceil(p/(1e3*60*60*24))}function ee(_){const C=x(_);return C?(C.setDate(C.getDate()+1),i(C)):_}function te(_){const C=x(_);return C?(C.setDate(C.getDate()-1),i(C)):_}function L(_){return m.endDateOffset&&c.value?ee(_):_}function F(_){return m.endDateOffset&&c.value?te(_):_}function A(_){if(_.type!=="current-month"||m.disabledDate&&m.disabledDate(_.date))return;const C=i(_.date);if(!(m.minDate&&C<m.minDate)&&!(m.maxDate&&C>m.maxDate)){if(c.value)if(!k.value||k.value&&D.value)k.value=C,D.value=null;else{let T=k.value,j=C;if(C<k.value&&(j=k.value,T=C),k.value=T,D.value=j,k.value&&D.value){const p=L(D.value),O=[k.value,p];n("update:modelValue",O),n("change",O),m.showFooter||M()}}else{B.value=C;const T=C;n("update:modelValue",T),n("change",T),m.mode&&V()}N()}}function M(){if(k.value&&D.value){const _=L(D.value),C=[k.value,_];n("update:modelValue",C),n("change",C),n("confirm",C),V()}}function Y(){c.value?(k.value=null,D.value=null):B.value=null;const _=null;n("update:modelValue",_),n("change",_),N()}function w(_){k.value=_[0],D.value=_[1];const C=L(_[1]),T=[_[0],C];n("update:modelValue",T),n("change",T),m.showFooter?N():M()}function $(){f.value=!0}function V(){f.value=!1}function I(_){f.value=_}function ne(){$()}function ae(){m.mode==="popup"&&re()}function oe(){f.value||$()}function re(){const _=d.value.trim();if(c.value){const C=_.split("~").map(T=>T.trim());if(C.length===2&&C[0]&&C[1]){const T=x(C[0]),j=x(C[1]);if(T&&j&&!isNaN(T.getTime())&&!isNaN(j.getTime())){k.value=i(T);const p=i(j);D.value=F(p);const O=L(D.value),a=[k.value,O];n("update:modelValue",a),n("change",a);return}}}else{const C=x(_);if(C&&!isNaN(C.getTime())){B.value=i(C),n("update:modelValue",B.value),n("change",B.value);return}}N()}return(_,C)=>(e.openBlock(),e.createElementBlock("div",mn,[t.mode==="popup"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-calendar__input",onClick:$},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:y,"onUpdate:modelValue":C[0]||(C[0]=T=>d.value=T),type:"text",class:"rc-calendar__input-field",placeholder:t.placeholder,readonly:"",onFocus:ne,onBlur:ae,onInput:oe},null,40,vn),[[e.vModelText,d.value]]),e.createElementVNode("div",pn,[e.createVNode(e.unref(P),{name:"icon_a-rili",class:"rc-calendar__input-icon"})])])):e.createCommentVNode("",!0),t.mode==="default"?(e.openBlock(),e.createElementBlock("div",yn,[e.createVNode(tt,{"show-title":t.showTitle,title:t.title,range:c.value,"selected-date":B.value,"range-start":k.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":S.value,formatter:t.formatter,"show-footer":!1,"max-range-days":v.value,onSelectDay:A,onClear:Y,onConfirm:M,onShortcutSelect:w},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","max-range-days"])])):e.createCommentVNode("",!0),t.mode==="popup"?(e.openBlock(),e.createBlock(e.unref(ge),{key:2,modelValue:f.value,"onUpdate:modelValue":[C[1]||(C[1]=T=>f.value=T),I],position:"bottom",overlay:!0,round:!0,"close-on-click-overlay":!0,"lock-scroll":!0},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"popupPanelRef",ref:g,class:"rc-calendar__panel"},[e.createVNode(tt,{"show-title":t.showTitle,title:t.title,range:c.value,"selected-date":B.value,"range-start":k.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":S.value,formatter:t.formatter,"show-footer":t.showFooter,"max-range-days":v.value,onSelectDay:A,onClear:Y,onConfirm:M,onShortcutSelect:w},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","show-footer","max-range-days"])],512)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]))}}),ke=K(hn,[["__scopeId","data-v-96b29c22"]]);ke.name="rc-calendar";const gn="RcCalendar";function je(t){return t.component(ke.name,ke),t.component(gn,ke),t}const kn={key:0,class:"rc-input__prepend"},bn={key:0,class:"rc-input__prefix"},_n={key:1,class:"rc-input__textarea-wrapper"},Cn={key:3,class:"rc-input__suffix"},Bn={key:0,class:"rc-input__suffix-inner"},wn={key:4,class:"rc-input__count"},xn={key:1,class:"rc-input__append"},Vn=e.defineComponent({__name:"index",props:{modelValue:{default:""},type:{default:"text"},size:{default:"default"},placeholder:{default:"请输入"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},showPassword:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxlength:{default:void 0},minlength:{default:void 0},showWordLimit:{type:Boolean,default:!1},rows:{default:2},autosize:{type:[Boolean,Object],default:!1},resize:{default:void 0},prefixIcon:{default:""},suffixIcon:{default:""},autocomplete:{default:"off"},name:{default:void 0},autofocus:{type:Boolean,default:!1},form:{default:void 0},tabindex:{default:void 0},formatter:{type:Function,default:void 0},parser:{type:Function,default:void 0},deviceType:{default:void 0}},emits:["update:modelValue","input","change","focus","blur","clear","keydown","mouseenter","mouseleave","compositionstart","compositionupdate","compositionend"],setup(t,{expose:s,emit:m}){const n=t,y=e.inject(Ve,{}),g=e.computed(()=>n.deviceType||(y==null?void 0:y.inputDeviceType)||Fe.inputDeviceType||"pc"),f=m,d=e.ref(),c=e.ref(n.modelValue??""),v=e.ref(!1),S=e.ref(!1),B=e.ref(!1);e.watch(()=>n.modelValue,p=>{c.value=p??""});const k=e.computed(()=>n.type==="password"?S.value?"text":"password":n.type),D=e.computed(()=>{const p=String(c.value??"");return n.formatter&&!B.value?n.formatter(p):p}),N=e.computed(()=>{const p=c.value;return p!==""&&p!==null&&p!==void 0}),x=e.computed(()=>String(c.value??"").length),i=e.computed(()=>!n.clearable||!N.value||n.disabled||n.readonly?!1:(g.value==="mobile",!0)),Z=e.useSlots(),ee=e.computed(()=>!!(n.suffixIcon||n.showPassword&&n.type==="password"||i.value&&n.type!=="textarea"||Z.suffix)),te=e.computed(()=>{if(n.type!=="textarea")return{};const p={};return n.autosize?p.resize="none":n.resize!==void 0?p.resize=n.resize:p.resize="vertical",p});function L(p){let a=p.target.value;n.parser&&!B.value&&(a=n.parser(a));const l=a===""?void 0:a;c.value=l,f("update:modelValue",l),f("input",l),n.type==="textarea"&&n.autosize&&e.nextTick(()=>{re()})}function F(p){v.value=!0,f("focus",p)}function A(p){v.value=!1;const O=c.value,a=O===""?void 0:O;f("blur",p),f("change",a)}function M(){c.value=void 0,f("update:modelValue",void 0),f("input",void 0),f("change",void 0),f("clear"),e.nextTick(()=>{var p;(p=d.value)==null||p.focus()})}function Y(){S.value=!S.value}function w(p){if(f("keydown",p),p.key==="Enter"&&n.type!=="textarea"){const O=c.value;f("change",O===""?void 0:O)}}function $(p){f("mouseenter",p)}function V(p){f("mouseleave",p)}function I(p){B.value=!0,f("compositionstart",p)}function ne(p){f("compositionupdate",p)}function ae(p){B.value=!1,f("compositionend",p),p.target&&L(p)}function oe(){var p;n.disabled||n.readonly||(p=d.value)==null||p.focus()}function re(){if(n.type!=="textarea"||!d.value)return;const p=d.value;if(n.autosize){p.style.height="auto";const O=p.scrollHeight;if(typeof n.autosize=="object"){const{minRows:a=2,maxRows:l}=n.autosize,u=parseInt(getComputedStyle(p).lineHeight)||20,b=a*u,z=l?l*u:1/0;p.style.height=`${Math.min(Math.max(O,b),z)}px`}else p.style.height=`${O}px`}}function _(){var p;(p=d.value)==null||p.focus()}function C(){var p;(p=d.value)==null||p.blur()}function T(){d.value&&"select"in d.value&&d.value.select()}function j(){M()}return e.onMounted(()=>{n.type==="textarea"&&n.autosize&&re()}),s({focus:_,blur:C,select:T,clear:j,resizeTextarea:re,inputRef:d}),(p,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-input",[`rc-input--${t.size}`,{"is-disabled":t.disabled,"is-focused":v.value,"is-readonly":t.readonly,"rc-input--textarea":t.type==="textarea","has-prepend":p.$slots.prepend,"has-append":p.$slots.append}]]),onClick:oe},[p.$slots.prepend?(e.openBlock(),e.createElementBlock("div",kn,[e.renderSlot(p.$slots,"prepend",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["rc-input__wrapper",{"has-clear":i.value&&t.type!=="textarea","has-clear-textarea":i.value&&t.type==="textarea","has-clear-mobile":i.value&&g.value==="mobile"&&t.type!=="textarea","has-clear-textarea-mobile":i.value&&g.value==="mobile"&&t.type==="textarea"}])},[t.prefixIcon||p.$slots.prefix?(e.openBlock(),e.createElementBlock("div",bn,[e.renderSlot(p.$slots,"prefix",{},()=>[t.prefixIcon?(e.openBlock(),e.createBlock(e.unref(P),{key:0,name:t.prefixIcon,class:"rc-input__prefix-icon"},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),t.type==="textarea"?(e.openBlock(),e.createElementBlock("div",_n,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent("textarea"),{ref_key:"inputRef",ref:d,value:D.value,class:"rc-input__field rc-input__field--textarea",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,maxlength:t.maxlength,minlength:t.minlength,rows:t.rows,autocomplete:t.autocomplete,name:t.name,autofocus:t.autofocus,form:t.form,tabindex:t.tabindex,style:e.normalizeStyle(te.value),onInput:L,onFocus:F,onBlur:A,onKeydown:w,onMouseenter:$,onMouseleave:V,onCompositionstart:I,onCompositionupdate:ne,onCompositionend:ae},null,40,["value","placeholder","disabled","readonly","maxlength","minlength","rows","autocomplete","name","autofocus","form","tabindex","style"])),i.value&&t.type==="textarea"?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["rc-input__clear rc-input__clear--textarea",{"rc-input__clear--mobile":g.value==="mobile"}]),onClick:e.withModifiers(M,["stop"])},[e.createVNode(e.unref(P),{name:"icon_close_circle",class:"rc-input__clear-icon"})],2)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent("input"),{key:2,ref_key:"inputRef",ref:d,value:D.value,type:k.value,class:"rc-input__field",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,maxlength:t.maxlength,minlength:t.minlength,autocomplete:t.autocomplete,name:t.name,autofocus:t.autofocus,form:t.form,tabindex:t.tabindex,onInput:L,onFocus:F,onBlur:A,onKeydown:w,onMouseenter:$,onMouseleave:V,onCompositionstart:I,onCompositionupdate:ne,onCompositionend:ae},null,40,["value","type","placeholder","disabled","readonly","maxlength","minlength","autocomplete","name","autofocus","form","tabindex"])),ee.value?(e.openBlock(),e.createElementBlock("div",Cn,[p.$slots.suffix?(e.openBlock(),e.createElementBlock("div",Bn,[e.renderSlot(p.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0),t.showPassword&&t.type==="password"&&N.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"rc-input__password-toggle",onClick:e.withModifiers(Y,["stop"])},[e.createVNode(e.unref(P),{color:S.value?"#1677ff":"#999",name:S.value?"icon_view":"icon_view-off"},null,8,["color","name"])])):e.createCommentVNode("",!0),i.value&&t.type!=="textarea"?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["rc-input__clear",{"rc-input__clear--mobile":g.value==="mobile"}]),onClick:e.withModifiers(M,["stop"])},[e.createVNode(e.unref(P),{name:"icon_close_circle",class:"rc-input__clear-icon"})],2)):e.createCommentVNode("",!0),t.suffixIcon&&!t.clearable&&!t.showPassword?(e.openBlock(),e.createBlock(e.unref(P),{key:3,name:t.suffixIcon,class:"rc-input__suffix-icon"},null,8,["name"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.showWordLimit&&t.maxlength?(e.openBlock(),e.createElementBlock("span",wn,e.toDisplayString(x.value)+" / "+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)],2),p.$slots.append?(e.openBlock(),e.createElementBlock("div",xn,[e.renderSlot(p.$slots,"append",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),we=K(Vn,[["__scopeId","data-v-050956ab"]]);we.name="rc-input";function Ue(t){return t.component(we.name,we),t}const Dn={class:"rc-search-area"},$n={class:"rc-search-area__bar"},Sn=["onClick"],En={class:"rc-search-area__item-label"},Nn={class:"rc-search-area__panel-content"},Mn={key:1,class:"rc-search-area__input-wrapper"},In={key:2,class:"rc-search-area__calendar-wrapper"},Tn={key:3,class:"rc-search-area__tree-container"},Rn={class:"rc-search-area__tree-group-title"},zn={class:"rc-search-area__tree-group-options"},Fn=["onClick"],Ln={class:"rc-search-area__option-label"},An={key:4,class:"rc-search-area__tree-container"},Yn={class:"rc-search-area__tree-group-title"},Pn={class:"rc-search-area__tree-group-options"},Wn=["onClick"],On={class:"rc-search-area__option-label"},Hn={key:5,class:"rc-search-area__options-grid"},jn=["onClick"],Un={class:"rc-search-area__option-label"},Kn={key:6,class:"rc-search-area__options-grid"},Gn=["onClick"],qn={class:"rc-search-area__option-label"},Jn={key:7,class:"rc-search-area__empty"},Qn={key:0,class:"rc-search-area__panel-footer"},Xn=e.defineComponent({name:"rc-search-area",__name:"index",props:{items:{default:()=>[]},modelValue:{default:()=>({})},showMask:{type:Boolean,default:!0},autoConfirm:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{expose:s,emit:m}){const n=t,y=m,g=e.ref(null),f=e.ref(null),d=e.ref(null),c=e.ref({top:"0px"}),v=async()=>{if(g.value===null||!f.value)return;await e.nextTick();const l=f.value.getBoundingClientRect().top;c.value={top:`${l}px`}},S=a=>{if(g.value===null||!f.value)return;const l=a.target;if(f.value.contains(l))return;const u=f.value.closest(".rc-search-area");if(u){const b=u.querySelector(".rc-search-area__bar");if(b&&b.contains(l))return}L()};e.watch(g,async a=>{a!==null?(await e.nextTick(),v(),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0),document.addEventListener("click",S,!0)):(window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0),document.removeEventListener("click",S,!0))}),e.onUnmounted(()=>{window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0),document.removeEventListener("click",S,!0)});const B=e.ref({}),k=e.ref(""),D=e.ref(null),N=e.ref({}),x=e.ref({...n.modelValue});e.watch(()=>n.modelValue,a=>{x.value={...a||{}}},{deep:!0,immediate:!0});const i=e.computed(()=>g.value===null?null:n.items[g.value]),Z=e.computed(()=>{if(!i.value)return"";const a=O(i.value);return a>0?`(${a}项)`:""}),ee=a=>{const l=x.value[a.key];if(l==null||l===""||a.slot)return a.label;if(a.type==="input"){if(l&&String(l).trim())return`${a.label}: ${l}`}else if(a.type==="calendar"){if(l){if(Array.isArray(l)&&l.length===2)return`${a.label}: ${l[0]} ~ ${l[1]}`;if(typeof l=="string")return`${a.label}: ${l}`}}else if(a.type==="single"||a.type==="tree-single"){const u=Y(a,l);if(u)return`${a.label}: ${M(u,a)}`}else{const u=Array.isArray(l)?l:[l];if(u.length>0){const b=u.map(z=>{const R=Y(a,z);return R?M(R,a):null}).filter(z=>z!==null);if(b.length>0)return`${a.label}: ${b.join("、")}`}}return a.label},te=a=>{const l=n.items[a];if(!l)return;if(g.value===a){g.value=null;return}const u=x.value[l.key];l.slot?u!=null?Array.isArray(u)?N.value[l.key]=[...u]:typeof u=="object"?N.value[l.key]={...u}:N.value[l.key]=u:N.value[l.key]=void 0:l.type==="input"?k.value=u!=null&&u!==""?String(u):void 0:l.type==="calendar"?D.value=u??null:l.type==="single"||l.type==="tree-single"?B.value[l.key]=u!==void 0?u:null:B.value[l.key]=u!==void 0?Array.isArray(u)?[...u]:[u]:[],g.value=a},L=()=>{g.value=null},F=(a,l)=>{if(!l)return typeof a=="string"?a:a.label||String(a.value);const u=a;if(l.renderItem){if(typeof l.renderItem=="string")return String(typeof u=="object"&&u!==null?u[l.renderItem]??"":u);{const b=l.renderItem(u);return b!=null?String(b):""}}return typeof a=="string"?a:a.label||String(a.value)},A=(a,l)=>{if(!l)return typeof a=="string"?a:a.value!==void 0?a.value:a;const u=a;return l.format?typeof l.format=="string"?typeof u=="object"&&u!==null?u[l.format]:u:l.format(u):typeof a=="string"?a:a.value!==void 0?a.value:a},M=(a,l)=>{const u=a,b=l.renderResult||l.renderItem;if(b){if(typeof b=="string")return String(typeof u=="object"&&u!==null?u[b]??"":u);{const z=b(u);return z!=null?String(z):""}}return F(a,l)},Y=(a,l,u)=>{const b=u||a.options;if(!b)return null;const z=a.childrenKey||"children";for(const R of b){const H=A(R,a);if(H===l||String(H)===String(l))return R;if(typeof R=="object"&&R!==null){const U=R[z];if(Array.isArray(U)&&U.length>0){const X=Y(a,l,U);if(X)return X}}}return null},w=(a,l)=>{const u=l||a.options;if(!u)return[];const b=a.childrenKey||"children",z=[];for(const R of u)if(z.push(R),typeof R=="object"&&R!==null){const H=R[b];Array.isArray(H)&&H.length>0&&z.push(...w(a,H))}return z},$=a=>{if(!i.value)return!1;const l=i.value.key,u=B.value[l],b=A(a,i.value);return i.value.type==="single"||i.value.type==="tree-single"?u!=null&&u===b:(Array.isArray(u)?u:[]).some(R=>R===b||String(R)===String(b))},V=a=>a?a.childrenKey?w(a):a.options||[]:[],I=a=>{if(!a||!a.options||a.options.length===0)return[];const l=a.childrenKey||"children",u=[],b=new Map,z=(R,H=[])=>{for(const U of R)if(typeof U=="string"){const X=H.length>0?H.join("-"):"";b.has(X)||b.set(X,[]),b.get(X).push(U)}else{const X=F(U,a),ce=U[l];if(Array.isArray(ce)&&ce.length>0){const se=[...H,X];z(ce,se)}else{const se=H.length>0?H.join("-"):"";b.has(se)||b.set(se,[]),b.get(se).push(U)}}};z(a.options);for(const[R,H]of b.entries())u.push({title:R||"全部",children:H});return u},ne=a=>{if(a)return N.value[a.key]!==void 0?N.value[a.key]:x.value[a.key]},ae=(a,l)=>{if(a&&(N.value[a.key]=l,n.autoConfirm)){const u=a.key;x.value[u]=l,y("update:modelValue",{...x.value}),y("change",{...x.value},a),L()}},oe=a=>{if(!i.value)return;const l=i.value.key,u=A(a,i.value);x.value[l];let b;B.value[l]===u?b=void 0:b=u,x.value[l]=b,y("update:modelValue",{...x.value}),y("change",{...x.value},i.value),L()},re=a=>{if(!i.value)return;const l=i.value.key,u=A(a,i.value),b=Array.isArray(B.value[l])?[...B.value[l]]:[],z=b.findIndex(R=>R===u||String(R)===String(u));if(z>=0?b.splice(z,1):b.push(u),B.value[l]=b,n.autoConfirm){const R=b.length>0?b:void 0;x.value[l]=R,y("update:modelValue",{...x.value}),y("change",{...x.value},i.value),L()}},_=()=>{if(!i.value)return;const a=i.value.key;i.value.slot?N.value[a]=void 0:i.value.type==="input"?k.value=void 0:i.value.type==="calendar"?D.value=null:i.value.type==="single"||i.value.type==="tree-single"?B.value[a]=null:B.value[a]=[]},C=a=>{if(n.autoConfirm&&i.value){const l=i.value.key,u=a!=null?String(a):"",b=u.trim()?u.trim():void 0;x.value[l]=b,y("update:modelValue",{...x.value}),y("change",{...x.value},i.value),L()}},T=a=>{if(D.value=a,n.autoConfirm&&i.value){const l=i.value.key,u=a??void 0;x.value[l]=u,y("update:modelValue",{...x.value}),y("change",{...x.value},i.value),L()}},j=()=>{if(!i.value)return;const a=i.value.key;x.value[a];let l;if(i.value.slot)l=N.value[a],x.value[a]=l;else if(i.value.type==="input")l=k.value&&k.value.trim()?k.value.trim():void 0,x.value[a]=l;else if(i.value.type==="calendar")l=D.value!==null&&D.value!==void 0?D.value:void 0,x.value[a]=l;else if(i.value.type==="single"||i.value.type==="tree-single"){const u=B.value[a];l=u??void 0,x.value[a]=l}else{const u=B.value[a];l=Array.isArray(u)&&u.length>0?u:void 0,x.value[a]=l}y("update:modelValue",{...x.value}),y("change",{...x.value},i.value),L()},p=a=>{const l=x.value[a.key];return l==null||l===""?0:a.slot?1:a.type==="input"?String(l).trim()?1:0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(l)?l.length:l?1:0},O=a=>{if(a.slot){const u=N.value[a.key];return u!=null&&u!==""?1:0}else{if(a.type==="input")return k.value&&k.value.trim()?1:0;if(a.type==="calendar")return D.value!==null&&D.value!==void 0?1:0}const l=B.value[a.key];return l==null||l===""?0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(l)?l.length:0};return s({getValues:()=>({...x.value}),reset:()=>{x.value={},B.value={},N.value={},y("update:modelValue",{})}}),(a,l)=>(e.openBlock(),e.createElementBlock("div",Dn,[e.createElementVNode("div",$n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,(u,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:e.normalizeClass(["rc-search-area__item",{"is-active":g.value===b,"has-value":p(u)>0}]),onClick:z=>te(b)},[e.createElementVNode("span",En,e.toDisplayString(ee(u)),1),e.createVNode(e.unref(P),{name:"icon_a-xiala2",color:g.value!==b&&p(u)>0?"#1677ff":"#969799",class:e.normalizeClass(["rc-search-area__item-arrow",{"is-up":g.value===b}])},null,8,["color","class"])],10,Sn))),128))]),e.createVNode(e.Transition,{name:"rc-search-area-fade"},{default:e.withCtx(()=>[g.value!==null&&n.showMask?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"maskRef",ref:d,class:"rc-search-area__mask",style:e.normalizeStyle(c.value),onClick:L},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"rc-search-area-slide"},{default:e.withCtx(()=>{var u,b,z,R,H,U,X,ce,ve,se,De,be,$e,Se,Ee,Ne,Me,Ie,o;return[g.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:f,class:"rc-search-area__panel"},[e.createElementVNode("div",Nn,[(u=i.value)!=null&&u.slot&&a.$slots[i.value.key]?e.renderSlot(a.$slots,i.value.key,{key:0,value:ne(i.value),"update:value":r=>ae(i.value,r)},void 0,!0):((b=i.value)==null?void 0:b.type)==="input"?(e.openBlock(),e.createElementBlock("div",Mn,[e.createVNode(e.unref(we),{modelValue:k.value,"onUpdate:modelValue":l[0]||(l[0]=r=>k.value=r),placeholder:i.value.placeholder||"请输入",onChange:C},null,8,["modelValue","placeholder"])])):((z=i.value)==null?void 0:z.type)==="calendar"?(e.openBlock(),e.createElementBlock("div",In,[e.createVNode(e.unref(ke),{modelValue:D.value,"onUpdate:modelValue":l[1]||(l[1]=r=>D.value=r),range:((R=i.value.calendarConfig)==null?void 0:R.range)||!1,mode:"default","min-date":(H=i.value.calendarConfig)==null?void 0:H.minDate,"max-date":(U=i.value.calendarConfig)==null?void 0:U.maxDate,"disabled-date":(X=i.value.calendarConfig)==null?void 0:X.disabledDate,formatter:(ce=i.value.calendarConfig)==null?void 0:ce.formatter,"end-date-offset":((ve=i.value.calendarConfig)==null?void 0:ve.endDateOffset)||!1,onChange:T},null,8,["modelValue","range","min-date","max-date","disabled-date","formatter","end-date-offset"])])):((se=i.value)==null?void 0:se.type)==="tree-single"?(e.openBlock(),e.createElementBlock("div",Tn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I(i.value),(r,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"rc-search-area__tree-group"},[e.createElementVNode("div",Rn,e.toDisplayString(r.title),1),e.createElementVNode("div",zn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.children,(E,W)=>(e.openBlock(),e.createElementBlock("div",{key:W,class:e.normalizeClass(["rc-search-area__option",{"is-selected":$(E)}]),onClick:ie=>oe(E)},[e.createElementVNode("span",Ln,e.toDisplayString(F(E,i.value||void 0)),1),$(E)?(e.openBlock(),e.createBlock(e.unref(P),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Fn))),128))])]))),128))])):((De=i.value)==null?void 0:De.type)==="tree-multiple"?(e.openBlock(),e.createElementBlock("div",An,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I(i.value),(r,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"rc-search-area__tree-group"},[e.createElementVNode("div",Yn,e.toDisplayString(r.title),1),e.createElementVNode("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.children,(E,W)=>(e.openBlock(),e.createElementBlock("div",{key:W,class:e.normalizeClass(["rc-search-area__option",{"is-selected":$(E)}]),onClick:ie=>re(E)},[e.createElementVNode("span",On,e.toDisplayString(F(E,i.value||void 0)),1),$(E)?(e.openBlock(),e.createBlock(e.unref(P),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Wn))),128))])]))),128))])):((be=i.value)==null?void 0:be.type)==="single"?(e.openBlock(),e.createElementBlock("div",Hn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V(i.value),(r,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:e.normalizeClass(["rc-search-area__option",{"is-selected":$(r)}]),onClick:E=>oe(r)},[e.createElementVNode("span",Un,e.toDisplayString(F(r,i.value||void 0)),1),$(r)?(e.openBlock(),e.createBlock(e.unref(P),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,jn))),128))])):(e.openBlock(),e.createElementBlock("div",Kn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V(i.value),(r,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:e.normalizeClass(["rc-search-area__option",{"is-selected":$(r)}]),onClick:E=>re(r)},[e.createElementVNode("span",qn,e.toDisplayString(F(r,i.value||void 0)),1),$(r)?(e.openBlock(),e.createBlock(e.unref(P),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Gn))),128))])),(($e=i.value)==null?void 0:$e.type)!=="input"&&((Se=i.value)==null?void 0:Se.type)!=="calendar"&&!((Ee=i.value)!=null&&Ee.slot)&&((Me=(Ne=i.value)==null?void 0:Ne.options)==null?void 0:Me.length)===0?(e.openBlock(),e.createElementBlock("div",Jn,[...l[2]||(l[2]=[e.createElementVNode("p",null,"暂无选项",-1)])])):e.createCommentVNode("",!0)]),!n.autoConfirm&&((Ie=i.value)==null?void 0:Ie.type)!=="single"&&((o=i.value)==null?void 0:o.type)!=="tree-single"?(e.openBlock(),e.createElementBlock("div",Qn,[e.createVNode(e.unref(le),{block:"",onClick:_},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode(" 重置 ",-1)])]),_:1}),e.createVNode(e.unref(le),{type:"primary",block:"",onClick:j},{default:e.withCtx(()=>[e.createTextVNode(" 确定"+e.toDisplayString(Z.value),1)]),_:1})])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)]}),_:3})]))}}),Ke=K(Xn,[["__scopeId","data-v-4977b35c"]]),Ge=t=>{t.component("RcSearchArea",Ke),t.component("rc-search-area",Ke)},Zn=e.defineComponent({name:"rc-dropdown-menu",__name:"menu",props:{visible:{type:Boolean,default:void 0},effect:{default:"light"},maxHeight:{default:""}},emits:["mouseenter","mouseleave"],setup(t,{expose:s,emit:m}){const n=t,y=e.ref(),g=e.computed(()=>n.visible===void 0?!0:n.visible),f=e.computed(()=>n.visible!==void 0),d=e.computed(()=>{const c={};return n.maxHeight&&(c.maxHeight=typeof n.maxHeight=="number"?`${n.maxHeight}px`:n.maxHeight,c.overflowY="auto"),c});return s({menuRef:y}),(c,v)=>f.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"rc-dropdown-fade"},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("ul",{key:0,ref_key:"menuRef",ref:y,class:e.normalizeClass(["rc-dropdown-menu",[`rc-dropdown-menu--${t.effect}`]]),style:e.normalizeStyle(d.value),onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"])),onMouseenter:v[1]||(v[1]=S=>c.$emit("mouseenter",S)),onMouseleave:v[2]||(v[2]=S=>c.$emit("mouseleave",S))},[e.renderSlot(c.$slots,"default",{},void 0,!0)],38)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock("ul",{key:1,ref_key:"menuRef",ref:y,class:e.normalizeClass(["rc-dropdown-menu rc-dropdown-menu--nested",[`rc-dropdown-menu--${t.effect}`]]),style:e.normalizeStyle(d.value),onClick:v[3]||(v[3]=e.withModifiers(()=>{},["stop"])),onMouseenter:v[4]||(v[4]=S=>c.$emit("mouseenter",S)),onMouseleave:v[5]||(v[5]=S=>c.$emit("mouseleave",S))},[e.renderSlot(c.$slots,"default",{},void 0,!0)],38))}}),xe=K(Zn,[["__scopeId","data-v-288e2690"]]),ea=e.defineComponent({name:"rc-dropdown",__name:"index",props:{placement:{default:"bottom"},trigger:{default:"hover"},disabled:{type:Boolean,default:!1},effect:{default:"light"},maxHeight:{default:""},hideOnClick:{type:Boolean,default:!0},showTimeout:{default:150},hideTimeout:{default:150}},emits:["command","visible-change"],setup(t,{expose:s,emit:m}){const n=t,y=m,g=e.ref(),f=e.ref(),d=e.ref(!1);let c=null,v=null;function S(M){n.hideOnClick&&(d.value=!1),M!==void 0&&y("command",M)}e.provide("handleItemClick",S);function B(){n.disabled||(c&&(clearTimeout(c),c=null),v&&(clearTimeout(v),v=null),c=setTimeout(()=>{d.value=!0,requestAnimationFrame(()=>{e.nextTick(()=>{L()})})},n.showTimeout))}function k(){n.trigger==="hover"&&i.value||(v&&(clearTimeout(v),v=null),c&&(clearTimeout(c),c=null),v=setTimeout(()=>{d.value=!1,i.value=!1},n.hideTimeout))}function D(){n.disabled||(d.value?k():B())}function N(){n.trigger==="hover"&&!n.disabled&&B()}function x(){n.trigger==="hover"&&setTimeout(()=>{i.value||k()},50)}const i=e.ref(!1);function Z(){n.trigger==="hover"&&(i.value=!0,c&&(clearTimeout(c),c=null),v&&(clearTimeout(v),v=null))}function ee(){n.trigger==="hover"&&(i.value=!1,k())}function te(M){n.trigger==="click"&&!n.disabled&&(M.stopPropagation(),D())}function L(){var oe;if(!g.value||!((oe=f.value)!=null&&oe.menuRef))return;const M=g.value,Y=f.value.menuRef;if(!M||!Y)return;const w=M.getBoundingClientRect(),$=Y.getBoundingClientRect();if($.width===0||$.height===0){setTimeout(()=>{d.value&&L()},10);return}let V=0,I=0;switch(n.placement){case"top":V=w.top-$.height,I=w.left;break;case"top-start":V=w.top-$.height,I=w.left;break;case"top-end":V=w.top-$.height,I=w.left+w.width-$.width;break;case"bottom":V=w.bottom,I=w.left+(w.width-$.width)/2;break;case"bottom-start":V=w.bottom,I=w.left;break;case"bottom-end":V=w.bottom,I=w.left+w.width-$.width;break;case"left":V=w.top+(w.height-$.height)/2,I=w.left-$.width;break;case"left-start":V=w.top,I=w.left-$.width;break;case"left-end":V=w.top+w.height-$.height,I=w.left-$.width;break;case"right":V=w.top+(w.height-$.height)/2,I=w.right;break;case"right-start":V=w.top,I=w.right;break;case"right-end":V=w.top+w.height-$.height,I=w.right;break}const ne=window.innerWidth,ae=window.innerHeight;I<0&&(I=8),I+$.width>ne&&(I=ne-$.width-8),V<0&&(V=8),V+$.height>ae&&(V=ae-$.height-8),Y.style.top=`${V}px`,Y.style.left=`${I}px`,Y.style.position="fixed",Y.style.visibility="visible",Y.style.display="block"}e.watch(d,M=>{y("visible-change",M),M?(requestAnimationFrame(()=>{e.nextTick(()=>{L()})}),document.addEventListener("click",F)):document.removeEventListener("click",F)});function F(M){if(n.trigger==="click"&&!n.disabled){const Y=M.target;g.value&&!g.value.contains(Y)&&k()}}function A(){d.value&&L()}return e.onMounted(()=>{window.addEventListener("resize",A),window.addEventListener("scroll",A,!0)}),e.onUnmounted(()=>{c&&clearTimeout(c),v&&clearTimeout(v),document.removeEventListener("click",F),window.removeEventListener("resize",A),window.removeEventListener("scroll",A,!0)}),s({show:B,hide:k,toggle:D,visible:d}),(M,Y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:g,class:e.normalizeClass(["rc-dropdown",{"is-disabled":t.disabled}]),onMouseenter:N,onMouseleave:x,onClick:te},[e.renderSlot(M.$slots,"default",{},void 0,!0),e.createVNode(xe,{ref_key:"menuRef",ref:f,visible:d.value,effect:t.effect,"max-height":t.maxHeight,onMouseenter:Z,onMouseleave:ee},{default:e.withCtx(()=>[e.renderSlot(M.$slots,"dropdown",{},void 0,!0)]),_:3},8,["visible","effect","max-height"])],34))}}),Re=K(ea,[["__scopeId","data-v-30feb4c4"]]),ta={class:"rc-dropdown-item__text"},na=e.defineComponent({name:"rc-dropdown-item",__name:"item",props:{command:{default:void 0},disabled:{type:Boolean,default:!1},divided:{type:Boolean,default:!1},icon:{default:""}},setup(t){const s=t,m=e.inject("handleItemClick",()=>{});function n(y){if(s.disabled){y.stopPropagation();return}m(s.command)}return(y,g)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["rc-dropdown-item",{"is-disabled":t.disabled,"is-divided":t.divided}]),onClick:n},[t.icon?(e.openBlock(),e.createBlock(P,{key:0,name:t.icon,class:"rc-dropdown-item__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",ta,[e.renderSlot(y.$slots,"default",{},void 0,!0)])],2))}}),ze=K(na,[["__scopeId","data-v-7c739fdf"]]);Re.name="rc-dropdown";xe.name="rc-dropdown-menu";ze.name="rc-dropdown-item";function qe(t){return t.component(Re.name,Re),t.component(xe.name,xe),t.component(ze.name,ze),t}const Ve=Symbol("RECYCLE_UI_CONFIG"),Fe={prefix:"rc",autoRegister:!0,provideKey:Ve,theme:{},iconCssUrl:"//at.alicdn.com/t/c/font_4252799_2vm5jrrzfvq.css",iconClass:"iconfont",inputDeviceType:"pc"};function aa(t,s){s.autoRegister!==!1&&(typeof Ae=="function"&&Ae(t),typeof Ye=="function"&&Ye(t),typeof Pe=="function"&&Pe(t),typeof et=="function"&&et(t),typeof Oe=="function"&&Oe(t),typeof We=="function"&&We(t),typeof Ge=="function"&&Ge(t),typeof je=="function"&&je(t),typeof He=="function"&&He(t),typeof Ue=="function"&&Ue(t),typeof qe=="function"&&qe(t))}const Je=(t,s)=>{const m={...Fe,...s||{}};if(t.provide(m.provideKey??Ve,m),t.config.globalProperties.$recycleUI=m,typeof window<"u"&&m.iconCssUrl){const n=`link[rel="stylesheet"][data-rcui-icon="true"][href="${m.iconCssUrl}"]`;if(!document.head.querySelector(n)){const g=document.createElement("link");g.rel="stylesheet",g.href=m.iconCssUrl,g.setAttribute("data-rcui-icon","true"),document.head.appendChild(g)}}return aa(t,m),t},oa={install:Je};function la(t){return{install(s){Je(s,t)}}}exports.RECYCLE_UI_SYMBOL=Ve;exports.RcButton=le;exports.RcCalendar=ke;exports.RcCard=Ce;exports.RcDescriptions=nt;exports.RcDescriptionsItem=at;exports.RcDropdown=Re;exports.RcDropdownItem=ze;exports.RcDropdownMenu=xe;exports.RcIcon=P;exports.RcInput=we;exports.RcPopup=ge;exports.RcSearchArea=Ke;exports.RcToast=Be;exports.createRecycleUI=la;exports.default=oa;exports.defaultRecycleUIConfig=Fe;exports.hideToast=ot;exports.install=Je;exports.installButton=Ae;exports.installCalendar=je;exports.installCard=Pe;exports.installDescriptions=Ye;exports.installDropdown=qe;exports.installIcon=Oe;exports.installInput=Ue;exports.installMessage=We;exports.installPopup=He;exports.installSearchArea=Ge;exports.message=lt;exports.rcDescriptions=nt;exports.rcDescriptionsItem=at;exports.showToast=It;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|