@wfrog/vc-ui 1.3.0 → 1.4.0
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/{CCmEeM7D.mjs → B3GxuXVE.mjs} +6 -6
- package/dist/es/chunk/BL8WhaLp.mjs +427 -0
- package/dist/es/chunk/{BiHWk71g.mjs → BPqrpkTb.mjs} +4 -4
- package/dist/es/chunk/{C_7t9blX.mjs → BZ1uhZQF.mjs} +1 -1
- package/dist/es/chunk/{-ga82G_B.mjs → BdVq9mV6.mjs} +1 -1
- package/dist/es/chunk/{DGGhWn1A.mjs → BfjuZmry.mjs} +6 -5
- package/dist/es/chunk/{BLLKi_0v.mjs → Bu3XHP55.mjs} +1 -1
- package/dist/es/chunk/{DEiqPcuO.mjs → BvNFaD5d.mjs} +3 -3
- package/dist/es/chunk/BxibBO68.mjs +5741 -0
- package/dist/es/chunk/{DO-mBaf5.mjs → By7FMB3I.mjs} +1 -43
- package/dist/es/chunk/{DATKTbFj.mjs → CGhekNBa.mjs} +5 -5
- package/dist/es/chunk/{plK2vnjp.mjs → CJ0afvkJ.mjs} +1 -1
- package/dist/es/chunk/{CtYp4FB7.mjs → CK5Bluh4.mjs} +2 -2
- package/dist/es/chunk/{Vv8g5_A1.mjs → CKZGL4_3.mjs} +9 -8
- package/dist/es/chunk/CNEMJL35.mjs +69 -0
- package/dist/es/chunk/{C9ldJ8Hh.mjs → CPCieLBG.mjs} +1 -1
- package/dist/es/chunk/{C50_dziC.mjs → CQz3lhyS.mjs} +2 -1
- package/dist/es/chunk/{Cekqdlxf.mjs → CbYM6R_O.mjs} +12 -77
- package/dist/es/chunk/{CQbpo0im.mjs → CboHfRXN.mjs} +5 -6
- package/dist/es/chunk/{BambM7zX.mjs → Cdh3HNZa.mjs} +2 -2
- package/dist/es/chunk/{aX4SRHmD.mjs → Cg-Krnly.mjs} +2 -1
- package/dist/es/chunk/{9qQNa4bM.mjs → Cjp0Czyu.mjs} +1 -1
- package/dist/es/chunk/Cmb_E8Ip.mjs +184 -0
- package/dist/es/chunk/{BIK5Djc_.mjs → Co77DVCw.mjs} +2 -2
- package/dist/es/chunk/CqTa_Vd-.mjs +375 -0
- package/dist/es/{components/dual-pane/dual-pane.mjs → chunk/CsjEhAYY.mjs} +11 -91
- package/dist/es/chunk/{BQyZW57B.mjs → CwXV7M2F.mjs} +3 -3
- package/dist/es/chunk/{b9dx0jdT.mjs → D1MHFKtN.mjs} +3 -3
- package/dist/es/chunk/{DskGUrkJ.mjs → D6m3vWpc.mjs} +2 -1
- package/dist/es/chunk/{4F1xxyju.mjs → D6nWUATi.mjs} +48 -2117
- package/dist/es/chunk/{C6bIuBQg.mjs → D7CQDxqy.mjs} +3 -3
- package/dist/es/chunk/{Dqk3gyUk.mjs → D9Lr0Bzb.mjs} +1 -374
- package/dist/es/chunk/{Xk5kfdyT.mjs → DAIuzoFs.mjs} +2 -1
- package/dist/es/chunk/{OVbHCQoq.mjs → DCS0eqqM.mjs} +3 -101
- package/dist/es/chunk/{BJTCqgn1.mjs → DDR6UjaC.mjs} +1 -1
- package/dist/es/chunk/{BKmk2ptO.mjs → DNsAO9iB.mjs} +2 -2
- package/dist/es/chunk/{-_x5oKYF.mjs → DQK0ezHm.mjs} +5 -4
- package/dist/es/chunk/{BQHHM_Gw.mjs → DQi1QPak.mjs} +30 -70
- package/dist/es/chunk/{BaqDgAvL.mjs → DSt2uDNE.mjs} +22 -434
- package/dist/es/chunk/DSw4GnC6.mjs +44 -0
- package/dist/es/chunk/DTbnchOm.mjs +94 -0
- package/dist/es/chunk/DViraU6I.mjs +45 -0
- package/dist/es/chunk/{C540ZOUa.mjs → DX84QR5M.mjs} +10 -9
- package/dist/es/chunk/DYKOYbzT.mjs +2003 -0
- package/dist/es/chunk/{D1PKXAql.mjs → D_F7nIja.mjs} +3 -4
- package/dist/es/chunk/{DcTh6n4x.mjs → D_Mvdscy.mjs} +5 -4
- package/dist/es/chunk/DhGOsWxx.mjs +6 -0
- package/dist/es/chunk/{DFxeI_lP.mjs → DhGcJR5p.mjs} +6 -6
- package/dist/es/chunk/DxxbB5jY.mjs +34 -0
- package/dist/es/chunk/EMeQxUfH.mjs +49 -0
- package/dist/es/chunk/{eN6VJ63C.mjs → F2ph6lWu.mjs} +9 -8
- package/dist/es/chunk/{Dn-BFXcJ.mjs → dN0VcQc2.mjs} +1 -1
- package/dist/es/chunk/{DTpr71Gd.mjs → e5i7OJY-.mjs} +4 -4
- package/dist/es/chunk/fueZ9sVu.mjs +890 -0
- package/dist/es/chunk/{CV2NA_2e.mjs → ipA7n6-J.mjs} +1 -1
- package/dist/es/chunk/{Dw-yyl2m.mjs → q2jRgbir.mjs} +2 -2
- package/dist/es/chunk/{C72pWnuz.mjs → w7VqVeWU.mjs} +5 -4
- package/dist/es/chunk/{DWcIzeMM.mjs → ytiKcA3H.mjs} +108 -10
- package/dist/es/chunk/{DFHjl3eL.mjs → yuIXvUxc.mjs} +1 -1
- package/dist/es/components/backbottom/backbottom.mjs +2 -2
- package/dist/es/components/button/button.d.ts +2 -1
- package/dist/es/components/button/button.mjs +68 -17
- package/dist/es/components/button/button.vue.d.ts +4 -1
- package/dist/es/components/choice/choice.mjs +3 -2
- package/dist/es/components/color-switcher/color-switcher.d.ts +15 -0
- package/dist/es/components/color-switcher/color-switcher.mjs +1215 -0
- package/dist/es/components/color-switcher/color-switcher.vue.d.ts +122 -0
- package/dist/es/components/color-switcher/index.css +5 -0
- package/dist/es/components/color-switcher/index.d.ts +4 -0
- package/dist/es/components/color-switcher/index.mjs +6 -0
- package/dist/es/components/cropper/cropper.mjs +12 -11
- package/dist/es/components/cropper/cropper.vue.d.ts +2 -2
- package/dist/es/components/currency/currency.mjs +7 -7
- package/dist/es/components/dark-switcher/dark-switcher.d.ts +10 -0
- package/dist/es/components/dark-switcher/dark-switcher.mjs +87 -0
- package/dist/es/components/dark-switcher/dark-switcher.vue.d.ts +12 -0
- package/dist/es/components/dark-switcher/index.css +11 -0
- package/dist/es/components/dark-switcher/index.d.ts +4 -0
- package/dist/es/components/dark-switcher/index.mjs +6 -0
- package/dist/es/components/daterange-picker/daterange-picker.mjs +21 -20
- package/dist/es/components/dialog/dialog.d.ts +1 -1
- package/dist/es/components/dialog/dialog.mjs +46 -61
- package/dist/es/components/dialog/dialog.vue.d.ts +1 -3
- package/dist/es/components/dialog/index.css +31 -32
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +12 -12
- package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -5
- package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +14 -13
- package/dist/es/components/document.vue.d.ts +14 -0
- package/dist/es/components/drag-verify/drag-verify.mjs +14 -14
- package/dist/es/components/drag-verify/index.css +11 -11
- package/dist/es/components/drawer/drawer.mjs +14 -14
- package/dist/es/components/drawer/index.css +16 -15
- package/dist/es/components/easy-pagination/easy-pagination.mjs +4 -4
- package/dist/es/components/el-icon/el-icon.mjs +2 -2
- package/dist/es/components/example-wrapper.vue.d.ts +19 -0
- package/dist/es/components/explorer/docs/data.d.ts +13 -0
- package/dist/es/components/explorer/explorer.d.ts +12 -0
- package/dist/es/components/explorer/explorer.mjs +64 -0
- package/dist/es/components/explorer/explorer.vue.d.ts +183 -0
- package/dist/es/components/explorer/explorer2.mjs +6 -0
- package/dist/es/components/explorer/index.css +14 -0
- package/dist/es/components/explorer/index.d.ts +4 -0
- package/dist/es/components/explorer/index.mjs +6 -0
- package/dist/es/components/explorer-column-table/explorer-column-table.d.ts +23 -0
- package/dist/es/components/explorer-column-table/explorer-column-table.mjs +2948 -0
- package/dist/es/components/explorer-column-table/explorer-column-table.vue.d.ts +1486 -0
- package/dist/es/components/explorer-column-table/index.css +49 -0
- package/dist/es/components/explorer-column-table/index.d.ts +4 -0
- package/dist/es/components/explorer-column-table/index.mjs +6 -0
- package/dist/es/components/explorer-filter/explorer-filter.d.ts +12 -0
- package/dist/es/components/explorer-filter/explorer-filter.mjs +81 -0
- package/dist/es/components/explorer-filter/explorer-filter.vue.d.ts +14 -0
- package/dist/es/components/explorer-filter/index.css +7 -0
- package/dist/es/components/explorer-filter/index.d.ts +4 -0
- package/dist/es/components/explorer-filter/index.mjs +6 -0
- package/dist/es/components/explorer-footer/explorer-footer.d.ts +5 -0
- package/dist/es/components/explorer-footer/explorer-footer.mjs +92 -0
- package/dist/es/components/explorer-footer/explorer-footer.vue.d.ts +21 -0
- package/dist/es/components/explorer-footer/index.css +7 -0
- package/dist/es/components/explorer-footer/index.d.ts +4 -0
- package/dist/es/components/explorer-footer/index.mjs +6 -0
- package/dist/es/components/explorer-list/explorer-list.d.ts +23 -0
- package/dist/es/components/explorer-list/explorer-list.mjs +157 -0
- package/dist/es/components/explorer-list/explorer-list.vue.d.ts +38 -0
- package/dist/es/components/explorer-list/index.css +47 -0
- package/dist/es/components/explorer-list/index.d.ts +4 -0
- package/dist/es/components/explorer-list/index.mjs +6 -0
- package/dist/es/components/explorer-panel/explorer-panel.d.ts +14 -0
- package/dist/es/components/explorer-panel/explorer-panel.mjs +77 -0
- package/dist/es/components/explorer-panel/explorer-panel.vue.d.ts +253 -0
- package/dist/es/components/explorer-panel/explorer-panel2.mjs +6 -0
- package/dist/es/components/explorer-panel/index.css +12 -0
- package/dist/es/components/explorer-panel/index.d.ts +4 -0
- package/dist/es/components/explorer-panel/index.mjs +6 -0
- package/dist/es/components/explorer-query/explorer-query.d.ts +11 -0
- package/dist/es/components/explorer-query/explorer-query.mjs +2376 -0
- package/dist/es/components/explorer-query/explorer-query.vue.d.ts +396 -0
- package/dist/es/components/explorer-query/index.css +36 -0
- package/dist/es/components/explorer-query/index.d.ts +4 -0
- package/dist/es/components/explorer-query/index.mjs +6 -0
- package/dist/es/components/explorer-table/explorer-table.d.ts +11 -0
- package/dist/es/components/explorer-table/explorer-table.mjs +116 -0
- package/dist/es/components/explorer-table/explorer-table.vue.d.ts +25 -0
- package/dist/es/components/explorer-table/index.css +18 -0
- package/dist/es/components/explorer-table/index.d.ts +4 -0
- package/dist/es/components/explorer-table/index.mjs +6 -0
- package/dist/es/components/explorer-tools/components/column-setter.vue.d.ts +3028 -0
- package/dist/es/components/explorer-tools/explorer-tools.d.ts +35 -0
- package/dist/es/components/explorer-tools/explorer-tools.mjs +585 -0
- package/dist/es/components/explorer-tools/explorer-tools.vue.d.ts +43 -0
- package/dist/es/components/explorer-tools/index.css +60 -0
- package/dist/es/components/explorer-tools/index.d.ts +4 -0
- package/dist/es/components/explorer-tools/index.mjs +6 -0
- package/dist/es/components/explorer-tree/explorer-tree.d.ts +22 -0
- package/dist/es/components/explorer-tree/explorer-tree.mjs +174 -0
- package/dist/es/components/explorer-tree/explorer-tree.vue.d.ts +2055 -0
- package/dist/es/components/explorer-tree/index.css +55 -0
- package/dist/es/components/explorer-tree/index.d.ts +4 -0
- package/dist/es/components/explorer-tree/index.mjs +6 -0
- package/dist/es/components/icon/icon2.mjs +2 -2
- package/dist/es/components/icon-picker/components/collections.vue.d.ts +242 -196
- package/dist/es/components/icon-picker/icon-picker.mjs +38 -921
- package/dist/es/components/icon-picker/index.css +31 -29
- package/dist/es/components/iconify-icon/iconify-icon.mjs +2 -2
- package/dist/es/components/image/image.mjs +5 -5
- package/dist/es/components/image/image.vue.d.ts +7 -7
- package/dist/es/components/input/index.css +4 -5
- package/dist/es/components/input/input.mjs +7 -7
- package/dist/es/components/input/input.vue.d.ts +3 -3
- package/dist/es/components/input-number/input-number.mjs +5 -5
- package/dist/es/components/pca-picker/components/c.vue.d.ts +3 -3
- package/dist/es/components/pca-picker/index.css +4 -4
- package/dist/es/components/pca-picker/pca-picker.mjs +21 -209
- package/dist/es/components/pca-picker/pca-picker.vue.d.ts +10 -10
- package/dist/es/components/screenfull/screenfull.mjs +4 -4
- package/dist/es/components/scrollbar/index.css +6 -5
- package/dist/es/components/scrollbar/scrollbar.d.ts +2 -0
- package/dist/es/components/scrollbar/scrollbar.mjs +17 -12
- package/dist/es/components/scrollbar/scrollbar.vue.d.ts +156 -134
- package/dist/es/components/select/select.mjs +7 -7
- package/dist/es/components/single-player/index.css +11 -11
- package/dist/es/components/single-player/single-player.mjs +20 -19
- package/dist/es/components/splitter/index.d.ts +4 -0
- package/dist/es/components/splitter/index.mjs +6 -0
- package/dist/es/components/splitter/splitter.d.ts +4 -0
- package/dist/es/components/splitter/splitter.mjs +28 -0
- package/dist/es/components/{dual-pane/dual-pane.vue.d.ts → splitter/splitter.vue.d.ts} +3 -5
- package/dist/es/components/splitter-panel/index.css +5 -0
- package/dist/es/components/splitter-panel/index.d.ts +4 -0
- package/dist/es/components/splitter-panel/index.mjs +6 -0
- package/dist/es/components/splitter-panel/splitter-panel.d.ts +3 -0
- package/dist/es/components/splitter-panel/splitter-panel.mjs +49 -0
- package/dist/es/components/splitter-panel/splitter-panel.vue.d.ts +20 -0
- package/dist/es/components/svg-icon/svg-icon.mjs +2 -2
- package/dist/es/components/switch/switch.mjs +2 -2
- package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
- package/dist/es/components/tags/tags.mjs +12 -11
- package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
- package/dist/es/components/text-ellipsis/text-ellipsis.vue.d.ts +1 -1
- package/dist/es/components/thousand-input/thousand-input.mjs +3 -3
- package/dist/es/components/thousand-input/thousand-input.vue.d.ts +8 -8
- package/dist/es/components/tinymce/index.css +1 -1
- package/dist/es/components/tinymce/tinymce.d.ts +1 -0
- package/dist/es/components/tinymce/tinymce.mjs +20 -11
- package/dist/es/components/tinymce/tinymce.vue.d.ts +1 -0
- package/dist/es/components/tree-picker/popover-cascader.css +1 -1
- package/dist/es/components/tree-picker/tree-picker.mjs +11 -10
- package/dist/es/components/tree-picker/tree-picker.vue.d.ts +10 -10
- package/dist/es/components/upload-file/upload-file.mjs +2 -2
- package/dist/es/index.d.ts +14 -1
- package/dist/es/index.mjs +69 -39
- package/dist/es/use/usePersistentModel/index.d.ts +4 -0
- package/dist/es/use/usePersistentModel/index.mjs +19 -0
- package/dist/global.d.ts +14 -1
- package/dist/index.css +450 -123
- package/package.json +4 -1
- package/dist/es/chunk/DVNTpOBR.mjs +0 -4
- package/dist/es/components/dual-pane/dual-pane.d.ts +0 -8
- package/dist/es/components/dual-pane/index.css +0 -8
- package/dist/es/components/dual-pane/index.d.ts +0 -4
- package/dist/es/components/dual-pane/index.mjs +0 -6
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { ref, watch, inject, computed, getCurrentInstance, toRaw, defineComponent, withDirectives, createElementBlock, openBlock, withModifiers, normalizeClass, renderSlot, createElementVNode, toDisplayString, vShow, unref, toRefs, reactive, onBeforeUnmount, nextTick, normalizeStyle, createCommentVNode, onMounted, useSlots, watchEffect, provide, isVNode, shallowRef, resolveComponent, resolveDirective, mergeProps, toHandlerKey, createVNode, withCtx, createBlock, Fragment, renderList, createTextVNode, vModelText, resolveDynamicComponent } from 'vue';
|
|
2
|
-
import { u as useTooltipContentProps, E as Ee, a as ElTooltip } from './
|
|
3
|
-
import { s as scrollbarEmits, E as ElScrollbar } from './
|
|
4
|
-
import { t as tagProps, E as ElTag } from './
|
|
5
|
-
import { E as ElIcon } from './
|
|
6
|
-
import { i as isEqual } from './
|
|
7
|
-
import { g as get, u as useLocale } from './
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { _ as _export_sfc, w as withInstall, a as withNoopInstall } from './
|
|
11
|
-
import { u as useId } from './
|
|
2
|
+
import { u as useTooltipContentProps, E as Ee, a as ElTooltip } from './BfjuZmry.mjs';
|
|
3
|
+
import { s as scrollbarEmits, E as ElScrollbar } from './D_Mvdscy.mjs';
|
|
4
|
+
import { t as tagProps, E as ElTag } from './DhGcJR5p.mjs';
|
|
5
|
+
import { E as ElIcon } from './D1MHFKtN.mjs';
|
|
6
|
+
import { i as isEqual } from './q2jRgbir.mjs';
|
|
7
|
+
import { g as get, u as useLocale } from './CJ0afvkJ.mjs';
|
|
8
|
+
import { b as buildProps, t as throwError, j as isObject, u as useNamespace, a as debugWarn, c as isArray, f as isFunction, g as isPlainObject, i as isString, d as definePropType } from './By7FMB3I.mjs';
|
|
9
|
+
import { c as castArray } from './DSw4GnC6.mjs';
|
|
10
|
+
import { _ as _export_sfc, w as withInstall, a as withNoopInstall } from './dN0VcQc2.mjs';
|
|
11
|
+
import { u as useId } from './Co77DVCw.mjs';
|
|
12
12
|
import { useResizeObserver, isIOS, isClient, useDebounceFn, useMutationObserver } from '@vueuse/core';
|
|
13
|
-
import { s as scrollIntoView } from './
|
|
14
|
-
import { u as useFormItem,
|
|
15
|
-
import { a as useEmptyValues, u as useEmptyValuesProps } from './
|
|
16
|
-
import { a as useComposition, u as useFocusController } from './
|
|
13
|
+
import { s as scrollIntoView } from './CboHfRXN.mjs';
|
|
14
|
+
import { u as useFormItem, b as useFormItemInputId, a as useFormDisabled, c as useFormSize } from './BvNFaD5d.mjs';
|
|
15
|
+
import { a as useEmptyValues, u as useEmptyValuesProps } from './CK5Bluh4.mjs';
|
|
16
|
+
import { a as useComposition, u as useFocusController } from './DAIuzoFs.mjs';
|
|
17
17
|
import { V as ValidateComponentsMap, i as iconPropType } from '../components/icon/icon2.mjs';
|
|
18
|
+
import { a as isEmpty, c as isUndefined, b as isNumber, i as isNil } from './DViraU6I.mjs';
|
|
18
19
|
import { g as getEventCode, E as EVENT_CODE } from './BTpNRPQW.mjs';
|
|
19
20
|
import { U as UPDATE_MODEL_EVENT, C as CHANGE_EVENT } from './Ct6q2FXg.mjs';
|
|
20
|
-
import { b as baseIteratee } from './
|
|
21
|
-
import { c as clamp } from './
|
|
21
|
+
import { b as baseIteratee } from './BPqrpkTb.mjs';
|
|
22
|
+
import { c as clamp } from './Bu3XHP55.mjs';
|
|
22
23
|
import { ArrowDown, CircleClose } from '@element-plus/icons-vue';
|
|
23
|
-
import { u as useSizeProp } from './
|
|
24
|
-
import { u as useAriaProps } from './
|
|
25
|
-
import { C as ClickOutside } from './
|
|
26
|
-
import { f as flattedChildren } from './
|
|
24
|
+
import { u as useSizeProp } from './CPCieLBG.mjs';
|
|
25
|
+
import { u as useAriaProps } from './DCS0eqqM.mjs';
|
|
26
|
+
import { C as ClickOutside } from './Cg-Krnly.mjs';
|
|
27
|
+
import { f as flattedChildren } from './BZ1uhZQF.mjs';
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
@@ -48,47 +49,6 @@ function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
|
48
49
|
return -1;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
/**
|
|
52
|
-
* Casts `value` as an array if it's not one.
|
|
53
|
-
*
|
|
54
|
-
* @static
|
|
55
|
-
* @memberOf _
|
|
56
|
-
* @since 4.4.0
|
|
57
|
-
* @category Lang
|
|
58
|
-
* @param {*} value The value to inspect.
|
|
59
|
-
* @returns {Array} Returns the cast array.
|
|
60
|
-
* @example
|
|
61
|
-
*
|
|
62
|
-
* _.castArray(1);
|
|
63
|
-
* // => [1]
|
|
64
|
-
*
|
|
65
|
-
* _.castArray({ 'a': 1 });
|
|
66
|
-
* // => [{ 'a': 1 }]
|
|
67
|
-
*
|
|
68
|
-
* _.castArray('abc');
|
|
69
|
-
* // => ['abc']
|
|
70
|
-
*
|
|
71
|
-
* _.castArray(null);
|
|
72
|
-
* // => [null]
|
|
73
|
-
*
|
|
74
|
-
* _.castArray(undefined);
|
|
75
|
-
* // => [undefined]
|
|
76
|
-
*
|
|
77
|
-
* _.castArray();
|
|
78
|
-
* // => []
|
|
79
|
-
*
|
|
80
|
-
* var array = [1, 2, 3];
|
|
81
|
-
* console.log(_.castArray(array) === array);
|
|
82
|
-
* // => true
|
|
83
|
-
*/
|
|
84
|
-
function castArray() {
|
|
85
|
-
if (!arguments.length) {
|
|
86
|
-
return [];
|
|
87
|
-
}
|
|
88
|
-
var value = arguments[0];
|
|
89
|
-
return isArray(value) ? value : [value];
|
|
90
|
-
}
|
|
91
|
-
|
|
92
52
|
/**
|
|
93
53
|
* This method is like `_.findIndex` except that it iterates over elements
|
|
94
54
|
* of `collection` from right to left.
|
|
@@ -506,7 +466,7 @@ const useSelect = (props, emit) => {
|
|
|
506
466
|
}
|
|
507
467
|
});
|
|
508
468
|
const hasModelValue = computed(() => {
|
|
509
|
-
return isArray
|
|
469
|
+
return isArray(props.modelValue) ? props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
|
|
510
470
|
});
|
|
511
471
|
const needStatusIcon = computed(() => {
|
|
512
472
|
var _a;
|
|
@@ -593,7 +553,7 @@ const useSelect = (props, emit) => {
|
|
|
593
553
|
if (props.multiple && !isUndefined(props.modelValue)) {
|
|
594
554
|
return castArray(props.modelValue).length === 0 && !states.inputValue;
|
|
595
555
|
}
|
|
596
|
-
const value = isArray
|
|
556
|
+
const value = isArray(props.modelValue) ? props.modelValue[0] : props.modelValue;
|
|
597
557
|
return props.filterable || isUndefined(value) ? !states.inputValue : true;
|
|
598
558
|
});
|
|
599
559
|
const currentPlaceholder = computed(() => {
|
|
@@ -692,7 +652,7 @@ const useSelect = (props, emit) => {
|
|
|
692
652
|
};
|
|
693
653
|
const setSelected = () => {
|
|
694
654
|
if (!props.multiple) {
|
|
695
|
-
const value = isArray
|
|
655
|
+
const value = isArray(props.modelValue) ? props.modelValue[0] : props.modelValue;
|
|
696
656
|
const option = getOption(value);
|
|
697
657
|
states.selectedLabel = option.currentLabel;
|
|
698
658
|
states.selected = [option];
|
|
@@ -878,7 +838,7 @@ const useSelect = (props, emit) => {
|
|
|
878
838
|
};
|
|
879
839
|
const scrollToOption = (option) => {
|
|
880
840
|
var _a, _b, _c, _d, _e;
|
|
881
|
-
const targetOption = isArray
|
|
841
|
+
const targetOption = isArray(option) ? option[option.length - 1] : option;
|
|
882
842
|
let target = null;
|
|
883
843
|
if (!isNil(targetOption == null ? void 0 : targetOption.value)) {
|
|
884
844
|
const options = optionsArray.value.filter(
|
|
@@ -1218,18 +1178,18 @@ var ElOptions = defineComponent({
|
|
|
1218
1178
|
const children = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
1219
1179
|
const valueList = [];
|
|
1220
1180
|
function filterOptions(children2) {
|
|
1221
|
-
if (!isArray
|
|
1181
|
+
if (!isArray(children2))
|
|
1222
1182
|
return;
|
|
1223
1183
|
children2.forEach((item) => {
|
|
1224
1184
|
var _a2, _b2, _c, _d;
|
|
1225
1185
|
const name = (_a2 = (item == null ? void 0 : item.type) || {}) == null ? void 0 : _a2.name;
|
|
1226
1186
|
if (name === "ElOptionGroup") {
|
|
1227
1187
|
filterOptions(
|
|
1228
|
-
!isString(item.children) && !isArray
|
|
1188
|
+
!isString(item.children) && !isArray(item.children) && isFunction((_b2 = item.children) == null ? void 0 : _b2.default) ? (_c = item.children) == null ? void 0 : _c.default() : item.children
|
|
1229
1189
|
);
|
|
1230
1190
|
} else if (name === "ElOption") {
|
|
1231
1191
|
valueList.push((_d = item.props) == null ? void 0 : _d.value);
|
|
1232
|
-
} else if (isArray
|
|
1192
|
+
} else if (isArray(item.children)) {
|
|
1233
1193
|
filterOptions(item.children);
|
|
1234
1194
|
}
|
|
1235
1195
|
});
|
|
@@ -1417,7 +1377,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
1417
1377
|
return;
|
|
1418
1378
|
if (isOption(child)) {
|
|
1419
1379
|
children2.push(child.component.proxy);
|
|
1420
|
-
} else if (isArray
|
|
1380
|
+
} else if (isArray(child.children) && child.children.length) {
|
|
1421
1381
|
children2.push(...flattedChildren(child.children));
|
|
1422
1382
|
} else if ((_a = child.component) == null ? void 0 : _a.subTree) {
|
|
1423
1383
|
children2.push(...flattedChildren(child.component.subTree));
|
|
@@ -1560,7 +1520,7 @@ const _sfc_main = defineComponent({
|
|
|
1560
1520
|
const modelValue = computed(() => {
|
|
1561
1521
|
const { modelValue: rawModelValue, multiple } = props;
|
|
1562
1522
|
const fallback = multiple ? [] : void 0;
|
|
1563
|
-
if (isArray
|
|
1523
|
+
if (isArray(rawModelValue)) {
|
|
1564
1524
|
return multiple ? rawModelValue : fallback;
|
|
1565
1525
|
}
|
|
1566
1526
|
return multiple ? fallback : rawModelValue;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { inject, computed, getCurrentInstance, watch, nextTick, ref, toRaw, defineComponent, useSlots, createBlock, openBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, createElementVNode, createElementBlock, createCommentVNode, withDirectives, mergeProps, isRef, withModifiers, vModelCheckbox, renderSlot, Fragment, createTextVNode, toDisplayString, normalizeStyle, provide, toRefs, renderList
|
|
2
|
-
import { u as useSizeProp } from './
|
|
3
|
-
import { u as useAriaProps, p as pick } from './
|
|
1
|
+
import { inject, computed, getCurrentInstance, watch, nextTick, ref, toRaw, defineComponent, useSlots, createBlock, openBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, createElementVNode, createElementBlock, createCommentVNode, withDirectives, mergeProps, isRef, withModifiers, vModelCheckbox, renderSlot, Fragment, createTextVNode, toDisplayString, normalizeStyle, provide, toRefs, renderList } from 'vue';
|
|
2
|
+
import { u as useSizeProp } from './CPCieLBG.mjs';
|
|
3
|
+
import { u as useAriaProps, p as pick } from './DCS0eqqM.mjs';
|
|
4
4
|
import { U as UPDATE_MODEL_EVENT, C as CHANGE_EVENT } from './Ct6q2FXg.mjs';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { i as isString, a as debugWarn, c as isArray, j as isObject, u as useNamespace, b as buildProps, d as definePropType } from './By7FMB3I.mjs';
|
|
6
|
+
import { b as isNumber, d as isBoolean, c as isUndefined, e as isPropAbsent } from './DViraU6I.mjs';
|
|
7
|
+
import { _ as _export_sfc, a as withNoopInstall, w as withInstall } from './dN0VcQc2.mjs';
|
|
8
|
+
import { f as formContextKey } from './Co77DVCw.mjs';
|
|
9
|
+
import { a as useFormDisabled, u as useFormItem, c as useFormSize, b as useFormItemInputId } from './BvNFaD5d.mjs';
|
|
10
|
+
import { i as isEqual } from './q2jRgbir.mjs';
|
|
11
|
+
import { u as useDeprecated } from './yuIXvUxc.mjs';
|
|
12
|
+
import { o as omit } from './e5i7OJY-.mjs';
|
|
12
13
|
|
|
13
14
|
const checkboxProps = {
|
|
14
15
|
modelValue: {
|
|
@@ -317,8 +318,8 @@ const useCheckbox = (props, slots) => {
|
|
|
317
318
|
};
|
|
318
319
|
};
|
|
319
320
|
|
|
320
|
-
const _hoisted_1$
|
|
321
|
-
const _sfc_main$
|
|
321
|
+
const _hoisted_1$1 = ["id", "indeterminate", "name", "tabindex", "disabled"];
|
|
322
|
+
const _sfc_main$2 = defineComponent({
|
|
322
323
|
...{
|
|
323
324
|
name: "ElCheckbox"
|
|
324
325
|
},
|
|
@@ -403,7 +404,7 @@ const _sfc_main$5 = defineComponent({
|
|
|
403
404
|
onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
|
|
404
405
|
onClick: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
405
406
|
}, ["stop"]))
|
|
406
|
-
}), null, 16, _hoisted_1$
|
|
407
|
+
}), null, 16, _hoisted_1$1), [
|
|
407
408
|
[vModelCheckbox, unref(model)]
|
|
408
409
|
]),
|
|
409
410
|
createElementVNode(
|
|
@@ -445,10 +446,10 @@ const _sfc_main$5 = defineComponent({
|
|
|
445
446
|
};
|
|
446
447
|
}
|
|
447
448
|
});
|
|
448
|
-
var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
449
|
+
var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);
|
|
449
450
|
|
|
450
|
-
const _hoisted_1
|
|
451
|
-
const _sfc_main$
|
|
451
|
+
const _hoisted_1 = ["name", "tabindex", "disabled"];
|
|
452
|
+
const _sfc_main$1 = defineComponent({
|
|
452
453
|
...{
|
|
453
454
|
name: "ElCheckboxButton"
|
|
454
455
|
},
|
|
@@ -520,7 +521,7 @@ const _sfc_main$4 = defineComponent({
|
|
|
520
521
|
onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
|
|
521
522
|
onClick: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
522
523
|
}, ["stop"]))
|
|
523
|
-
}), null, 16, _hoisted_1
|
|
524
|
+
}), null, 16, _hoisted_1), [
|
|
524
525
|
[vModelCheckbox, unref(model)]
|
|
525
526
|
]),
|
|
526
527
|
_ctx.$slots.default || _ctx.label ? (openBlock(), createElementBlock(
|
|
@@ -546,7 +547,7 @@ const _sfc_main$4 = defineComponent({
|
|
|
546
547
|
};
|
|
547
548
|
}
|
|
548
549
|
});
|
|
549
|
-
var CheckboxButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
550
|
+
var CheckboxButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);
|
|
550
551
|
|
|
551
552
|
const checkboxGroupProps = buildProps({
|
|
552
553
|
modelValue: {
|
|
@@ -594,7 +595,7 @@ const checkboxDefaultProps = {
|
|
|
594
595
|
disabled: "disabled"
|
|
595
596
|
};
|
|
596
597
|
|
|
597
|
-
const _sfc_main
|
|
598
|
+
const _sfc_main = defineComponent({
|
|
598
599
|
...{
|
|
599
600
|
name: "ElCheckboxGroup"
|
|
600
601
|
},
|
|
@@ -691,7 +692,7 @@ const _sfc_main$3 = defineComponent({
|
|
|
691
692
|
};
|
|
692
693
|
}
|
|
693
694
|
});
|
|
694
|
-
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
695
|
+
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);
|
|
695
696
|
|
|
696
697
|
const ElCheckbox = withInstall(Checkbox, {
|
|
697
698
|
CheckboxButton,
|
|
@@ -700,417 +701,4 @@ const ElCheckbox = withInstall(Checkbox, {
|
|
|
700
701
|
withNoopInstall(CheckboxButton);
|
|
701
702
|
const ElCheckboxGroup = withNoopInstall(CheckboxGroup);
|
|
702
703
|
|
|
703
|
-
|
|
704
|
-
modelValue: {
|
|
705
|
-
type: [String, Number, Boolean],
|
|
706
|
-
default: void 0
|
|
707
|
-
},
|
|
708
|
-
size: useSizeProp,
|
|
709
|
-
disabled: {
|
|
710
|
-
type: Boolean,
|
|
711
|
-
default: void 0
|
|
712
|
-
},
|
|
713
|
-
label: {
|
|
714
|
-
type: [String, Number, Boolean],
|
|
715
|
-
default: void 0
|
|
716
|
-
},
|
|
717
|
-
value: {
|
|
718
|
-
type: [String, Number, Boolean],
|
|
719
|
-
default: void 0
|
|
720
|
-
},
|
|
721
|
-
name: {
|
|
722
|
-
type: String,
|
|
723
|
-
default: void 0
|
|
724
|
-
}
|
|
725
|
-
});
|
|
726
|
-
const radioProps = buildProps({
|
|
727
|
-
...radioPropsBase,
|
|
728
|
-
border: Boolean
|
|
729
|
-
});
|
|
730
|
-
const radioEmits = {
|
|
731
|
-
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
|
|
732
|
-
[CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
|
|
733
|
-
};
|
|
734
|
-
|
|
735
|
-
const radioGroupKey = Symbol("radioGroupKey");
|
|
736
|
-
|
|
737
|
-
const useRadio = (props, emit) => {
|
|
738
|
-
const radioRef = ref();
|
|
739
|
-
const radioGroup = inject(radioGroupKey, void 0);
|
|
740
|
-
const isGroup = computed(() => !!radioGroup);
|
|
741
|
-
const actualValue = computed(() => {
|
|
742
|
-
if (!isPropAbsent(props.value)) {
|
|
743
|
-
return props.value;
|
|
744
|
-
}
|
|
745
|
-
return props.label;
|
|
746
|
-
});
|
|
747
|
-
const modelValue = computed({
|
|
748
|
-
get() {
|
|
749
|
-
return isGroup.value ? radioGroup.modelValue : props.modelValue;
|
|
750
|
-
},
|
|
751
|
-
set(val) {
|
|
752
|
-
if (isGroup.value) {
|
|
753
|
-
radioGroup.changeEvent(val);
|
|
754
|
-
} else {
|
|
755
|
-
emit && emit(UPDATE_MODEL_EVENT, val);
|
|
756
|
-
}
|
|
757
|
-
radioRef.value.checked = props.modelValue === actualValue.value;
|
|
758
|
-
}
|
|
759
|
-
});
|
|
760
|
-
const size = useFormSize(computed(() => radioGroup == null ? void 0 : radioGroup.size));
|
|
761
|
-
const disabled = useFormDisabled(computed(() => radioGroup == null ? void 0 : radioGroup.disabled));
|
|
762
|
-
const focus = ref(false);
|
|
763
|
-
const tabIndex = computed(() => {
|
|
764
|
-
return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0;
|
|
765
|
-
});
|
|
766
|
-
useDeprecated(
|
|
767
|
-
{
|
|
768
|
-
from: "label act as value",
|
|
769
|
-
replacement: "value",
|
|
770
|
-
version: "3.0.0",
|
|
771
|
-
scope: "el-radio",
|
|
772
|
-
ref: "https://element-plus.org/en-US/component/radio.html"
|
|
773
|
-
},
|
|
774
|
-
computed(() => isGroup.value && isPropAbsent(props.value))
|
|
775
|
-
);
|
|
776
|
-
return {
|
|
777
|
-
radioRef,
|
|
778
|
-
isGroup,
|
|
779
|
-
radioGroup,
|
|
780
|
-
focus,
|
|
781
|
-
size,
|
|
782
|
-
disabled,
|
|
783
|
-
tabIndex,
|
|
784
|
-
modelValue,
|
|
785
|
-
actualValue
|
|
786
|
-
};
|
|
787
|
-
};
|
|
788
|
-
|
|
789
|
-
const _hoisted_1$2 = ["value", "name", "disabled", "checked"];
|
|
790
|
-
const _sfc_main$2 = defineComponent({
|
|
791
|
-
...{
|
|
792
|
-
name: "ElRadio"
|
|
793
|
-
},
|
|
794
|
-
__name: "radio",
|
|
795
|
-
props: radioProps,
|
|
796
|
-
emits: radioEmits,
|
|
797
|
-
setup(__props, { emit: __emit }) {
|
|
798
|
-
const props = __props;
|
|
799
|
-
const emit = __emit;
|
|
800
|
-
const ns = useNamespace("radio");
|
|
801
|
-
const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
|
|
802
|
-
function handleChange() {
|
|
803
|
-
nextTick(() => emit(CHANGE_EVENT, modelValue.value));
|
|
804
|
-
}
|
|
805
|
-
return (_ctx, _cache) => {
|
|
806
|
-
var _a;
|
|
807
|
-
return openBlock(), createElementBlock(
|
|
808
|
-
"label",
|
|
809
|
-
{
|
|
810
|
-
class: normalizeClass([
|
|
811
|
-
unref(ns).b(),
|
|
812
|
-
unref(ns).is("disabled", unref(disabled)),
|
|
813
|
-
unref(ns).is("focus", unref(focus)),
|
|
814
|
-
unref(ns).is("bordered", _ctx.border),
|
|
815
|
-
unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
|
|
816
|
-
unref(ns).m(unref(size))
|
|
817
|
-
])
|
|
818
|
-
},
|
|
819
|
-
[
|
|
820
|
-
createElementVNode(
|
|
821
|
-
"span",
|
|
822
|
-
{
|
|
823
|
-
class: normalizeClass([
|
|
824
|
-
unref(ns).e("input"),
|
|
825
|
-
unref(ns).is("disabled", unref(disabled)),
|
|
826
|
-
unref(ns).is("checked", unref(modelValue) === unref(actualValue))
|
|
827
|
-
])
|
|
828
|
-
},
|
|
829
|
-
[
|
|
830
|
-
withDirectives(createElementVNode("input", {
|
|
831
|
-
ref_key: "radioRef",
|
|
832
|
-
ref: radioRef,
|
|
833
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
834
|
-
class: normalizeClass(unref(ns).e("original")),
|
|
835
|
-
value: unref(actualValue),
|
|
836
|
-
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
|
837
|
-
disabled: unref(disabled),
|
|
838
|
-
checked: unref(modelValue) === unref(actualValue),
|
|
839
|
-
type: "radio",
|
|
840
|
-
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
841
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
842
|
-
onChange: handleChange,
|
|
843
|
-
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
844
|
-
}, ["stop"]))
|
|
845
|
-
}, null, 42, _hoisted_1$2), [
|
|
846
|
-
[vModelRadio, unref(modelValue)]
|
|
847
|
-
]),
|
|
848
|
-
createElementVNode(
|
|
849
|
-
"span",
|
|
850
|
-
{
|
|
851
|
-
class: normalizeClass(unref(ns).e("inner"))
|
|
852
|
-
},
|
|
853
|
-
null,
|
|
854
|
-
2
|
|
855
|
-
)
|
|
856
|
-
],
|
|
857
|
-
2
|
|
858
|
-
),
|
|
859
|
-
createElementVNode(
|
|
860
|
-
"span",
|
|
861
|
-
{
|
|
862
|
-
class: normalizeClass(unref(ns).e("label")),
|
|
863
|
-
onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
864
|
-
}, ["stop"]))
|
|
865
|
-
},
|
|
866
|
-
[
|
|
867
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
868
|
-
createTextVNode(
|
|
869
|
-
toDisplayString(_ctx.label),
|
|
870
|
-
1
|
|
871
|
-
)
|
|
872
|
-
])
|
|
873
|
-
],
|
|
874
|
-
34
|
|
875
|
-
)
|
|
876
|
-
],
|
|
877
|
-
2
|
|
878
|
-
);
|
|
879
|
-
};
|
|
880
|
-
}
|
|
881
|
-
});
|
|
882
|
-
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);
|
|
883
|
-
|
|
884
|
-
const radioButtonProps = buildProps({
|
|
885
|
-
...radioPropsBase
|
|
886
|
-
});
|
|
887
|
-
|
|
888
|
-
const _hoisted_1$1 = ["value", "name", "disabled"];
|
|
889
|
-
const _sfc_main$1 = defineComponent({
|
|
890
|
-
...{
|
|
891
|
-
name: "ElRadioButton"
|
|
892
|
-
},
|
|
893
|
-
__name: "radio-button",
|
|
894
|
-
props: radioButtonProps,
|
|
895
|
-
setup(__props) {
|
|
896
|
-
const props = __props;
|
|
897
|
-
const ns = useNamespace("radio");
|
|
898
|
-
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
|
|
899
|
-
const activeStyle = computed(() => {
|
|
900
|
-
return {
|
|
901
|
-
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
902
|
-
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
903
|
-
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
904
|
-
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
905
|
-
};
|
|
906
|
-
});
|
|
907
|
-
return (_ctx, _cache) => {
|
|
908
|
-
var _a;
|
|
909
|
-
return openBlock(), createElementBlock(
|
|
910
|
-
"label",
|
|
911
|
-
{
|
|
912
|
-
class: normalizeClass([
|
|
913
|
-
unref(ns).b("button"),
|
|
914
|
-
unref(ns).is("active", unref(modelValue) === unref(actualValue)),
|
|
915
|
-
unref(ns).is("disabled", unref(disabled)),
|
|
916
|
-
unref(ns).is("focus", unref(focus)),
|
|
917
|
-
unref(ns).bm("button", unref(size))
|
|
918
|
-
])
|
|
919
|
-
},
|
|
920
|
-
[
|
|
921
|
-
withDirectives(createElementVNode("input", {
|
|
922
|
-
ref_key: "radioRef",
|
|
923
|
-
ref: radioRef,
|
|
924
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
925
|
-
class: normalizeClass(unref(ns).be("button", "original-radio")),
|
|
926
|
-
value: unref(actualValue),
|
|
927
|
-
type: "radio",
|
|
928
|
-
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
|
929
|
-
disabled: unref(disabled),
|
|
930
|
-
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
931
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
932
|
-
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
933
|
-
}, ["stop"]))
|
|
934
|
-
}, null, 42, _hoisted_1$1), [
|
|
935
|
-
[vModelRadio, unref(modelValue)]
|
|
936
|
-
]),
|
|
937
|
-
createElementVNode(
|
|
938
|
-
"span",
|
|
939
|
-
{
|
|
940
|
-
class: normalizeClass(unref(ns).be("button", "inner")),
|
|
941
|
-
style: normalizeStyle(unref(modelValue) === unref(actualValue) ? activeStyle.value : {}),
|
|
942
|
-
onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
943
|
-
}, ["stop"]))
|
|
944
|
-
},
|
|
945
|
-
[
|
|
946
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
947
|
-
createTextVNode(
|
|
948
|
-
toDisplayString(_ctx.label),
|
|
949
|
-
1
|
|
950
|
-
)
|
|
951
|
-
])
|
|
952
|
-
],
|
|
953
|
-
38
|
|
954
|
-
)
|
|
955
|
-
],
|
|
956
|
-
2
|
|
957
|
-
);
|
|
958
|
-
};
|
|
959
|
-
}
|
|
960
|
-
});
|
|
961
|
-
var RadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);
|
|
962
|
-
|
|
963
|
-
const radioGroupProps = buildProps({
|
|
964
|
-
id: {
|
|
965
|
-
type: String,
|
|
966
|
-
default: void 0
|
|
967
|
-
},
|
|
968
|
-
size: useSizeProp,
|
|
969
|
-
disabled: {
|
|
970
|
-
type: Boolean,
|
|
971
|
-
default: void 0
|
|
972
|
-
},
|
|
973
|
-
modelValue: {
|
|
974
|
-
type: [String, Number, Boolean],
|
|
975
|
-
default: void 0
|
|
976
|
-
},
|
|
977
|
-
fill: {
|
|
978
|
-
type: String,
|
|
979
|
-
default: ""
|
|
980
|
-
},
|
|
981
|
-
textColor: {
|
|
982
|
-
type: String,
|
|
983
|
-
default: ""
|
|
984
|
-
},
|
|
985
|
-
name: {
|
|
986
|
-
type: String,
|
|
987
|
-
default: void 0
|
|
988
|
-
},
|
|
989
|
-
validateEvent: {
|
|
990
|
-
type: Boolean,
|
|
991
|
-
default: true
|
|
992
|
-
},
|
|
993
|
-
options: {
|
|
994
|
-
type: definePropType(Array)
|
|
995
|
-
},
|
|
996
|
-
props: {
|
|
997
|
-
type: definePropType(Object),
|
|
998
|
-
default: () => radioDefaultProps
|
|
999
|
-
},
|
|
1000
|
-
type: {
|
|
1001
|
-
type: String,
|
|
1002
|
-
values: ["radio", "button"],
|
|
1003
|
-
default: "radio"
|
|
1004
|
-
},
|
|
1005
|
-
...useAriaProps(["ariaLabel"])
|
|
1006
|
-
});
|
|
1007
|
-
const radioGroupEmits = radioEmits;
|
|
1008
|
-
const radioDefaultProps = {
|
|
1009
|
-
label: "label",
|
|
1010
|
-
value: "value",
|
|
1011
|
-
disabled: "disabled"
|
|
1012
|
-
};
|
|
1013
|
-
|
|
1014
|
-
const _hoisted_1 = ["id", "aria-label", "aria-labelledby"];
|
|
1015
|
-
const _sfc_main = defineComponent({
|
|
1016
|
-
...{
|
|
1017
|
-
name: "ElRadioGroup"
|
|
1018
|
-
},
|
|
1019
|
-
__name: "radio-group",
|
|
1020
|
-
props: radioGroupProps,
|
|
1021
|
-
emits: radioGroupEmits,
|
|
1022
|
-
setup(__props, { emit: __emit }) {
|
|
1023
|
-
const props = __props;
|
|
1024
|
-
const emit = __emit;
|
|
1025
|
-
const ns = useNamespace("radio");
|
|
1026
|
-
const radioId = useId();
|
|
1027
|
-
const radioGroupRef = ref();
|
|
1028
|
-
const { formItem } = useFormItem();
|
|
1029
|
-
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
|
1030
|
-
formItemContext: formItem
|
|
1031
|
-
});
|
|
1032
|
-
const changeEvent = (value) => {
|
|
1033
|
-
emit(UPDATE_MODEL_EVENT, value);
|
|
1034
|
-
nextTick(() => emit(CHANGE_EVENT, value));
|
|
1035
|
-
};
|
|
1036
|
-
onMounted(() => {
|
|
1037
|
-
const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
|
|
1038
|
-
const firstLabel = radios[0];
|
|
1039
|
-
if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
|
|
1040
|
-
firstLabel.tabIndex = 0;
|
|
1041
|
-
}
|
|
1042
|
-
});
|
|
1043
|
-
const name = computed(() => {
|
|
1044
|
-
return props.name || radioId.value;
|
|
1045
|
-
});
|
|
1046
|
-
const aliasProps = computed(() => ({
|
|
1047
|
-
...radioDefaultProps,
|
|
1048
|
-
...props.props
|
|
1049
|
-
}));
|
|
1050
|
-
const getOptionProps = (option) => {
|
|
1051
|
-
const { label, value, disabled } = aliasProps.value;
|
|
1052
|
-
const base = {
|
|
1053
|
-
label: option[label],
|
|
1054
|
-
value: option[value],
|
|
1055
|
-
disabled: option[disabled]
|
|
1056
|
-
};
|
|
1057
|
-
return { ...omit(option, [label, value, disabled]), ...base };
|
|
1058
|
-
};
|
|
1059
|
-
const optionComponent = computed(
|
|
1060
|
-
() => props.type === "button" ? RadioButton : Radio
|
|
1061
|
-
);
|
|
1062
|
-
provide(
|
|
1063
|
-
radioGroupKey,
|
|
1064
|
-
reactive({
|
|
1065
|
-
...toRefs(props),
|
|
1066
|
-
changeEvent,
|
|
1067
|
-
name
|
|
1068
|
-
})
|
|
1069
|
-
);
|
|
1070
|
-
watch(
|
|
1071
|
-
() => props.modelValue,
|
|
1072
|
-
(newVal, oldValue) => {
|
|
1073
|
-
if (props.validateEvent && !isEqual(newVal, oldValue)) {
|
|
1074
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
);
|
|
1078
|
-
return (_ctx, _cache) => {
|
|
1079
|
-
return openBlock(), createElementBlock("div", {
|
|
1080
|
-
id: unref(groupId),
|
|
1081
|
-
ref_key: "radioGroupRef",
|
|
1082
|
-
ref: radioGroupRef,
|
|
1083
|
-
class: normalizeClass(unref(ns).b("group")),
|
|
1084
|
-
role: "radiogroup",
|
|
1085
|
-
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
|
|
1086
|
-
"aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
|
|
1087
|
-
}, [
|
|
1088
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1089
|
-
(openBlock(true), createElementBlock(
|
|
1090
|
-
Fragment,
|
|
1091
|
-
null,
|
|
1092
|
-
renderList(_ctx.options, (item, index) => {
|
|
1093
|
-
return openBlock(), createBlock(
|
|
1094
|
-
resolveDynamicComponent(optionComponent.value),
|
|
1095
|
-
mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)),
|
|
1096
|
-
null,
|
|
1097
|
-
16
|
|
1098
|
-
);
|
|
1099
|
-
}),
|
|
1100
|
-
128
|
|
1101
|
-
))
|
|
1102
|
-
])
|
|
1103
|
-
], 10, _hoisted_1);
|
|
1104
|
-
};
|
|
1105
|
-
}
|
|
1106
|
-
});
|
|
1107
|
-
var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);
|
|
1108
|
-
|
|
1109
|
-
const ElRadio = withInstall(Radio, {
|
|
1110
|
-
RadioButton,
|
|
1111
|
-
RadioGroup
|
|
1112
|
-
});
|
|
1113
|
-
const ElRadioGroup = withNoopInstall(RadioGroup);
|
|
1114
|
-
withNoopInstall(RadioButton);
|
|
1115
|
-
|
|
1116
|
-
export { ElRadioGroup as E, ElCheckboxGroup as a, ElCheckbox as b, ElRadio as c };
|
|
704
|
+
export { ElCheckbox as E, ElCheckboxGroup as a };
|