@wfrog/vc-ui 1.11.10 → 1.11.12
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/es/chunk/Bw0Rhd-r.mjs +110 -0
- package/dist/es/chunk/CqTdDZkE.mjs +31 -0
- package/dist/es/chunk/{DAnWZLYj.mjs → CzWfBa_8.mjs} +96 -2
- package/dist/es/chunk/D229kQ56.mjs +28 -0
- package/dist/es/chunk/{Cxx_YWUC.mjs → DcouM6gM.mjs} +6 -548
- package/dist/es/chunk/Fo0dZYnz.mjs +128 -0
- package/dist/es/chunk/KanuIcmc.mjs +412 -0
- package/dist/es/chunk/{B71xEPfK.mjs → uuUHUjSk.mjs} +4 -35
- package/dist/es/components/backbottom/backbottom.mjs +3 -2
- package/dist/es/components/button/button.mjs +14 -13
- package/dist/es/components/choice/choice.mjs +11 -9
- package/dist/es/components/choice/index.css +1 -1
- package/dist/es/components/choice-boolean/choice-boolean.mjs +3 -3
- package/dist/es/components/color-switch/color-switch.mjs +73 -1046
- package/dist/es/components/color-switch/index.css +1 -1
- package/dist/es/components/cropper/cropper.mjs +11 -117
- package/dist/es/components/cropper/index.css +1 -1
- package/dist/es/components/currency/currency.mjs +10 -12
- package/dist/es/components/daterange-picker/daterange-picker.mjs +10 -6255
- package/dist/es/components/dialog/dialog.mjs +14 -408
- package/dist/es/components/dialog/index.css +1 -1
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +11 -14
- package/dist/es/components/dialog-map-point/dialog-map-point.mjs +4 -4
- package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +14 -1380
- package/dist/es/components/dialog-upload-images/index.css +1 -1
- package/dist/es/components/drag-verify/drag-verify.mjs +3 -2
- package/dist/es/components/drawer/drawer.mjs +16 -359
- package/dist/es/components/drawer/index.css +3 -3
- package/dist/es/components/easy-pagination/easy-pagination.mjs +3 -2
- package/dist/es/components/explorer/explorer.mjs +8 -8
- package/dist/es/components/explorer-column-table/explorer-column-table.mjs +5 -7
- package/dist/es/components/explorer-column-table/index.css +1 -1
- package/dist/es/components/explorer-container/explorer-container.d.ts +1 -1
- package/dist/es/components/explorer-container/explorer-container.mjs +4 -3
- package/dist/es/components/explorer-filter/explorer-filter.mjs +5 -4
- package/dist/es/components/explorer-footer/explorer-footer.mjs +4 -8
- package/dist/es/components/explorer-form/explorer-form.mjs +4 -3
- package/dist/es/components/explorer-list/explorer-list.mjs +18 -13
- package/dist/es/components/explorer-list/explorer-list.vue.d.ts +1 -1
- package/dist/es/components/explorer-list/index.css +16 -16
- package/dist/es/components/explorer-modal-form/explorer-modal-form.mjs +8 -7
- package/dist/es/components/explorer-panel/explorer-panel.mjs +3 -3
- package/dist/es/components/explorer-query/explorer-query.mjs +9 -2201
- package/dist/es/components/explorer-query/index.css +1 -1
- package/dist/es/components/explorer-table/explorer-table.mjs +5 -8
- package/dist/es/components/explorer-tools/explorer-tools.mjs +23 -271
- package/dist/es/components/explorer-tools/index.css +9 -9
- package/dist/es/components/explorer-tree/explorer-tree.mjs +4 -5
- package/dist/es/components/explorer-tree/explorer-tree.vue.d.ts +1 -1
- package/dist/es/components/form-item/form-item.mjs +3 -3
- package/dist/es/components/icon-picker/icon-picker.mjs +8 -12
- package/dist/es/components/image/image.mjs +4 -4
- package/dist/es/components/info-tooltip/info-tooltip.mjs +336 -4
- package/dist/es/components/input/input.mjs +3 -2
- package/dist/es/components/input-number/input-number.mjs +3 -3
- package/dist/es/components/pca-picker/index.css +1 -1
- package/dist/es/components/pca-picker/pca-picker.mjs +443 -601
- package/dist/es/components/screenfull/screenfull.mjs +4 -3
- package/dist/es/components/scrollbar/index.css +1 -1
- package/dist/es/components/scrollbar/scrollbar.mjs +10 -10
- package/dist/es/components/select/index.css +1 -1
- package/dist/es/components/select/select.mjs +9 -10
- package/dist/es/components/single-player/index.css +1 -1
- package/dist/es/components/single-player/single-player.mjs +10 -1087
- package/dist/es/components/splitter/splitter.mjs +3 -3
- package/dist/es/components/splitter-panel/splitter-panel.mjs +3 -3
- package/dist/es/components/switch/index.css +1 -1
- package/dist/es/components/switch/switch.mjs +9 -395
- package/dist/es/components/tags/tags.mjs +7 -9
- package/dist/es/components/text-ellipsis/text-ellipsis.mjs +3 -3
- package/dist/es/components/thousand-input/thousand-input.mjs +39 -8
- package/dist/es/components/tinymce/tinymce.mjs +4 -3
- package/dist/es/components/transfer/transfer.mjs +3 -4
- package/dist/es/components/transfer-panel/transfer-panel.mjs +5 -4
- package/dist/es/components/tree-picker/popover-cascader.css +1 -1
- package/dist/es/components/tree-picker/tree-picker.mjs +5 -10
- package/dist/es/index.mjs +1 -1
- package/dist/index.css +41 -68
- package/package.json +1 -1
- package/dist/es/chunk/B-rxnVJv.mjs +0 -3
- package/dist/es/chunk/B5HpgPRt.mjs +0 -69
- package/dist/es/chunk/BBhZKpIc.mjs +0 -2179
- package/dist/es/chunk/BDcsaNYa.mjs +0 -59
- package/dist/es/chunk/BTSSEFfD.mjs +0 -319
- package/dist/es/chunk/BTpNRPQW.mjs +0 -55
- package/dist/es/chunk/BVBK1U57.mjs +0 -96
- package/dist/es/chunk/Bc6yUGLs.mjs +0 -45
- package/dist/es/chunk/BjVI1XMz.mjs +0 -40
- package/dist/es/chunk/BlzQCBDu.mjs +0 -5741
- package/dist/es/chunk/BpJKnxlF.mjs +0 -476
- package/dist/es/chunk/Brp-qSBw.mjs +0 -2003
- package/dist/es/chunk/BunQI8Jb.mjs +0 -390
- package/dist/es/chunk/C0XgBrDz.mjs +0 -775
- package/dist/es/chunk/C0pTANRX.mjs +0 -109
- package/dist/es/chunk/CBMjhoFP.mjs +0 -101
- package/dist/es/chunk/CBiNtNvQ.mjs +0 -242
- package/dist/es/chunk/CBlJeNBO.mjs +0 -890
- package/dist/es/chunk/CCVL_Zj-.mjs +0 -427
- package/dist/es/chunk/CEl4MyfJ.mjs +0 -252
- package/dist/es/chunk/CJK5_jsA.mjs +0 -53
- package/dist/es/chunk/CKOcwq5V.mjs +0 -44
- package/dist/es/chunk/COs9dJZa.mjs +0 -66
- package/dist/es/chunk/CPt6MxJW.mjs +0 -375
- package/dist/es/chunk/CVqW0jzp.mjs +0 -107
- package/dist/es/chunk/CccIsEqA.mjs +0 -128
- package/dist/es/chunk/CjLR27-a.mjs +0 -582
- package/dist/es/chunk/CoGexPPD.mjs +0 -2192
- package/dist/es/chunk/CsLIbnzG.mjs +0 -64
- package/dist/es/chunk/Ct6q2FXg.mjs +0 -5
- package/dist/es/chunk/Cuq5meQh.mjs +0 -184
- package/dist/es/chunk/CvYIOfT1.mjs +0 -23
- package/dist/es/chunk/CxHJBf4l.mjs +0 -31
- package/dist/es/chunk/CzdaOBtA.mjs +0 -66
- package/dist/es/chunk/D0QTifnI.mjs +0 -54
- package/dist/es/chunk/D1QnA2iT.mjs +0 -229
- package/dist/es/chunk/D3AvJlVX.mjs +0 -188
- package/dist/es/chunk/D9Lr0Bzb.mjs +0 -1136
- package/dist/es/chunk/DCkPv0hy.mjs +0 -29
- package/dist/es/chunk/DRwwUUhy.mjs +0 -49
- package/dist/es/chunk/DX-2VRY2.mjs +0 -836
- package/dist/es/chunk/DZ2oTFad.mjs +0 -687
- package/dist/es/chunk/D_bou1py.mjs +0 -55
- package/dist/es/chunk/Da199A5L.mjs +0 -314
- package/dist/es/chunk/DbhQlaOz.mjs +0 -94
- package/dist/es/chunk/Dgu95mOy.mjs +0 -237
- package/dist/es/chunk/DhGOsWxx.mjs +0 -6
- package/dist/es/chunk/Dm_Sj5aH.mjs +0 -487
- package/dist/es/chunk/Dmi-1GRO.mjs +0 -163
- package/dist/es/chunk/DodoD9a9.mjs +0 -52
- package/dist/es/chunk/DrrVDcwm.mjs +0 -955
- package/dist/es/chunk/Du_zJ1Fz.mjs +0 -49
- package/dist/es/chunk/DxxbB5jY.mjs +0 -34
- package/dist/es/chunk/Gk1J52Yw.mjs +0 -207
- package/dist/es/chunk/NsldgdCh.mjs +0 -704
- package/dist/es/chunk/V6KjsUQN.mjs +0 -35
- package/dist/es/chunk/eEsLFV3s.mjs +0 -76
- package/dist/es/chunk/fqiLhk0V.mjs +0 -2065
- package/dist/es/chunk/nxVM7re4.mjs +0 -35
- package/dist/es/chunk/s7HLrANj.mjs +0 -215
- package/dist/es/chunk/vPhxogl3.mjs +0 -19
- package/dist/es/components/icon/icon2.mjs +0 -27
|
@@ -1,427 +0,0 @@
|
|
|
1
|
-
import { ref, inject, computed, defineComponent, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, withDirectives, withModifiers, isRef, vModelRadio, renderSlot, createTextVNode, toDisplayString, nextTick, normalizeStyle, onMounted, provide, reactive, toRefs, watch, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
-
import { b as buildProps, i as isString, u as useNamespace, d as definePropType, a as debugWarn } from './Gk1J52Yw.mjs';
|
|
3
|
-
import { u as useSizeProp } from './vPhxogl3.mjs';
|
|
4
|
-
import { C as CHANGE_EVENT, U as UPDATE_MODEL_EVENT } from './Ct6q2FXg.mjs';
|
|
5
|
-
import { b as isNumber, d as isBoolean, g as isPropAbsent } from './Bc6yUGLs.mjs';
|
|
6
|
-
import { c as useFormSize, a as useFormDisabled, u as useFormItem, b as useFormItemInputId } from './CBMjhoFP.mjs';
|
|
7
|
-
import { u as useDeprecated } from './CvYIOfT1.mjs';
|
|
8
|
-
import { _ as _export_sfc, a as withNoopInstall, w as withInstall } from './V6KjsUQN.mjs';
|
|
9
|
-
import { u as useAriaProps } from './BunQI8Jb.mjs';
|
|
10
|
-
import { u as useId } from './nxVM7re4.mjs';
|
|
11
|
-
import { i as isEqual } from './B71xEPfK.mjs';
|
|
12
|
-
import { o as omit } from './CBiNtNvQ.mjs';
|
|
13
|
-
|
|
14
|
-
const radioPropsBase = buildProps({
|
|
15
|
-
modelValue: {
|
|
16
|
-
type: [String, Number, Boolean],
|
|
17
|
-
default: void 0
|
|
18
|
-
},
|
|
19
|
-
size: useSizeProp,
|
|
20
|
-
disabled: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: void 0
|
|
23
|
-
},
|
|
24
|
-
label: {
|
|
25
|
-
type: [String, Number, Boolean],
|
|
26
|
-
default: void 0
|
|
27
|
-
},
|
|
28
|
-
value: {
|
|
29
|
-
type: [String, Number, Boolean],
|
|
30
|
-
default: void 0
|
|
31
|
-
},
|
|
32
|
-
name: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: void 0
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const radioProps = buildProps({
|
|
38
|
-
...radioPropsBase,
|
|
39
|
-
border: Boolean
|
|
40
|
-
});
|
|
41
|
-
const radioEmits = {
|
|
42
|
-
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
|
|
43
|
-
[CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const radioGroupKey = Symbol("radioGroupKey");
|
|
47
|
-
|
|
48
|
-
const useRadio = (props, emit) => {
|
|
49
|
-
const radioRef = ref();
|
|
50
|
-
const radioGroup = inject(radioGroupKey, void 0);
|
|
51
|
-
const isGroup = computed(() => !!radioGroup);
|
|
52
|
-
const actualValue = computed(() => {
|
|
53
|
-
if (!isPropAbsent(props.value)) {
|
|
54
|
-
return props.value;
|
|
55
|
-
}
|
|
56
|
-
return props.label;
|
|
57
|
-
});
|
|
58
|
-
const modelValue = computed({
|
|
59
|
-
get() {
|
|
60
|
-
return isGroup.value ? radioGroup.modelValue : props.modelValue;
|
|
61
|
-
},
|
|
62
|
-
set(val) {
|
|
63
|
-
if (isGroup.value) {
|
|
64
|
-
radioGroup.changeEvent(val);
|
|
65
|
-
} else {
|
|
66
|
-
emit && emit(UPDATE_MODEL_EVENT, val);
|
|
67
|
-
}
|
|
68
|
-
radioRef.value.checked = props.modelValue === actualValue.value;
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
const size = useFormSize(computed(() => radioGroup == null ? void 0 : radioGroup.size));
|
|
72
|
-
const disabled = useFormDisabled(computed(() => radioGroup == null ? void 0 : radioGroup.disabled));
|
|
73
|
-
const focus = ref(false);
|
|
74
|
-
const tabIndex = computed(() => {
|
|
75
|
-
return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0;
|
|
76
|
-
});
|
|
77
|
-
useDeprecated(
|
|
78
|
-
{
|
|
79
|
-
from: "label act as value",
|
|
80
|
-
replacement: "value",
|
|
81
|
-
version: "3.0.0",
|
|
82
|
-
scope: "el-radio",
|
|
83
|
-
ref: "https://element-plus.org/en-US/component/radio.html"
|
|
84
|
-
},
|
|
85
|
-
computed(() => isGroup.value && isPropAbsent(props.value))
|
|
86
|
-
);
|
|
87
|
-
return {
|
|
88
|
-
radioRef,
|
|
89
|
-
isGroup,
|
|
90
|
-
radioGroup,
|
|
91
|
-
focus,
|
|
92
|
-
size,
|
|
93
|
-
disabled,
|
|
94
|
-
tabIndex,
|
|
95
|
-
modelValue,
|
|
96
|
-
actualValue
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const _hoisted_1$2 = ["value", "name", "disabled", "checked"];
|
|
101
|
-
const _sfc_main$2 = defineComponent({
|
|
102
|
-
...{
|
|
103
|
-
name: "ElRadio"
|
|
104
|
-
},
|
|
105
|
-
__name: "radio",
|
|
106
|
-
props: radioProps,
|
|
107
|
-
emits: radioEmits,
|
|
108
|
-
setup(__props, { emit: __emit }) {
|
|
109
|
-
const props = __props;
|
|
110
|
-
const emit = __emit;
|
|
111
|
-
const ns = useNamespace("radio");
|
|
112
|
-
const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
|
|
113
|
-
function handleChange() {
|
|
114
|
-
nextTick(() => emit(CHANGE_EVENT, modelValue.value));
|
|
115
|
-
}
|
|
116
|
-
return (_ctx, _cache) => {
|
|
117
|
-
var _a;
|
|
118
|
-
return openBlock(), createElementBlock(
|
|
119
|
-
"label",
|
|
120
|
-
{
|
|
121
|
-
class: normalizeClass([
|
|
122
|
-
unref(ns).b(),
|
|
123
|
-
unref(ns).is("disabled", unref(disabled)),
|
|
124
|
-
unref(ns).is("focus", unref(focus)),
|
|
125
|
-
unref(ns).is("bordered", _ctx.border),
|
|
126
|
-
unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
|
|
127
|
-
unref(ns).m(unref(size))
|
|
128
|
-
])
|
|
129
|
-
},
|
|
130
|
-
[
|
|
131
|
-
createElementVNode(
|
|
132
|
-
"span",
|
|
133
|
-
{
|
|
134
|
-
class: normalizeClass([
|
|
135
|
-
unref(ns).e("input"),
|
|
136
|
-
unref(ns).is("disabled", unref(disabled)),
|
|
137
|
-
unref(ns).is("checked", unref(modelValue) === unref(actualValue))
|
|
138
|
-
])
|
|
139
|
-
},
|
|
140
|
-
[
|
|
141
|
-
withDirectives(createElementVNode("input", {
|
|
142
|
-
ref_key: "radioRef",
|
|
143
|
-
ref: radioRef,
|
|
144
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
145
|
-
class: normalizeClass(unref(ns).e("original")),
|
|
146
|
-
value: unref(actualValue),
|
|
147
|
-
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
|
148
|
-
disabled: unref(disabled),
|
|
149
|
-
checked: unref(modelValue) === unref(actualValue),
|
|
150
|
-
type: "radio",
|
|
151
|
-
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
152
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
153
|
-
onChange: handleChange,
|
|
154
|
-
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
155
|
-
}, ["stop"]))
|
|
156
|
-
}, null, 42, _hoisted_1$2), [
|
|
157
|
-
[vModelRadio, unref(modelValue)]
|
|
158
|
-
]),
|
|
159
|
-
createElementVNode(
|
|
160
|
-
"span",
|
|
161
|
-
{
|
|
162
|
-
class: normalizeClass(unref(ns).e("inner"))
|
|
163
|
-
},
|
|
164
|
-
null,
|
|
165
|
-
2
|
|
166
|
-
)
|
|
167
|
-
],
|
|
168
|
-
2
|
|
169
|
-
),
|
|
170
|
-
createElementVNode(
|
|
171
|
-
"span",
|
|
172
|
-
{
|
|
173
|
-
class: normalizeClass(unref(ns).e("label")),
|
|
174
|
-
onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
175
|
-
}, ["stop"]))
|
|
176
|
-
},
|
|
177
|
-
[
|
|
178
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
179
|
-
createTextVNode(
|
|
180
|
-
toDisplayString(_ctx.label),
|
|
181
|
-
1
|
|
182
|
-
)
|
|
183
|
-
])
|
|
184
|
-
],
|
|
185
|
-
34
|
|
186
|
-
)
|
|
187
|
-
],
|
|
188
|
-
2
|
|
189
|
-
);
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);
|
|
194
|
-
|
|
195
|
-
const radioButtonProps = buildProps({
|
|
196
|
-
...radioPropsBase
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
const _hoisted_1$1 = ["value", "name", "disabled"];
|
|
200
|
-
const _sfc_main$1 = defineComponent({
|
|
201
|
-
...{
|
|
202
|
-
name: "ElRadioButton"
|
|
203
|
-
},
|
|
204
|
-
__name: "radio-button",
|
|
205
|
-
props: radioButtonProps,
|
|
206
|
-
setup(__props) {
|
|
207
|
-
const props = __props;
|
|
208
|
-
const ns = useNamespace("radio");
|
|
209
|
-
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
|
|
210
|
-
const activeStyle = computed(() => {
|
|
211
|
-
return {
|
|
212
|
-
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
213
|
-
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
214
|
-
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
215
|
-
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
216
|
-
};
|
|
217
|
-
});
|
|
218
|
-
return (_ctx, _cache) => {
|
|
219
|
-
var _a;
|
|
220
|
-
return openBlock(), createElementBlock(
|
|
221
|
-
"label",
|
|
222
|
-
{
|
|
223
|
-
class: normalizeClass([
|
|
224
|
-
unref(ns).b("button"),
|
|
225
|
-
unref(ns).is("active", unref(modelValue) === unref(actualValue)),
|
|
226
|
-
unref(ns).is("disabled", unref(disabled)),
|
|
227
|
-
unref(ns).is("focus", unref(focus)),
|
|
228
|
-
unref(ns).bm("button", unref(size))
|
|
229
|
-
])
|
|
230
|
-
},
|
|
231
|
-
[
|
|
232
|
-
withDirectives(createElementVNode("input", {
|
|
233
|
-
ref_key: "radioRef",
|
|
234
|
-
ref: radioRef,
|
|
235
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
236
|
-
class: normalizeClass(unref(ns).be("button", "original-radio")),
|
|
237
|
-
value: unref(actualValue),
|
|
238
|
-
type: "radio",
|
|
239
|
-
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
|
240
|
-
disabled: unref(disabled),
|
|
241
|
-
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
242
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
243
|
-
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
244
|
-
}, ["stop"]))
|
|
245
|
-
}, null, 42, _hoisted_1$1), [
|
|
246
|
-
[vModelRadio, unref(modelValue)]
|
|
247
|
-
]),
|
|
248
|
-
createElementVNode(
|
|
249
|
-
"span",
|
|
250
|
-
{
|
|
251
|
-
class: normalizeClass(unref(ns).be("button", "inner")),
|
|
252
|
-
style: normalizeStyle(unref(modelValue) === unref(actualValue) ? activeStyle.value : {}),
|
|
253
|
-
onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
254
|
-
}, ["stop"]))
|
|
255
|
-
},
|
|
256
|
-
[
|
|
257
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
258
|
-
createTextVNode(
|
|
259
|
-
toDisplayString(_ctx.label),
|
|
260
|
-
1
|
|
261
|
-
)
|
|
262
|
-
])
|
|
263
|
-
],
|
|
264
|
-
38
|
|
265
|
-
)
|
|
266
|
-
],
|
|
267
|
-
2
|
|
268
|
-
);
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
var RadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);
|
|
273
|
-
|
|
274
|
-
const radioGroupProps = buildProps({
|
|
275
|
-
id: {
|
|
276
|
-
type: String,
|
|
277
|
-
default: void 0
|
|
278
|
-
},
|
|
279
|
-
size: useSizeProp,
|
|
280
|
-
disabled: {
|
|
281
|
-
type: Boolean,
|
|
282
|
-
default: void 0
|
|
283
|
-
},
|
|
284
|
-
modelValue: {
|
|
285
|
-
type: [String, Number, Boolean],
|
|
286
|
-
default: void 0
|
|
287
|
-
},
|
|
288
|
-
fill: {
|
|
289
|
-
type: String,
|
|
290
|
-
default: ""
|
|
291
|
-
},
|
|
292
|
-
textColor: {
|
|
293
|
-
type: String,
|
|
294
|
-
default: ""
|
|
295
|
-
},
|
|
296
|
-
name: {
|
|
297
|
-
type: String,
|
|
298
|
-
default: void 0
|
|
299
|
-
},
|
|
300
|
-
validateEvent: {
|
|
301
|
-
type: Boolean,
|
|
302
|
-
default: true
|
|
303
|
-
},
|
|
304
|
-
options: {
|
|
305
|
-
type: definePropType(Array)
|
|
306
|
-
},
|
|
307
|
-
props: {
|
|
308
|
-
type: definePropType(Object),
|
|
309
|
-
default: () => radioDefaultProps
|
|
310
|
-
},
|
|
311
|
-
type: {
|
|
312
|
-
type: String,
|
|
313
|
-
values: ["radio", "button"],
|
|
314
|
-
default: "radio"
|
|
315
|
-
},
|
|
316
|
-
...useAriaProps(["ariaLabel"])
|
|
317
|
-
});
|
|
318
|
-
const radioGroupEmits = radioEmits;
|
|
319
|
-
const radioDefaultProps = {
|
|
320
|
-
label: "label",
|
|
321
|
-
value: "value",
|
|
322
|
-
disabled: "disabled"
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
const _hoisted_1 = ["id", "aria-label", "aria-labelledby"];
|
|
326
|
-
const _sfc_main = defineComponent({
|
|
327
|
-
...{
|
|
328
|
-
name: "ElRadioGroup"
|
|
329
|
-
},
|
|
330
|
-
__name: "radio-group",
|
|
331
|
-
props: radioGroupProps,
|
|
332
|
-
emits: radioGroupEmits,
|
|
333
|
-
setup(__props, { emit: __emit }) {
|
|
334
|
-
const props = __props;
|
|
335
|
-
const emit = __emit;
|
|
336
|
-
const ns = useNamespace("radio");
|
|
337
|
-
const radioId = useId();
|
|
338
|
-
const radioGroupRef = ref();
|
|
339
|
-
const { formItem } = useFormItem();
|
|
340
|
-
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
|
341
|
-
formItemContext: formItem
|
|
342
|
-
});
|
|
343
|
-
const changeEvent = (value) => {
|
|
344
|
-
emit(UPDATE_MODEL_EVENT, value);
|
|
345
|
-
nextTick(() => emit(CHANGE_EVENT, value));
|
|
346
|
-
};
|
|
347
|
-
onMounted(() => {
|
|
348
|
-
const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
|
|
349
|
-
const firstLabel = radios[0];
|
|
350
|
-
if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
|
|
351
|
-
firstLabel.tabIndex = 0;
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
const name = computed(() => {
|
|
355
|
-
return props.name || radioId.value;
|
|
356
|
-
});
|
|
357
|
-
const aliasProps = computed(() => ({
|
|
358
|
-
...radioDefaultProps,
|
|
359
|
-
...props.props
|
|
360
|
-
}));
|
|
361
|
-
const getOptionProps = (option) => {
|
|
362
|
-
const { label, value, disabled } = aliasProps.value;
|
|
363
|
-
const base = {
|
|
364
|
-
label: option[label],
|
|
365
|
-
value: option[value],
|
|
366
|
-
disabled: option[disabled]
|
|
367
|
-
};
|
|
368
|
-
return { ...omit(option, [label, value, disabled]), ...base };
|
|
369
|
-
};
|
|
370
|
-
const optionComponent = computed(
|
|
371
|
-
() => props.type === "button" ? RadioButton : Radio
|
|
372
|
-
);
|
|
373
|
-
provide(
|
|
374
|
-
radioGroupKey,
|
|
375
|
-
reactive({
|
|
376
|
-
...toRefs(props),
|
|
377
|
-
changeEvent,
|
|
378
|
-
name
|
|
379
|
-
})
|
|
380
|
-
);
|
|
381
|
-
watch(
|
|
382
|
-
() => props.modelValue,
|
|
383
|
-
(newVal, oldValue) => {
|
|
384
|
-
if (props.validateEvent && !isEqual(newVal, oldValue)) {
|
|
385
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
);
|
|
389
|
-
return (_ctx, _cache) => {
|
|
390
|
-
return openBlock(), createElementBlock("div", {
|
|
391
|
-
id: unref(groupId),
|
|
392
|
-
ref_key: "radioGroupRef",
|
|
393
|
-
ref: radioGroupRef,
|
|
394
|
-
class: normalizeClass(unref(ns).b("group")),
|
|
395
|
-
role: "radiogroup",
|
|
396
|
-
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
|
|
397
|
-
"aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
|
|
398
|
-
}, [
|
|
399
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
400
|
-
(openBlock(true), createElementBlock(
|
|
401
|
-
Fragment,
|
|
402
|
-
null,
|
|
403
|
-
renderList(_ctx.options, (item, index) => {
|
|
404
|
-
return openBlock(), createBlock(
|
|
405
|
-
resolveDynamicComponent(optionComponent.value),
|
|
406
|
-
mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)),
|
|
407
|
-
null,
|
|
408
|
-
16
|
|
409
|
-
);
|
|
410
|
-
}),
|
|
411
|
-
128
|
|
412
|
-
))
|
|
413
|
-
])
|
|
414
|
-
], 10, _hoisted_1);
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
});
|
|
418
|
-
var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);
|
|
419
|
-
|
|
420
|
-
const ElRadio = withInstall(Radio, {
|
|
421
|
-
RadioButton,
|
|
422
|
-
RadioGroup
|
|
423
|
-
});
|
|
424
|
-
const ElRadioGroup = withNoopInstall(RadioGroup);
|
|
425
|
-
const ElRadioButton = withNoopInstall(RadioButton);
|
|
426
|
-
|
|
427
|
-
export { ElRadioGroup as E, ElRadioButton as a, ElRadio as b };
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { inject, ref, computed, unref, isRef } from 'vue';
|
|
2
|
-
import { n as baseGet } from './Cxx_YWUC.mjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
6
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
7
|
-
*
|
|
8
|
-
* @static
|
|
9
|
-
* @memberOf _
|
|
10
|
-
* @since 3.7.0
|
|
11
|
-
* @category Object
|
|
12
|
-
* @param {Object} object The object to query.
|
|
13
|
-
* @param {Array|string} path The path of the property to get.
|
|
14
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
15
|
-
* @returns {*} Returns the resolved value.
|
|
16
|
-
* @example
|
|
17
|
-
*
|
|
18
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
19
|
-
*
|
|
20
|
-
* _.get(object, 'a[0].b.c');
|
|
21
|
-
* // => 3
|
|
22
|
-
*
|
|
23
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
24
|
-
* // => 3
|
|
25
|
-
*
|
|
26
|
-
* _.get(object, 'a.b.c', 'default');
|
|
27
|
-
* // => 'default'
|
|
28
|
-
*/
|
|
29
|
-
function get(object, path, defaultValue) {
|
|
30
|
-
var result = object == null ? undefined : baseGet(object, path);
|
|
31
|
-
return result === undefined ? defaultValue : result;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var English = {
|
|
35
|
-
name: "en",
|
|
36
|
-
el: {
|
|
37
|
-
breadcrumb: {
|
|
38
|
-
label: "Breadcrumb"
|
|
39
|
-
},
|
|
40
|
-
colorpicker: {
|
|
41
|
-
confirm: "OK",
|
|
42
|
-
clear: "Clear",
|
|
43
|
-
defaultLabel: "color picker",
|
|
44
|
-
description: "current color is {color}. press enter to select a new color.",
|
|
45
|
-
alphaLabel: "pick alpha value",
|
|
46
|
-
alphaDescription: "alpha {alpha}, current color is {color}",
|
|
47
|
-
hueLabel: "pick hue value",
|
|
48
|
-
hueDescription: "hue {hue}, current color is {color}",
|
|
49
|
-
svLabel: "pick saturation and brightness value",
|
|
50
|
-
svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}",
|
|
51
|
-
predefineDescription: "select {value} as the color"
|
|
52
|
-
},
|
|
53
|
-
datepicker: {
|
|
54
|
-
now: "Now",
|
|
55
|
-
today: "Today",
|
|
56
|
-
cancel: "Cancel",
|
|
57
|
-
clear: "Clear",
|
|
58
|
-
confirm: "OK",
|
|
59
|
-
dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
|
|
60
|
-
monthTablePrompt: "Use the arrow keys and enter to select the month",
|
|
61
|
-
yearTablePrompt: "Use the arrow keys and enter to select the year",
|
|
62
|
-
selectedDate: "Selected date",
|
|
63
|
-
selectDate: "Select date",
|
|
64
|
-
selectTime: "Select time",
|
|
65
|
-
startDate: "Start Date",
|
|
66
|
-
startTime: "Start Time",
|
|
67
|
-
endDate: "End Date",
|
|
68
|
-
endTime: "End Time",
|
|
69
|
-
prevYear: "Previous Year",
|
|
70
|
-
nextYear: "Next Year",
|
|
71
|
-
prevMonth: "Previous Month",
|
|
72
|
-
nextMonth: "Next Month",
|
|
73
|
-
year: "",
|
|
74
|
-
month1: "January",
|
|
75
|
-
month2: "February",
|
|
76
|
-
month3: "March",
|
|
77
|
-
month4: "April",
|
|
78
|
-
month5: "May",
|
|
79
|
-
month6: "June",
|
|
80
|
-
month7: "July",
|
|
81
|
-
month8: "August",
|
|
82
|
-
month9: "September",
|
|
83
|
-
month10: "October",
|
|
84
|
-
month11: "November",
|
|
85
|
-
month12: "December",
|
|
86
|
-
weeks: {
|
|
87
|
-
sun: "Sun",
|
|
88
|
-
mon: "Mon",
|
|
89
|
-
tue: "Tue",
|
|
90
|
-
wed: "Wed",
|
|
91
|
-
thu: "Thu",
|
|
92
|
-
fri: "Fri",
|
|
93
|
-
sat: "Sat"
|
|
94
|
-
},
|
|
95
|
-
weeksFull: {
|
|
96
|
-
sun: "Sunday",
|
|
97
|
-
mon: "Monday",
|
|
98
|
-
tue: "Tuesday",
|
|
99
|
-
wed: "Wednesday",
|
|
100
|
-
thu: "Thursday",
|
|
101
|
-
fri: "Friday",
|
|
102
|
-
sat: "Saturday"
|
|
103
|
-
},
|
|
104
|
-
months: {
|
|
105
|
-
jan: "Jan",
|
|
106
|
-
feb: "Feb",
|
|
107
|
-
mar: "Mar",
|
|
108
|
-
apr: "Apr",
|
|
109
|
-
may: "May",
|
|
110
|
-
jun: "Jun",
|
|
111
|
-
jul: "Jul",
|
|
112
|
-
aug: "Aug",
|
|
113
|
-
sep: "Sep",
|
|
114
|
-
oct: "Oct",
|
|
115
|
-
nov: "Nov",
|
|
116
|
-
dec: "Dec"
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
inputNumber: {
|
|
120
|
-
decrease: "decrease number",
|
|
121
|
-
increase: "increase number"
|
|
122
|
-
},
|
|
123
|
-
select: {
|
|
124
|
-
loading: "Loading",
|
|
125
|
-
noMatch: "No matching data",
|
|
126
|
-
noData: "No data",
|
|
127
|
-
placeholder: "Select"
|
|
128
|
-
},
|
|
129
|
-
mention: {
|
|
130
|
-
loading: "Loading"
|
|
131
|
-
},
|
|
132
|
-
dropdown: {
|
|
133
|
-
toggleDropdown: "Toggle Dropdown"
|
|
134
|
-
},
|
|
135
|
-
cascader: {
|
|
136
|
-
noMatch: "No matching data",
|
|
137
|
-
loading: "Loading",
|
|
138
|
-
placeholder: "Select",
|
|
139
|
-
noData: "No data"
|
|
140
|
-
},
|
|
141
|
-
pagination: {
|
|
142
|
-
goto: "Go to",
|
|
143
|
-
pagesize: "/page",
|
|
144
|
-
total: "Total {total}",
|
|
145
|
-
pageClassifier: "",
|
|
146
|
-
page: "Page",
|
|
147
|
-
prev: "Go to previous page",
|
|
148
|
-
next: "Go to next page",
|
|
149
|
-
currentPage: "page {pager}",
|
|
150
|
-
prevPages: "Previous {pager} pages",
|
|
151
|
-
nextPages: "Next {pager} pages",
|
|
152
|
-
deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
|
|
153
|
-
},
|
|
154
|
-
dialog: {
|
|
155
|
-
close: "Close this dialog"
|
|
156
|
-
},
|
|
157
|
-
drawer: {
|
|
158
|
-
close: "Close this dialog"
|
|
159
|
-
},
|
|
160
|
-
messagebox: {
|
|
161
|
-
title: "Message",
|
|
162
|
-
confirm: "OK",
|
|
163
|
-
cancel: "Cancel",
|
|
164
|
-
error: "Illegal input",
|
|
165
|
-
close: "Close this dialog"
|
|
166
|
-
},
|
|
167
|
-
upload: {
|
|
168
|
-
deleteTip: "press delete to remove",
|
|
169
|
-
delete: "Delete",
|
|
170
|
-
preview: "Preview",
|
|
171
|
-
continue: "Continue"
|
|
172
|
-
},
|
|
173
|
-
slider: {
|
|
174
|
-
defaultLabel: "slider between {min} and {max}",
|
|
175
|
-
defaultRangeStartLabel: "pick start value",
|
|
176
|
-
defaultRangeEndLabel: "pick end value"
|
|
177
|
-
},
|
|
178
|
-
table: {
|
|
179
|
-
emptyText: "No Data",
|
|
180
|
-
confirmFilter: "Confirm",
|
|
181
|
-
resetFilter: "Reset",
|
|
182
|
-
clearFilter: "All",
|
|
183
|
-
sumText: "Sum",
|
|
184
|
-
selectAllLabel: "Select all rows",
|
|
185
|
-
selectRowLabel: "Select this row",
|
|
186
|
-
expandRowLabel: "Expand this row",
|
|
187
|
-
collapseRowLabel: "Collapse this row",
|
|
188
|
-
sortLabel: "Sort by {column}",
|
|
189
|
-
filterLabel: "Filter by {column}"
|
|
190
|
-
},
|
|
191
|
-
tag: {
|
|
192
|
-
close: "Close this tag"
|
|
193
|
-
},
|
|
194
|
-
tour: {
|
|
195
|
-
next: "Next",
|
|
196
|
-
previous: "Previous",
|
|
197
|
-
finish: "Finish",
|
|
198
|
-
close: "Close this dialog"
|
|
199
|
-
},
|
|
200
|
-
tree: {
|
|
201
|
-
emptyText: "No Data"
|
|
202
|
-
},
|
|
203
|
-
transfer: {
|
|
204
|
-
noMatch: "No matching data",
|
|
205
|
-
noData: "No data",
|
|
206
|
-
titles: ["List 1", "List 2"],
|
|
207
|
-
filterPlaceholder: "Enter keyword",
|
|
208
|
-
noCheckedFormat: "{total} items",
|
|
209
|
-
hasCheckedFormat: "{checked}/{total} checked"
|
|
210
|
-
},
|
|
211
|
-
image: {
|
|
212
|
-
error: "FAILED"
|
|
213
|
-
},
|
|
214
|
-
pageHeader: {
|
|
215
|
-
title: "Back"
|
|
216
|
-
},
|
|
217
|
-
popconfirm: {
|
|
218
|
-
confirmButtonText: "Yes",
|
|
219
|
-
cancelButtonText: "No"
|
|
220
|
-
},
|
|
221
|
-
carousel: {
|
|
222
|
-
leftArrow: "Carousel arrow left",
|
|
223
|
-
rightArrow: "Carousel arrow right",
|
|
224
|
-
indicator: "Carousel switch to index {index}"
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
|
|
230
|
-
const translate = (path, option, locale) => get(locale, path, path).replace(
|
|
231
|
-
/\{(\w+)\}/g,
|
|
232
|
-
(_, key) => {
|
|
233
|
-
var _a;
|
|
234
|
-
return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
|
|
235
|
-
}
|
|
236
|
-
);
|
|
237
|
-
const buildLocaleContext = (locale) => {
|
|
238
|
-
const lang = computed(() => unref(locale).name);
|
|
239
|
-
const localeRef = isRef(locale) ? locale : ref(locale);
|
|
240
|
-
return {
|
|
241
|
-
lang,
|
|
242
|
-
locale: localeRef,
|
|
243
|
-
t: buildTranslator(locale)
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
const localeContextKey = Symbol("localeContextKey");
|
|
247
|
-
const useLocale = (localeOverrides) => {
|
|
248
|
-
const locale = localeOverrides || inject(localeContextKey, ref());
|
|
249
|
-
return buildLocaleContext(computed(() => locale.value || English));
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
export { get as g, localeContextKey as l, useLocale as u };
|