ep-craft 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/affix/affix.d.ts +19 -19
- package/dist/components/affix/affix.js +61 -53
- package/dist/components/alert/alert.d.ts +71 -17
- package/dist/components/alert/alert.js +99 -43
- package/dist/components/anchor/anchor.d.ts +19 -19
- package/dist/components/anchor/anchor.js +166 -102
- package/dist/components/anchor/constants.d.ts +15 -0
- package/dist/components/anchor/constants.js +4 -0
- package/dist/components/anchor-link/anchor-link.d.ts +1 -1
- package/dist/components/anchor-link/anchor-link.js +39 -26
- package/dist/components/button/EpButton.vue.d.ts +8 -8
- package/dist/components/button/EpButton.vue.js +5 -5
- package/dist/components/button/constants.d.ts +7 -0
- package/dist/components/button/constants.js +6 -0
- package/dist/components/check-tag/EpCheckTag.vue.d.ts +1 -1
- package/dist/components/collapse-transition/index.js +2 -2
- package/dist/components/config-provider/src/constants.js +4 -0
- package/dist/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/dist/components/config-provider/src/hooks/use-global-config.js +24 -0
- package/dist/components/form/src/constants.js +2 -1
- package/dist/components/form/src/hooks/use-form-common-props.d.ts +2 -2
- package/dist/components/form/src/hooks/use-form-common-props.js +17 -0
- package/dist/components/form/src/hooks/use-form-item.js +51 -0
- package/dist/components/icon/index.js +5 -5
- package/dist/components/menu/menu-collapse-transition.vue.js +10 -6
- package/dist/components/menu/menu.d.ts +47 -47
- package/dist/components/menu/menu.js +59 -52
- package/dist/components/menu/use-menu-color.d.ts +2 -0
- package/dist/components/menu/use-menu-color.js +11 -0
- package/dist/components/menu/use-menu-css-var.d.ts +2 -0
- package/dist/components/menu/use-menu-css-var.js +30 -0
- package/dist/components/menu/utils/menu-bar.d.ts +7 -0
- package/dist/components/menu/utils/menu-bar.js +15 -0
- package/dist/components/menu/utils/menu-item.d.ts +9 -0
- package/dist/components/menu/utils/menu-item.js +50 -0
- package/dist/components/menu/utils/submenu.d.ts +11 -0
- package/dist/components/menu/utils/submenu.js +49 -0
- package/dist/components/menu-item/EpMenuItem.vue.js +17 -13
- package/dist/components/menu-item-group/EpMenuItemGroup.vue.js +1 -1
- package/dist/components/popper/src/composables/use-content.d.ts +6 -6
- package/dist/components/popper/src/content.vue.d.ts +6 -6
- package/dist/components/popper/src/popper.d.ts +2 -2
- package/dist/components/radio/constants.d.ts +64 -0
- package/dist/components/radio/constants.js +4 -0
- package/dist/components/radio/radio.d.ts +98 -19
- package/dist/components/radio/radio.js +101 -43
- package/dist/components/radio/use-radio.d.ts +13 -0
- package/dist/components/radio/use-radio.js +43 -0
- package/dist/components/radio-button/radio-button.d.ts +46 -16
- package/dist/components/radio-button/radio-button.js +37 -29
- package/dist/components/radio-group/radio-group.d.ts +142 -28
- package/dist/components/radio-group/radio-group.js +136 -55
- package/dist/components/sub-menu/sub-menu.d.ts +19 -19
- package/dist/components/sub-menu/sub-menu.js +65 -58
- package/dist/components/tab-pane/tab-pane.d.ts +45 -8
- package/dist/components/tab-pane/tab-pane.js +66 -32
- package/dist/components/tabs/composables/use-tab-nav-touch.d.ts +19 -0
- package/dist/components/tabs/composables/use-tab-nav-touch.js +58 -0
- package/dist/components/tabs/constants.d.ts +63 -0
- package/dist/components/tabs/constants.js +4 -0
- package/dist/components/tabs/tab-bar.d.ts +97 -0
- package/dist/components/tabs/tab-bar.vue.d.ts +14 -0
- package/dist/components/tabs/tab-bar.vue.js +80 -0
- package/dist/components/tabs/tab-bar2.vue.js +4 -0
- package/dist/components/tabs/tab-nav.d.ts +295 -0
- package/dist/components/tabs/tab-nav.js +297 -0
- package/dist/components/tabs/tabs.d.ts +71 -28
- package/dist/components/tabs/tabs.js +165 -93
- package/dist/components/tag/EpTag.vue.d.ts +3 -3
- package/dist/components/tag/EpTag.vue.js +3 -3
- package/dist/components/tooltip/index.d.ts +34 -34
- package/dist/components/tooltip/index.js +12 -12
- package/dist/components/tooltip/src/content.vue.d.ts +8 -8
- package/dist/components/tooltip/src/tooltip.d.ts +2 -2
- package/dist/components/tooltip/src/tooltip.vue.d.ts +12 -12
- package/dist/components/tooltip/src/trigger.d.ts +1 -1
- package/dist/constants/event.js +5 -0
- package/dist/directives/click-outside/index.js +49 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-deprecated/index.js +25 -0
- package/dist/hooks/use-locale/index.js +24 -0
- package/dist/hooks/use-ordered-children/index.js +53 -0
- package/dist/hooks/use-popper/index.d.ts +6 -6
- package/dist/hooks/use-prop/index.js +11 -0
- package/dist/hooks/use-size/index.d.ts +3 -3
- package/dist/hooks/use-size/index.js +14 -6
- package/dist/hooks/use-wheel/defaults.d.ts +27 -0
- package/dist/hooks/use-wheel/defaults.js +4 -0
- package/dist/hooks/use-wheel/index.d.ts +13 -0
- package/dist/hooks/use-wheel/index.js +26 -0
- package/dist/utils/browser.js +6 -5
- package/dist/utils/dom/aria.js +13 -6
- package/dist/utils/dom/element.js +16 -0
- package/dist/utils/dom/position.js +18 -0
- package/dist/utils/dom/scroll.js +50 -0
- package/dist/utils/dom/style.js +40 -13
- package/dist/utils/easings.js +7 -0
- package/dist/utils/error.js +11 -7
- package/dist/utils/numbers.js +6 -0
- package/dist/utils/objects.js +7 -0
- package/dist/utils/raf.js +6 -0
- package/dist/utils/strings.js +8 -0
- package/dist/utils/throttleByRaf.js +15 -0
- package/dist/utils/types.js +19 -16
- package/dist/utils/typescript.js +4 -0
- package/dist/utils/vue/icon.js +20 -0
- package/dist/utils/vue/vnode.d.ts +4 -4
- package/dist/utils/vue/vnode.js +17 -0
- package/dist/vendored-components.d.ts +6 -3
- package/dist/vendored-components.js +11 -5
- package/package.json +1 -1
|
@@ -1,26 +1,140 @@
|
|
|
1
|
+
import type { ComponentSize } from '@element-plus/constants';
|
|
2
|
+
/**
|
|
3
|
+
* EpRadioGroup —— 从 element-plus 的 radio-group 源码 vendored 而来
|
|
4
|
+
* (el -> ep 命名),样式复用仓库内置的 theme-chalk/src/radio.scss(命名空间为 el)。
|
|
5
|
+
*
|
|
6
|
+
* 注意:内部通过 provide(radioGroupKey) 向 EpRadio / EpRadioButton 提供上下文,
|
|
7
|
+
* options 渲染时直接引用 vendored 的 EpRadio / EpRadioButton。
|
|
8
|
+
*
|
|
9
|
+
* 以下 props/emits/defaults 与类型定义从 element-plus 的 radio/src/radio-group.ts
|
|
10
|
+
* vendored 而来(内联到本文件顶部),替换 element-plus 的深引用 import。
|
|
11
|
+
*/
|
|
12
|
+
export type radioOptionProp = {
|
|
13
|
+
value?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
disabled?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const radioDefaultProps: Required<radioOptionProp>;
|
|
18
|
+
export type radioOption = Record<string, any>;
|
|
19
|
+
export interface RadioGroupProps {
|
|
20
|
+
/**
|
|
21
|
+
* @description native `id` attribute
|
|
22
|
+
*/
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
* @description the size of radio buttons or bordered radios
|
|
26
|
+
*/
|
|
27
|
+
size?: ComponentSize;
|
|
28
|
+
/**
|
|
29
|
+
* @description whether the nesting radios are disabled
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @description binding value
|
|
34
|
+
*/
|
|
35
|
+
modelValue?: string | number | boolean;
|
|
36
|
+
/**
|
|
37
|
+
* @description border and background color when button is active
|
|
38
|
+
*/
|
|
39
|
+
fill?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @description font color when button is active
|
|
42
|
+
*/
|
|
43
|
+
textColor?: string;
|
|
44
|
+
/**
|
|
45
|
+
* @description native `name` attribute
|
|
46
|
+
*/
|
|
47
|
+
name?: string;
|
|
48
|
+
/**
|
|
49
|
+
* @description whether to trigger form validation
|
|
50
|
+
*/
|
|
51
|
+
validateEvent?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @description radio options
|
|
54
|
+
*/
|
|
55
|
+
options?: radioOption[];
|
|
56
|
+
/**
|
|
57
|
+
* @description custom prop names for options
|
|
58
|
+
*/
|
|
59
|
+
props?: radioOptionProp;
|
|
60
|
+
/**
|
|
61
|
+
* @description radio type
|
|
62
|
+
*/
|
|
63
|
+
type?: 'radio' | 'button';
|
|
64
|
+
/**
|
|
65
|
+
* @description native `aria-label` attribute
|
|
66
|
+
*/
|
|
67
|
+
ariaLabel?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated Removed after 3.0.0, Use `RadioGroupProps` instead.
|
|
71
|
+
*/
|
|
72
|
+
export declare const radioGroupProps: {
|
|
73
|
+
readonly ariaLabel: StringConstructor;
|
|
74
|
+
readonly id: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
75
|
+
readonly size: {
|
|
76
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
77
|
+
readonly required: false;
|
|
78
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
79
|
+
__epPropKey: true;
|
|
80
|
+
};
|
|
81
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
82
|
+
readonly modelValue: import("@element-plus/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown, undefined, boolean>;
|
|
83
|
+
readonly fill: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
84
|
+
readonly textColor: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
85
|
+
readonly name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
86
|
+
readonly validateEvent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
87
|
+
readonly options: {
|
|
88
|
+
readonly type: import("vue").PropType<radioOption[]>;
|
|
89
|
+
readonly required: false;
|
|
90
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
91
|
+
__epPropKey: true;
|
|
92
|
+
};
|
|
93
|
+
readonly props: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => radioOptionProp) | (() => radioOptionProp) | (((new (...args: any[]) => radioOptionProp) | (() => radioOptionProp)) | null)[], unknown, unknown, () => Required<radioOptionProp>, boolean>;
|
|
94
|
+
readonly type: import("@element-plus/utils").EpPropFinalized<StringConstructor, "button" | "radio", unknown, "radio", boolean>;
|
|
95
|
+
};
|
|
96
|
+
export declare const radioGroupEmits: {
|
|
97
|
+
"update:modelValue": (val: string | number | boolean | undefined) => val is string | number | boolean;
|
|
98
|
+
change: (val: string | number | boolean | undefined) => val is string | number | boolean;
|
|
99
|
+
};
|
|
100
|
+
export type RadioGroupEmits = typeof radioGroupEmits;
|
|
101
|
+
/**
|
|
102
|
+
* @description default values for RadioGroupProps
|
|
103
|
+
*/
|
|
104
|
+
export declare const radioGroupPropsDefaults: {
|
|
105
|
+
readonly id: undefined;
|
|
106
|
+
readonly disabled: undefined;
|
|
107
|
+
readonly modelValue: undefined;
|
|
108
|
+
readonly fill: "";
|
|
109
|
+
readonly textColor: "";
|
|
110
|
+
readonly name: undefined;
|
|
111
|
+
readonly validateEvent: true;
|
|
112
|
+
readonly props: () => Required<radioOptionProp>;
|
|
113
|
+
readonly type: "radio";
|
|
114
|
+
};
|
|
1
115
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
116
|
readonly ariaLabel: StringConstructor;
|
|
3
|
-
readonly id: import("element-plus/
|
|
117
|
+
readonly id: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
4
118
|
readonly size: {
|
|
5
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
119
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
6
120
|
readonly required: false;
|
|
7
121
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
8
122
|
__epPropKey: true;
|
|
9
123
|
};
|
|
10
|
-
readonly disabled: import("element-plus/
|
|
11
|
-
readonly modelValue: import("element-plus/
|
|
12
|
-
readonly fill: import("element-plus/
|
|
13
|
-
readonly textColor: import("element-plus/
|
|
14
|
-
readonly name: import("element-plus/
|
|
15
|
-
readonly validateEvent: import("element-plus/
|
|
124
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
125
|
+
readonly modelValue: import("@element-plus/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown, undefined, boolean>;
|
|
126
|
+
readonly fill: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
127
|
+
readonly textColor: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
128
|
+
readonly name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
129
|
+
readonly validateEvent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
16
130
|
readonly options: {
|
|
17
|
-
readonly type: import("vue").PropType<
|
|
131
|
+
readonly type: import("vue").PropType<radioOption[]>;
|
|
18
132
|
readonly required: false;
|
|
19
133
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
20
134
|
__epPropKey: true;
|
|
21
135
|
};
|
|
22
|
-
readonly props: import("element-plus/
|
|
23
|
-
readonly type: import("element-plus/
|
|
136
|
+
readonly props: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => radioOptionProp) | (() => radioOptionProp) | (((new (...args: any[]) => radioOptionProp) | (() => radioOptionProp)) | null)[], unknown, unknown, () => Required<radioOptionProp>, boolean>;
|
|
137
|
+
readonly type: import("@element-plus/utils").EpPropFinalized<StringConstructor, "button" | "radio", unknown, "radio", boolean>;
|
|
24
138
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
139
|
[key: string]: any;
|
|
26
140
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -28,39 +142,39 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
142
|
change: (val: string | number | boolean | undefined) => val is string | number | boolean;
|
|
29
143
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
144
|
readonly ariaLabel: StringConstructor;
|
|
31
|
-
readonly id: import("element-plus/
|
|
145
|
+
readonly id: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
32
146
|
readonly size: {
|
|
33
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
147
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
34
148
|
readonly required: false;
|
|
35
149
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
36
150
|
__epPropKey: true;
|
|
37
151
|
};
|
|
38
|
-
readonly disabled: import("element-plus/
|
|
39
|
-
readonly modelValue: import("element-plus/
|
|
40
|
-
readonly fill: import("element-plus/
|
|
41
|
-
readonly textColor: import("element-plus/
|
|
42
|
-
readonly name: import("element-plus/
|
|
43
|
-
readonly validateEvent: import("element-plus/
|
|
152
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
153
|
+
readonly modelValue: import("@element-plus/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown, undefined, boolean>;
|
|
154
|
+
readonly fill: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
155
|
+
readonly textColor: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
156
|
+
readonly name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
157
|
+
readonly validateEvent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
44
158
|
readonly options: {
|
|
45
|
-
readonly type: import("vue").PropType<
|
|
159
|
+
readonly type: import("vue").PropType<radioOption[]>;
|
|
46
160
|
readonly required: false;
|
|
47
161
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
48
162
|
__epPropKey: true;
|
|
49
163
|
};
|
|
50
|
-
readonly props: import("element-plus/
|
|
51
|
-
readonly type: import("element-plus/
|
|
164
|
+
readonly props: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => radioOptionProp) | (() => radioOptionProp) | (((new (...args: any[]) => radioOptionProp) | (() => radioOptionProp)) | null)[], unknown, unknown, () => Required<radioOptionProp>, boolean>;
|
|
165
|
+
readonly type: import("@element-plus/utils").EpPropFinalized<StringConstructor, "button" | "radio", unknown, "radio", boolean>;
|
|
52
166
|
}>> & Readonly<{
|
|
53
|
-
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
54
167
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
168
|
+
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
55
169
|
}>, {
|
|
56
|
-
readonly props:
|
|
170
|
+
readonly props: radioOptionProp;
|
|
57
171
|
readonly name: string;
|
|
58
|
-
readonly type: import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "button" | "radio", unknown>;
|
|
59
172
|
readonly fill: string;
|
|
60
|
-
readonly disabled: import("element-plus/
|
|
173
|
+
readonly disabled: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
61
174
|
readonly id: string;
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
175
|
+
readonly type: import("@element-plus/utils").EpPropMergeType<StringConstructor, "button" | "radio", unknown>;
|
|
176
|
+
readonly modelValue: import("@element-plus/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown>;
|
|
177
|
+
readonly validateEvent: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
64
178
|
readonly textColor: string;
|
|
65
179
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
66
180
|
export default _default;
|
|
@@ -1,81 +1,159 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { UPDATE_MODEL_EVENT as
|
|
3
|
-
import { useNamespace as
|
|
4
|
-
import { useId as
|
|
5
|
-
import { useFormItem as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
1
|
+
import { defineComponent as G, ref as I, onMounted as A, computed as u, provide as L, reactive as R, toRefs as _, watch as x, h as s, renderSlot as B, Fragment as C, renderList as N, mergeProps as T, nextTick as F } from "vue";
|
|
2
|
+
import { UPDATE_MODEL_EVENT as V, CHANGE_EVENT as k } from "../../constants/event.js";
|
|
3
|
+
import { useNamespace as D } from "../../hooks/use-namespace/index.js";
|
|
4
|
+
import { useId as O } from "../../hooks/use-id/index.js";
|
|
5
|
+
import { useFormItem as z, useFormItemInputId as M } from "../form/src/hooks/use-form-item.js";
|
|
6
|
+
import { useAriaProps as j } from "../../hooks/use-aria/index.js";
|
|
7
|
+
import { useSizeProp as q } from "../../hooks/use-size/index.js";
|
|
8
|
+
import "@vue/shared";
|
|
9
|
+
import "lodash-unified";
|
|
10
|
+
import "@vueuse/core";
|
|
11
|
+
import "@element-plus/icons-vue";
|
|
12
|
+
import { buildProps as w, definePropType as c } from "../../utils/vue/props/runtime.js";
|
|
13
|
+
import { radioGroupKey as H } from "../radio/constants.js";
|
|
14
|
+
import K, { radioEmits as U } from "../radio/radio.js";
|
|
15
|
+
import J from "../radio-button/radio-button.js";
|
|
16
|
+
const f = {
|
|
17
|
+
label: "label",
|
|
18
|
+
value: "value",
|
|
19
|
+
disabled: "disabled"
|
|
20
|
+
}, Q = w({
|
|
21
|
+
/**
|
|
22
|
+
* @description native `id` attribute
|
|
23
|
+
*/
|
|
24
|
+
id: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* @description the size of radio buttons or bordered radios
|
|
30
|
+
*/
|
|
31
|
+
size: q,
|
|
32
|
+
/**
|
|
33
|
+
* @description whether the nesting radios are disabled
|
|
34
|
+
*/
|
|
35
|
+
disabled: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: void 0
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* @description binding value
|
|
41
|
+
*/
|
|
42
|
+
modelValue: {
|
|
43
|
+
type: [String, Number, Boolean],
|
|
44
|
+
default: void 0
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* @description border and background color when button is active
|
|
48
|
+
*/
|
|
49
|
+
fill: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* @description font color when button is active
|
|
55
|
+
*/
|
|
56
|
+
textColor: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: ""
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* @description native `name` attribute
|
|
62
|
+
*/
|
|
63
|
+
name: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: void 0
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* @description whether to trigger form validation
|
|
69
|
+
*/
|
|
70
|
+
validateEvent: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: !0
|
|
73
|
+
},
|
|
74
|
+
options: {
|
|
75
|
+
type: c(Array)
|
|
76
|
+
},
|
|
77
|
+
props: {
|
|
78
|
+
type: c(Object),
|
|
79
|
+
default: () => f
|
|
80
|
+
},
|
|
81
|
+
type: {
|
|
82
|
+
type: String,
|
|
83
|
+
values: ["radio", "button"],
|
|
84
|
+
default: "radio"
|
|
85
|
+
},
|
|
86
|
+
...j(["ariaLabel"])
|
|
87
|
+
}), W = U, X = (o, l) => {
|
|
88
|
+
const d = { ...o };
|
|
89
|
+
return l.forEach((n) => delete d[n]), d;
|
|
90
|
+
}, me = G({
|
|
14
91
|
name: "EpRadioGroup",
|
|
15
|
-
props:
|
|
16
|
-
emits:
|
|
17
|
-
setup(o, { emit:
|
|
18
|
-
const
|
|
19
|
-
formItemContext:
|
|
20
|
-
}),
|
|
21
|
-
|
|
92
|
+
props: Q,
|
|
93
|
+
emits: W,
|
|
94
|
+
setup(o, { emit: l, slots: d }) {
|
|
95
|
+
const n = D("radio"), v = O(), p = I(), { formItem: t } = z(), { inputId: b, isLabeledByFormItem: m } = M(o, {
|
|
96
|
+
formItemContext: t
|
|
97
|
+
}), y = (e) => {
|
|
98
|
+
l(V, e), F(() => l(k, e));
|
|
22
99
|
};
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
const e = (
|
|
100
|
+
A(() => {
|
|
101
|
+
var r;
|
|
102
|
+
const e = (r = p.value) == null ? void 0 : r.querySelectorAll("[type=radio]"), a = e == null ? void 0 : e[0];
|
|
26
103
|
!Array.from(e ?? []).some(
|
|
27
|
-
(
|
|
28
|
-
) &&
|
|
104
|
+
(i) => i.checked
|
|
105
|
+
) && a && (a.tabIndex = 0);
|
|
29
106
|
});
|
|
30
|
-
const
|
|
31
|
-
...
|
|
107
|
+
const E = u(() => o.name || v.value), g = u(() => ({
|
|
108
|
+
...f,
|
|
32
109
|
...o.props
|
|
33
|
-
})),
|
|
34
|
-
const { label:
|
|
35
|
-
label: e[
|
|
36
|
-
value: e[
|
|
37
|
-
disabled: e[
|
|
110
|
+
})), P = (e) => {
|
|
111
|
+
const { label: a, value: r, disabled: i } = g.value, h = {
|
|
112
|
+
label: e[a],
|
|
113
|
+
value: e[r],
|
|
114
|
+
disabled: e[i]
|
|
38
115
|
};
|
|
39
116
|
return {
|
|
40
|
-
...
|
|
41
|
-
...
|
|
117
|
+
...X(e, [a, r, i]),
|
|
118
|
+
...h
|
|
42
119
|
};
|
|
43
|
-
},
|
|
44
|
-
() => o.type === "button" ?
|
|
120
|
+
}, S = u(
|
|
121
|
+
() => o.type === "button" ? J : K
|
|
45
122
|
);
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
...
|
|
50
|
-
changeEvent:
|
|
51
|
-
name:
|
|
123
|
+
return L(
|
|
124
|
+
H,
|
|
125
|
+
R({
|
|
126
|
+
..._(o),
|
|
127
|
+
changeEvent: y,
|
|
128
|
+
name: E
|
|
52
129
|
})
|
|
53
130
|
), x(
|
|
54
131
|
() => o.modelValue,
|
|
55
|
-
(e,
|
|
56
|
-
|
|
132
|
+
(e, a) => {
|
|
133
|
+
var r, i;
|
|
134
|
+
o.validateEvent && e !== a && ((i = (r = t == null ? void 0 : t.validate) == null ? void 0 : r.call(t, "change")) == null || i.catch(() => {
|
|
57
135
|
}));
|
|
58
136
|
}
|
|
59
137
|
), () => s(
|
|
60
138
|
"div",
|
|
61
139
|
{
|
|
62
|
-
id:
|
|
63
|
-
ref:
|
|
64
|
-
class:
|
|
140
|
+
id: b.value,
|
|
141
|
+
ref: p,
|
|
142
|
+
class: n.b("group"),
|
|
65
143
|
role: "radiogroup",
|
|
66
|
-
"aria-label":
|
|
67
|
-
"aria-labelledby":
|
|
144
|
+
"aria-label": m.value ? void 0 : o.ariaLabel || "radio-group",
|
|
145
|
+
"aria-labelledby": m.value ? t == null ? void 0 : t.labelId : void 0
|
|
68
146
|
},
|
|
69
147
|
[
|
|
70
|
-
|
|
148
|
+
B(d, "default", {}, () => [
|
|
71
149
|
s(
|
|
72
150
|
C,
|
|
73
151
|
null,
|
|
74
|
-
|
|
152
|
+
N(
|
|
75
153
|
o.options,
|
|
76
|
-
(e,
|
|
77
|
-
|
|
78
|
-
|
|
154
|
+
(e, a) => s(
|
|
155
|
+
S.value,
|
|
156
|
+
T({ key: a }, P(e))
|
|
79
157
|
)
|
|
80
158
|
)
|
|
81
159
|
)
|
|
@@ -85,5 +163,8 @@ const j = (o, i) => {
|
|
|
85
163
|
}
|
|
86
164
|
});
|
|
87
165
|
export {
|
|
88
|
-
|
|
166
|
+
me as default,
|
|
167
|
+
f as radioDefaultProps,
|
|
168
|
+
W as radioGroupEmits,
|
|
169
|
+
Q as radioGroupProps
|
|
89
170
|
};
|
|
@@ -10,34 +10,34 @@ export declare const subMenuProps: {
|
|
|
10
10
|
readonly hideTimeout: NumberConstructor;
|
|
11
11
|
readonly popperClass: StringConstructor;
|
|
12
12
|
readonly popperStyle: {
|
|
13
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
13
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
14
14
|
readonly required: false;
|
|
15
15
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
16
16
|
__epPropKey: true;
|
|
17
17
|
};
|
|
18
18
|
readonly disabled: BooleanConstructor;
|
|
19
|
-
readonly teleported: import("element-plus/
|
|
19
|
+
readonly teleported: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
20
20
|
readonly popperOffset: NumberConstructor;
|
|
21
21
|
readonly expandCloseIcon: {
|
|
22
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
22
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
23
23
|
readonly required: false;
|
|
24
24
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
25
25
|
__epPropKey: true;
|
|
26
26
|
};
|
|
27
27
|
readonly expandOpenIcon: {
|
|
28
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
28
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
29
29
|
readonly required: false;
|
|
30
30
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
31
31
|
__epPropKey: true;
|
|
32
32
|
};
|
|
33
33
|
readonly collapseCloseIcon: {
|
|
34
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
34
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
35
35
|
readonly required: false;
|
|
36
36
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
37
37
|
__epPropKey: true;
|
|
38
38
|
};
|
|
39
39
|
readonly collapseOpenIcon: {
|
|
40
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
40
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
41
41
|
readonly required: false;
|
|
42
42
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
43
43
|
__epPropKey: true;
|
|
@@ -55,34 +55,34 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
55
55
|
readonly hideTimeout: NumberConstructor;
|
|
56
56
|
readonly popperClass: StringConstructor;
|
|
57
57
|
readonly popperStyle: {
|
|
58
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
58
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
59
59
|
readonly required: false;
|
|
60
60
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
61
61
|
__epPropKey: true;
|
|
62
62
|
};
|
|
63
63
|
readonly disabled: BooleanConstructor;
|
|
64
|
-
readonly teleported: import("element-plus/
|
|
64
|
+
readonly teleported: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
65
65
|
readonly popperOffset: NumberConstructor;
|
|
66
66
|
readonly expandCloseIcon: {
|
|
67
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
67
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
68
68
|
readonly required: false;
|
|
69
69
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
70
70
|
__epPropKey: true;
|
|
71
71
|
};
|
|
72
72
|
readonly expandOpenIcon: {
|
|
73
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
73
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
74
74
|
readonly required: false;
|
|
75
75
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
76
76
|
__epPropKey: true;
|
|
77
77
|
};
|
|
78
78
|
readonly collapseCloseIcon: {
|
|
79
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
79
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
80
80
|
readonly required: false;
|
|
81
81
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
82
82
|
__epPropKey: true;
|
|
83
83
|
};
|
|
84
84
|
readonly collapseOpenIcon: {
|
|
85
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
85
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
86
86
|
readonly required: false;
|
|
87
87
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
88
88
|
__epPropKey: true;
|
|
@@ -100,40 +100,40 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
100
100
|
readonly hideTimeout: NumberConstructor;
|
|
101
101
|
readonly popperClass: StringConstructor;
|
|
102
102
|
readonly popperStyle: {
|
|
103
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
103
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
|
104
104
|
readonly required: false;
|
|
105
105
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
106
106
|
__epPropKey: true;
|
|
107
107
|
};
|
|
108
108
|
readonly disabled: BooleanConstructor;
|
|
109
|
-
readonly teleported: import("element-plus/
|
|
109
|
+
readonly teleported: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
110
110
|
readonly popperOffset: NumberConstructor;
|
|
111
111
|
readonly expandCloseIcon: {
|
|
112
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
112
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
113
113
|
readonly required: false;
|
|
114
114
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
115
115
|
__epPropKey: true;
|
|
116
116
|
};
|
|
117
117
|
readonly expandOpenIcon: {
|
|
118
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
118
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
119
119
|
readonly required: false;
|
|
120
120
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
121
121
|
__epPropKey: true;
|
|
122
122
|
};
|
|
123
123
|
readonly collapseCloseIcon: {
|
|
124
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
124
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
125
125
|
readonly required: false;
|
|
126
126
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
127
127
|
__epPropKey: true;
|
|
128
128
|
};
|
|
129
129
|
readonly collapseOpenIcon: {
|
|
130
|
-
readonly type: import("vue").PropType<import("element-plus/
|
|
130
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
131
131
|
readonly required: false;
|
|
132
132
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
133
133
|
__epPropKey: true;
|
|
134
134
|
};
|
|
135
135
|
}>> & Readonly<{}>, {
|
|
136
|
-
readonly teleported: import("element-plus/es/utils/index.mjs").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
137
136
|
readonly disabled: boolean;
|
|
137
|
+
readonly teleported: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
138
138
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
139
139
|
export default _default;
|