@dazhicheng/ui 1.4.17 → 1.4.18
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/tt-area/TtArea.vue.d.ts +0 -1
- package/dist/components/tt-area/index.d.ts +0 -1
- package/dist/components/tt-button/index.d.ts +231 -232
- package/dist/components/tt-button/index.vue.d.ts +132 -133
- package/dist/components/tt-checkbox/index.d.ts +0 -1
- package/dist/components/tt-checkbox/index.vue.d.ts +0 -1
- package/dist/components/tt-checkbox/type.d.ts +0 -1
- package/dist/components/tt-empty/index.d.ts +0 -1
- package/dist/components/tt-form/index.d.ts +8 -10
- package/dist/components/tt-form/src/components/ExpandableArrow.vue.d.ts +2 -5
- package/dist/components/tt-form/src/components/Slot.d.ts +0 -1
- package/dist/components/tt-form/src/components/{FormActions.vue.d.ts → formActions.vue.d.ts} +8 -15
- package/dist/components/tt-form/src/config.d.ts +2 -6
- package/dist/components/tt-form/src/form/FormControl.vue.d.ts +0 -1
- package/dist/components/tt-form/src/form/FormDescription.vue.d.ts +0 -1
- package/dist/components/tt-form/src/form/FormItem.vue.d.ts +0 -1
- package/dist/components/tt-form/src/form/FormLabel.vue.d.ts +0 -1
- package/dist/components/tt-form/src/form/FormMessage.vue.d.ts +1 -16
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.d.ts +8 -0
- package/dist/components/tt-form/src/form/FormWarnMessage.vue.d.ts +1 -2
- package/dist/components/tt-form/src/form/RenderContent.vue.d.ts +0 -1
- package/dist/components/tt-form/src/form/index.d.ts +3 -3
- package/dist/components/tt-form/src/form/injectionKeys.d.ts +0 -1
- package/dist/components/tt-form/src/form/useFormField.d.ts +1 -2
- package/dist/components/tt-form/src/form-render/FormField.vue.d.ts +28 -0
- package/dist/components/tt-form/src/form-render/FormLabel.vue.d.ts +27 -0
- package/dist/components/tt-form/src/form-render/context.d.ts +6 -53
- package/dist/components/tt-form/src/form-render/dependencies.d.ts +156 -168
- package/dist/components/tt-form/src/form-render/expandable.d.ts +2 -3
- package/dist/components/tt-form/src/form-render/form.vue.d.ts +10 -45
- package/dist/components/tt-form/src/form-render/helper.d.ts +2 -8
- package/dist/components/tt-form/src/form-render/index.d.ts +2 -3
- package/dist/components/tt-form/src/formApi.d.ts +71 -0
- package/dist/components/tt-form/src/hooks/useEmitAsProps.d.ts +0 -1
- package/dist/components/tt-form/src/hooks/useFormFieldBus.d.ts +2 -2
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.d.ts +0 -1
- package/dist/components/tt-form/src/hooks/useForwardProps.d.ts +0 -1
- package/dist/components/tt-form/src/hooks/useForwardPropsEmits.d.ts +0 -1
- package/dist/components/tt-form/src/shared/createContext.d.ts +0 -1
- package/dist/components/tt-form/src/shared/global-state.d.ts +0 -1
- package/dist/components/tt-form/src/shared/store.d.ts +0 -1
- package/dist/components/tt-form/src/shared/zod-defaults.d.ts +0 -1
- package/dist/components/tt-form/src/types/common.d.ts +11 -0
- package/dist/components/tt-form/src/types/forms.d.ts +280 -0
- package/dist/components/tt-form/src/types/index.d.ts +3 -0
- package/dist/components/tt-form/src/types/paths.d.ts +142 -0
- package/dist/components/tt-form/src/types/shared.d.ts +19 -0
- package/dist/components/tt-form/src/types.d.ts +381 -0
- package/dist/components/tt-form/src/useForm.d.ts +2 -0
- package/dist/components/tt-form/src/useForm.vue.d.ts +27 -0
- package/dist/components/tt-form/src/useFormContext.d.ts +12 -0
- package/dist/components/tt-form-adapter/component/index.d.ts +1 -2
- package/dist/components/tt-form-adapter/index.d.ts +1 -2
- package/dist/components/tt-form-item-error-tooltip/index.d.ts +8 -9
- package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +4 -5
- package/dist/components/tt-icon/index.d.ts +3 -4
- package/dist/components/tt-icon/index.vue.d.ts +1 -2
- package/dist/components/tt-image/index.d.ts +5 -6
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +4 -5
- package/dist/components/tt-image/tt-image.d.ts +5 -6
- package/dist/components/tt-loading/index.d.ts +2 -3
- package/dist/components/tt-loading/src/directive.d.ts +0 -1
- package/dist/components/tt-loading/src/loading.vue.d.ts +2 -3
- package/dist/components/tt-loading/src/service.d.ts +0 -1
- package/dist/components/tt-loading/src/type.d.ts +0 -1
- package/dist/components/tt-modal/index.d.ts +92 -93
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +47 -48
- package/dist/components/tt-modal/src/components/ModalFooter.vue.d.ts +0 -1
- package/dist/components/tt-modal/src/components/ModalHeader.vue.d.ts +0 -1
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts +4 -5
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +21 -22
- package/dist/components/tt-modal/src/index.d.ts +0 -1
- package/dist/components/tt-modal/src/props.d.ts +0 -1
- package/dist/components/tt-modal/src/typing.d.ts +0 -1
- package/dist/components/tt-modal/src/utils/modal-api.d.ts +0 -1
- package/dist/components/tt-part/index.d.ts +6 -7
- package/dist/components/tt-part/index.vue.d.ts +2 -3
- package/dist/components/tt-part/type.d.ts +0 -1
- package/dist/components/tt-part-item/index.d.ts +3 -4
- package/dist/components/tt-part-item/index.vue.d.ts +1 -2
- package/dist/components/tt-part-item/type.d.ts +0 -1
- package/dist/components/tt-select/index.d.ts +0 -1
- package/dist/components/tt-select/src/Select.vue.d.ts +33 -34
- package/dist/components/tt-select/src/components/SelectTable.vue.d.ts +3 -4
- package/dist/components/tt-select/src/components/Table.vue.d.ts +3 -4
- package/dist/components/tt-select/src/const.d.ts +0 -1
- package/dist/components/tt-select/src/hooks/useDataSource.d.ts +0 -1
- package/dist/components/tt-select/src/hooks/useGrid.d.ts +0 -1
- package/dist/components/tt-select/src/hooks/useKeyboard.d.ts +0 -1
- package/dist/components/tt-select/src/hooks/usePagination.d.ts +0 -1
- package/dist/components/tt-select/src/hooks/useSelect.d.ts +0 -1
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +0 -1
- package/dist/components/tt-select/src/props.d.ts +0 -1
- package/dist/components/tt-select/src/types/index.d.ts +0 -1
- package/dist/components/tt-select/src/utils/index.d.ts +0 -1
- package/dist/components/tt-table/index.d.ts +0 -1
- package/dist/components/tt-table/src/Table.vue.d.ts +111 -112
- package/dist/components/tt-table/src/componentMap.d.ts +0 -1
- package/dist/components/tt-table/src/components/RowContext.d.ts +0 -1
- package/dist/components/tt-table/src/components/TableAction.vue.d.ts +0 -1
- package/dist/components/tt-table/src/components/TableButtons.d.ts +0 -1
- package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts +0 -1
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +56 -57
- package/dist/components/tt-table/src/emits.d.ts +0 -1
- package/dist/components/tt-table/src/enum.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useCache.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useCellArea.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useColumns.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useDataSource.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useLeftRightSlot.d.ts +88 -89
- package/dist/components/tt-table/src/hooks/usePagination.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useTable.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useTableContext.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useTableForm.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +0 -1
- package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +0 -1
- package/dist/components/tt-table/src/props.d.ts +0 -1
- package/dist/components/tt-table/src/toolProps.d.ts +0 -1
- package/dist/components/tt-table/src/types/table.d.ts +0 -1
- package/dist/components/tt-table/src/types/tableAction.d.ts +0 -1
- package/dist/components/tt-table/src/types/tableForm.d.ts +0 -1
- package/dist/components/tt-table/src/types/tableTools.d.ts +0 -1
- package/dist/components/tt-table/src/utils/context.d.ts +0 -1
- package/dist/components/tt-table/src/utils/filters.d.ts +0 -1
- package/dist/components/tt-table/src/utils/table-api.d.ts +0 -1
- package/dist/components/tt-table/src/utils/table-form-api.d.ts +0 -1
- package/dist/components/tt-table/src/utils/vxeTable.d.ts +0 -1
- package/dist/components/tt-text/index.d.ts +3 -4
- package/dist/components/tt-text/index.vue.d.ts +1 -2
- package/dist/components/tt-tree-select/index.d.ts +0 -1
- package/dist/components/tt-tree-select/src/TtTreeSelect.vue.d.ts +0 -1
- package/dist/components/tt-tree-select/src/cache-options.d.ts +1 -2
- package/dist/components/tt-tree-select/src/select.d.ts +0 -1
- package/dist/components/tt-tree-select/src/tree.d.ts +0 -1
- package/dist/components/tt-tree-select/src/utils.d.ts +0 -1
- package/dist/components/tt-validate/index.d.ts +0 -1
- package/dist/components/tt-validate/src/ErrorMessage.d.ts +0 -1
- package/dist/components/tt-validate/src/Field.d.ts +7 -8
- package/dist/components/tt-validate/src/FieldArray.d.ts +0 -1
- package/dist/components/tt-validate/src/Form.d.ts +3 -4
- package/dist/components/tt-validate/src/config.d.ts +0 -1
- package/dist/components/tt-validate/src/defineRule.d.ts +0 -1
- package/dist/components/tt-validate/src/index.d.ts +0 -1
- package/dist/components/tt-validate/src/symbols.d.ts +0 -1
- package/dist/components/tt-validate/src/types/common.d.ts +0 -1
- package/dist/components/tt-validate/src/types/forms.d.ts +0 -1
- package/dist/components/tt-validate/src/types/index.d.ts +0 -1
- package/dist/components/tt-validate/src/types/paths.d.ts +0 -1
- package/dist/components/tt-validate/src/types/shared.d.ts +0 -1
- package/dist/components/tt-validate/src/useField.d.ts +0 -1
- package/dist/components/tt-validate/src/useFieldArray.d.ts +0 -1
- package/dist/components/tt-validate/src/useFieldError.d.ts +0 -1
- package/dist/components/tt-validate/src/useFieldState.d.ts +0 -1
- package/dist/components/tt-validate/src/useFieldValue.d.ts +0 -1
- package/dist/components/tt-validate/src/useForm.d.ts +0 -1
- package/dist/components/tt-validate/src/useFormErrors.d.ts +0 -1
- package/dist/components/tt-validate/src/useFormValues.d.ts +0 -1
- package/dist/components/tt-validate/src/useIsFieldDirty.d.ts +0 -1
- package/dist/components/tt-validate/src/useIsFieldTouched.d.ts +0 -1
- package/dist/components/tt-validate/src/useIsFieldValid.d.ts +0 -1
- package/dist/components/tt-validate/src/useIsFormDirty.d.ts +0 -1
- package/dist/components/tt-validate/src/useIsFormTouched.d.ts +0 -1
- package/dist/components/tt-validate/src/useIsFormValid.d.ts +0 -1
- package/dist/components/tt-validate/src/useIsSubmitting.d.ts +0 -1
- package/dist/components/tt-validate/src/useIsValidating.d.ts +0 -1
- package/dist/components/tt-validate/src/useResetForm.d.ts +0 -1
- package/dist/components/tt-validate/src/useSetFieldError.d.ts +0 -1
- package/dist/components/tt-validate/src/useSetFieldTouched.d.ts +0 -1
- package/dist/components/tt-validate/src/useSetFieldValue.d.ts +0 -1
- package/dist/components/tt-validate/src/useSetFormErrors.d.ts +0 -1
- package/dist/components/tt-validate/src/useSetFormTouched.d.ts +0 -1
- package/dist/components/tt-validate/src/useSetFormValues.d.ts +0 -1
- package/dist/components/tt-validate/src/useSubmitCount.d.ts +0 -1
- package/dist/components/tt-validate/src/useSubmitForm.d.ts +0 -1
- package/dist/components/tt-validate/src/useValidateField.d.ts +0 -1
- package/dist/components/tt-validate/src/useValidateForm.d.ts +0 -1
- package/dist/components/tt-validate/src/utils/assertions.d.ts +0 -1
- package/dist/components/tt-validate/src/utils/common.d.ts +0 -1
- package/dist/components/tt-validate/src/utils/events.d.ts +0 -1
- package/dist/components/tt-validate/src/utils/index.d.ts +0 -1
- package/dist/components/tt-validate/src/utils/rules.d.ts +0 -1
- package/dist/components/tt-validate/src/utils/shared.d.ts +0 -1
- package/dist/components/tt-validate/src/utils/vnode.d.ts +0 -1
- package/dist/components/tt-validate/src/validate.d.ts +0 -1
- package/dist/components/tt-validate/zod/index.d.ts +0 -1
- package/dist/components/types.d.ts +0 -1
- package/dist/directives/auto-tip/index.d.ts +0 -1
- package/dist/directives/dialog-resize/index.d.ts +0 -1
- package/dist/directives/dialog-resize/use-css-variable.d.ts +0 -1
- package/dist/directives/dialog-resize/use-draggable.d.ts +0 -1
- package/dist/directives/dialog-resize/use-fullscreen.d.ts +0 -1
- package/dist/directives/dialog-resize/use-parse-translate.d.ts +0 -1
- package/dist/directives/dialog-resize/use-resizer.d.ts +0 -1
- package/dist/directives/disabled-tip/index.d.ts +0 -1
- package/dist/directives/index.d.ts +0 -1
- package/dist/hooks/useFormat.d.ts +0 -1
- package/dist/hooks/useLoading.d.ts +0 -1
- package/dist/hooks/useSetup.d.ts +0 -1
- package/dist/hooks/useTable.d.ts +0 -1
- package/dist/hooks/useTemplateSlot.d.ts +0 -1
- package/dist/index.d.ts +15 -8
- package/dist/index.js +33097 -32
- package/dist/style.css +1 -1
- package/package.json +8 -5
- package/dist/components/tt-area/TtArea.vue.d.ts.map +0 -1
- package/dist/components/tt-area/index.d.ts.map +0 -1
- package/dist/components/tt-button/index.d.ts.map +0 -1
- package/dist/components/tt-button/index.vue.d.ts.map +0 -1
- package/dist/components/tt-checkbox/index.d.ts.map +0 -1
- package/dist/components/tt-checkbox/index.vue.d.ts.map +0 -1
- package/dist/components/tt-checkbox/type.d.ts.map +0 -1
- package/dist/components/tt-empty/index.d.ts.map +0 -1
- package/dist/components/tt-form/index.d.ts.map +0 -1
- package/dist/components/tt-form/src/compare.d.ts +0 -15
- package/dist/components/tt-form/src/compare.d.ts.map +0 -1
- package/dist/components/tt-form/src/components/ExpandableArrow.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/components/FormActions.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/components/FormFilter.vue.d.ts +0 -23
- package/dist/components/tt-form/src/components/FormFilter.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/components/Slot.d.ts.map +0 -1
- package/dist/components/tt-form/src/config.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/FormControl.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/FormDescription.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/FormItem.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/FormLabel.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/FormMessage.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/FormWarnMessage.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/RenderContent.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/index.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/injectionKeys.d.ts.map +0 -1
- package/dist/components/tt-form/src/form/useFormField.d.ts.map +0 -1
- package/dist/components/tt-form/src/form-api.d.ts +0 -163
- package/dist/components/tt-form/src/form-api.d.ts.map +0 -1
- package/dist/components/tt-form/src/form-render/context.d.ts.map +0 -1
- package/dist/components/tt-form/src/form-render/dependencies.d.ts.map +0 -1
- package/dist/components/tt-form/src/form-render/expandable.d.ts.map +0 -1
- package/dist/components/tt-form/src/form-render/form-field.vue.d.ts +0 -33
- package/dist/components/tt-form/src/form-render/form-field.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form-render/form-label.vue.d.ts +0 -44
- package/dist/components/tt-form/src/form-render/form-label.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form-render/form.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/form-render/helper.d.ts.map +0 -1
- package/dist/components/tt-form/src/form-render/index.d.ts.map +0 -1
- package/dist/components/tt-form/src/hooks/useEmitAsProps.d.ts.map +0 -1
- package/dist/components/tt-form/src/hooks/useFormFieldBus.d.ts.map +0 -1
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.d.ts.map +0 -1
- package/dist/components/tt-form/src/hooks/useForwardProps.d.ts.map +0 -1
- package/dist/components/tt-form/src/hooks/useForwardPropsEmits.d.ts.map +0 -1
- package/dist/components/tt-form/src/index.vue.d.ts +0 -344
- package/dist/components/tt-form/src/index.vue.d.ts.map +0 -1
- package/dist/components/tt-form/src/shared/createContext.d.ts.map +0 -1
- package/dist/components/tt-form/src/shared/global-state.d.ts.map +0 -1
- package/dist/components/tt-form/src/shared/store.d.ts.map +0 -1
- package/dist/components/tt-form/src/shared/zod-defaults.d.ts.map +0 -1
- package/dist/components/tt-form/src/types/types.d.ts +0 -503
- package/dist/components/tt-form/src/types/types.d.ts.map +0 -1
- package/dist/components/tt-form/src/use-form-context.d.ts +0 -41
- package/dist/components/tt-form/src/use-form-context.d.ts.map +0 -1
- package/dist/components/tt-form/src/use-form-v2.d.ts +0 -19
- package/dist/components/tt-form/src/use-form-v2.d.ts.map +0 -1
- package/dist/components/tt-form-adapter/component/index.d.ts.map +0 -1
- package/dist/components/tt-form-adapter/index.d.ts.map +0 -1
- package/dist/components/tt-form-item-error-tooltip/index.d.ts.map +0 -1
- package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts.map +0 -1
- package/dist/components/tt-icon/index.d.ts.map +0 -1
- package/dist/components/tt-icon/index.vue.d.ts.map +0 -1
- package/dist/components/tt-image/index.d.ts.map +0 -1
- package/dist/components/tt-image/src/components/ImageViewer.d.ts.map +0 -1
- package/dist/components/tt-image/tt-image.d.ts.map +0 -1
- package/dist/components/tt-loading/index.d.ts.map +0 -1
- package/dist/components/tt-loading/src/directive.d.ts.map +0 -1
- package/dist/components/tt-loading/src/loading.vue.d.ts.map +0 -1
- package/dist/components/tt-loading/src/service.d.ts.map +0 -1
- package/dist/components/tt-loading/src/type.d.ts.map +0 -1
- package/dist/components/tt-modal/index.d.ts.map +0 -1
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts.map +0 -1
- package/dist/components/tt-modal/src/components/ModalFooter.vue.d.ts.map +0 -1
- package/dist/components/tt-modal/src/components/ModalHeader.vue.d.ts.map +0 -1
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts.map +0 -1
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts.map +0 -1
- package/dist/components/tt-modal/src/index.d.ts.map +0 -1
- package/dist/components/tt-modal/src/props.d.ts.map +0 -1
- package/dist/components/tt-modal/src/typing.d.ts.map +0 -1
- package/dist/components/tt-modal/src/utils/modal-api.d.ts.map +0 -1
- package/dist/components/tt-part/index.d.ts.map +0 -1
- package/dist/components/tt-part/index.vue.d.ts.map +0 -1
- package/dist/components/tt-part/type.d.ts.map +0 -1
- package/dist/components/tt-part-item/index.d.ts.map +0 -1
- package/dist/components/tt-part-item/index.vue.d.ts.map +0 -1
- package/dist/components/tt-part-item/type.d.ts.map +0 -1
- package/dist/components/tt-select/index.d.ts.map +0 -1
- package/dist/components/tt-select/src/Select.vue.d.ts.map +0 -1
- package/dist/components/tt-select/src/components/SelectTable.vue.d.ts.map +0 -1
- package/dist/components/tt-select/src/components/Table.vue.d.ts.map +0 -1
- package/dist/components/tt-select/src/const.d.ts.map +0 -1
- package/dist/components/tt-select/src/hooks/useDataSource.d.ts.map +0 -1
- package/dist/components/tt-select/src/hooks/useGrid.d.ts.map +0 -1
- package/dist/components/tt-select/src/hooks/useKeyboard.d.ts.map +0 -1
- package/dist/components/tt-select/src/hooks/usePagination.d.ts.map +0 -1
- package/dist/components/tt-select/src/hooks/useSelect.d.ts.map +0 -1
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts.map +0 -1
- package/dist/components/tt-select/src/props.d.ts.map +0 -1
- package/dist/components/tt-select/src/types/index.d.ts.map +0 -1
- package/dist/components/tt-select/src/utils/index.d.ts.map +0 -1
- package/dist/components/tt-table/index.d.ts.map +0 -1
- package/dist/components/tt-table/src/Table.vue.d.ts.map +0 -1
- package/dist/components/tt-table/src/componentMap.d.ts.map +0 -1
- package/dist/components/tt-table/src/components/RowContext.d.ts.map +0 -1
- package/dist/components/tt-table/src/components/TableAction.vue.d.ts.map +0 -1
- package/dist/components/tt-table/src/components/TableButtons.d.ts.map +0 -1
- package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts.map +0 -1
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts.map +0 -1
- package/dist/components/tt-table/src/emits.d.ts.map +0 -1
- package/dist/components/tt-table/src/enum.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useCache.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useCellArea.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useColumns.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useDataSource.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useLeftRightSlot.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/usePagination.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useTable.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useTableContext.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useTableEvent.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useTableForm.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useTableHeight.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts.map +0 -1
- package/dist/components/tt-table/src/hooks/useTableSlot.d.ts.map +0 -1
- package/dist/components/tt-table/src/props.d.ts.map +0 -1
- package/dist/components/tt-table/src/toolProps.d.ts.map +0 -1
- package/dist/components/tt-table/src/types/table.d.ts.map +0 -1
- package/dist/components/tt-table/src/types/tableAction.d.ts.map +0 -1
- package/dist/components/tt-table/src/types/tableForm.d.ts.map +0 -1
- package/dist/components/tt-table/src/types/tableTools.d.ts.map +0 -1
- package/dist/components/tt-table/src/utils/context.d.ts.map +0 -1
- package/dist/components/tt-table/src/utils/filters.d.ts.map +0 -1
- package/dist/components/tt-table/src/utils/table-api.d.ts.map +0 -1
- package/dist/components/tt-table/src/utils/table-form-api.d.ts.map +0 -1
- package/dist/components/tt-table/src/utils/vxeTable.d.ts.map +0 -1
- package/dist/components/tt-text/index.d.ts.map +0 -1
- package/dist/components/tt-text/index.vue.d.ts.map +0 -1
- package/dist/components/tt-tree-select/index.d.ts.map +0 -1
- package/dist/components/tt-tree-select/src/TtTreeSelect.vue.d.ts.map +0 -1
- package/dist/components/tt-tree-select/src/cache-options.d.ts.map +0 -1
- package/dist/components/tt-tree-select/src/select.d.ts.map +0 -1
- package/dist/components/tt-tree-select/src/tree.d.ts.map +0 -1
- package/dist/components/tt-tree-select/src/utils.d.ts.map +0 -1
- package/dist/components/tt-validate/index.d.ts.map +0 -1
- package/dist/components/tt-validate/src/ErrorMessage.d.ts.map +0 -1
- package/dist/components/tt-validate/src/Field.d.ts.map +0 -1
- package/dist/components/tt-validate/src/FieldArray.d.ts.map +0 -1
- package/dist/components/tt-validate/src/Form.d.ts.map +0 -1
- package/dist/components/tt-validate/src/config.d.ts.map +0 -1
- package/dist/components/tt-validate/src/defineRule.d.ts.map +0 -1
- package/dist/components/tt-validate/src/index.d.ts.map +0 -1
- package/dist/components/tt-validate/src/symbols.d.ts.map +0 -1
- package/dist/components/tt-validate/src/types/common.d.ts.map +0 -1
- package/dist/components/tt-validate/src/types/forms.d.ts.map +0 -1
- package/dist/components/tt-validate/src/types/index.d.ts.map +0 -1
- package/dist/components/tt-validate/src/types/paths.d.ts.map +0 -1
- package/dist/components/tt-validate/src/types/shared.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useField.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useFieldArray.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useFieldError.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useFieldState.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useFieldValue.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useForm.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useFormErrors.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useFormValues.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useIsFieldDirty.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useIsFieldTouched.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useIsFieldValid.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useIsFormDirty.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useIsFormTouched.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useIsFormValid.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useIsSubmitting.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useIsValidating.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useResetForm.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useSetFieldError.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useSetFieldTouched.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useSetFieldValue.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useSetFormErrors.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useSetFormTouched.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useSetFormValues.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useSubmitCount.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useSubmitForm.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useValidateField.d.ts.map +0 -1
- package/dist/components/tt-validate/src/useValidateForm.d.ts.map +0 -1
- package/dist/components/tt-validate/src/utils/assertions.d.ts.map +0 -1
- package/dist/components/tt-validate/src/utils/common.d.ts.map +0 -1
- package/dist/components/tt-validate/src/utils/events.d.ts.map +0 -1
- package/dist/components/tt-validate/src/utils/index.d.ts.map +0 -1
- package/dist/components/tt-validate/src/utils/rules.d.ts.map +0 -1
- package/dist/components/tt-validate/src/utils/shared.d.ts.map +0 -1
- package/dist/components/tt-validate/src/utils/vnode.d.ts.map +0 -1
- package/dist/components/tt-validate/src/validate.d.ts.map +0 -1
- package/dist/components/tt-validate/zod/index.d.ts.map +0 -1
- package/dist/components/types.d.ts.map +0 -1
- package/dist/css-B-NBzuuu.js +0 -1
- package/dist/css-B2XtZxnv.js +0 -2
- package/dist/css-BizbCFH3.js +0 -4
- package/dist/css-ByWw4KN5.js +0 -2
- package/dist/css-CIkg43yy.js +0 -1
- package/dist/css-COykwHo1.js +0 -2
- package/dist/css-Cgfo87Gs.js +0 -1
- package/dist/css-Chse_8b2.js +0 -3
- package/dist/css-CvjpN3r9.js +0 -1
- package/dist/css-D8FPIJO1.js +0 -1
- package/dist/css-DGumj5iO.js +0 -1
- package/dist/css-DLZxzZoB.js +0 -1
- package/dist/css-Dd6Nw96X.js +0 -1
- package/dist/css-DhJ-Bn4t.js +0 -4
- package/dist/css-sQ8IZeHP.js +0 -4
- package/dist/directives/auto-tip/index.d.ts.map +0 -1
- package/dist/directives/dialog-resize/index.d.ts.map +0 -1
- package/dist/directives/dialog-resize/use-css-variable.d.ts.map +0 -1
- package/dist/directives/dialog-resize/use-draggable.d.ts.map +0 -1
- package/dist/directives/dialog-resize/use-fullscreen.d.ts.map +0 -1
- package/dist/directives/dialog-resize/use-parse-translate.d.ts.map +0 -1
- package/dist/directives/dialog-resize/use-resizer.d.ts.map +0 -1
- package/dist/directives/disabled-tip/index.d.ts.map +0 -1
- package/dist/directives/index.d.ts.map +0 -1
- package/dist/event-BpZD5QYv.js +0 -52
- package/dist/hooks/useFormat.d.ts.map +0 -1
- package/dist/hooks/useLoading.d.ts.map +0 -1
- package/dist/hooks/useSetup.d.ts.map +0 -1
- package/dist/hooks/useTable.d.ts.map +0 -1
- package/dist/hooks/useTemplateSlot.d.ts.map +0 -1
- package/dist/icon-C8mOBgGn.js +0 -15
- package/dist/index-Ay_e-Mu_.js +0 -658
- package/dist/index-BQ2KedE7.js +0 -392
- package/dist/index-BQfVaV7A.js +0 -216
- package/dist/index-BR3sT_rT.js +0 -334
- package/dist/index-BY-Xyp5q.js +0 -832
- package/dist/index-BiA7AsUl.js +0 -22
- package/dist/index-BsKcOBVC.js +0 -1273
- package/dist/index-By3DWh_m.js +0 -3559
- package/dist/index-CDw4vJ_J.js +0 -432
- package/dist/index-CQEli-Vx.js +0 -27
- package/dist/index-D1S5IgHw.js +0 -2502
- package/dist/index-DARbDgFW.js +0 -909
- package/dist/index-DftzFo8M.js +0 -46
- package/dist/index-DtD9KW7p.js +0 -436
- package/dist/index-HEvFEYVF.js +0 -32433
- package/dist/index-iDdpdLyC.js +0 -84
- package/dist/index-kCYWgqco.js +0 -3471
- package/dist/index-qhJRQdTJ.js +0 -21
- package/dist/index-tQY6pN96.js +0 -90
- package/dist/index-zMyxrv4a.js +0 -408
- package/dist/index.d.ts.map +0 -1
- package/dist/panel-time-pick.vue2-3mXww5KZ.js +0 -1603
- package/dist/typescript-BpuhIBuJ.js +0 -4
- package/dist/use-form-common-props-Co2xJKSS.js +0 -98
- package/dist/use-form-item-BHXTK2Pf.js +0 -71
- package/dist/useProps-m8gnZipa.js +0 -215
- package/dist/util-BFu351R4.js +0 -2259
package/dist/index-D1S5IgHw.js
DELETED
|
@@ -1,2502 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Ce, createElementBlock as ce, openBlock as K, normalizeStyle as Ae, normalizeClass as N, toDisplayString as me, inject as Jt, withModifiers as oe, renderSlot as ue, createElementVNode as j, getCurrentInstance as xt, computed as b, ref as L, reactive as xe, unref as T, watch as ve, onBeforeUnmount as ln, h as we, resolveDynamicComponent as Be, Fragment as dt, mergeProps as ft, onMounted as _t, onUpdated as nn, onActivated as on, nextTick as ae, createVNode as de, toRaw as an, useSlots as sn, watchEffect as Pt, toRefs as Ht, provide as rn, resolveComponent as Ze, resolveDirective as un, withDirectives as Wt, withCtx as X, createSlots as cn, normalizeProps as dn, guardReactiveProps as fn, createCommentVNode as he, createBlock as ye, renderList as Kt, createTextVNode as Gt, withKeys as ke, vShow as mn } from "vue";
|
|
2
|
-
import { _ as St, u as vn, a as Ye, E as pn, B as hn, b as gn, c as bn } from "./util-BFu351R4.js";
|
|
3
|
-
import { t as qt, d as yn, u as tt, M as Sn, E as wn, a as On, B as In } from "./useProps-m8gnZipa.js";
|
|
4
|
-
import { E as Vn } from "./index-iDdpdLyC.js";
|
|
5
|
-
import { memoize as En, get as ge, isEqual as $e, findLastIndex as Tn } from "lodash-es";
|
|
6
|
-
import { d as be, C as el, U as tl, e as Mn, c as Cn, g as mt, r as Rn, o as Fe, a as Se, i as Xe, G as zn } from "./index-HEvFEYVF.js";
|
|
7
|
-
import { b as Re, a as Q, u as Nn, l as Ln, e as Oe, q as Ie, t as ll, g as nl, j as Dn, d as ut, h as kn, p as $n, w as An } from "./use-form-common-props-Co2xJKSS.js";
|
|
8
|
-
import { u as Bn } from "./index-BiA7AsUl.js";
|
|
9
|
-
import { i as Ut, V as Fn } from "./icon-C8mOBgGn.js";
|
|
10
|
-
import { isClient as wt, useEventListener as Pn, isIOS as Hn, useDebounceFn as Wn, useResizeObserver as Ve } from "@vueuse/core";
|
|
11
|
-
import { a as Kn, b as Gn, u as qn } from "./index-tQY6pN96.js";
|
|
12
|
-
import { m as Un } from "./typescript-BpuhIBuJ.js";
|
|
13
|
-
import { g as ol, E as al } from "./event-BpZD5QYv.js";
|
|
14
|
-
import { u as jn } from "./index-BQfVaV7A.js";
|
|
15
|
-
import { u as Qn, a as Zn, b as Yn } from "./use-form-item-BHXTK2Pf.js";
|
|
16
|
-
import { C as Xn } from "./index-DftzFo8M.js";
|
|
17
|
-
const sl = (e) => wt ? window.requestAnimationFrame(e) : setTimeout(e, 16), il = (e) => wt ? window.cancelAnimationFrame(e) : clearTimeout(e);
|
|
18
|
-
var Jn = Ce({
|
|
19
|
-
props: {
|
|
20
|
-
item: {
|
|
21
|
-
type: Object,
|
|
22
|
-
required: !0
|
|
23
|
-
},
|
|
24
|
-
style: {
|
|
25
|
-
type: Object
|
|
26
|
-
},
|
|
27
|
-
height: Number
|
|
28
|
-
},
|
|
29
|
-
setup() {
|
|
30
|
-
return {
|
|
31
|
-
ns: be("select")
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
function xn(e, t, n, a, r, d) {
|
|
36
|
-
return K(), ce(
|
|
37
|
-
"div",
|
|
38
|
-
{
|
|
39
|
-
class: N(e.ns.be("group", "title")),
|
|
40
|
-
style: Ae({ ...e.style, lineHeight: `${e.height}px` })
|
|
41
|
-
},
|
|
42
|
-
me(e.item.label),
|
|
43
|
-
7
|
|
44
|
-
/* TEXT, CLASS, STYLE */
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
var _n = /* @__PURE__ */ St(Jn, [["render", xn]]);
|
|
48
|
-
function eo(e, { emit: t }) {
|
|
49
|
-
return {
|
|
50
|
-
hoverItem: () => {
|
|
51
|
-
e.disabled || t("hover", e.index);
|
|
52
|
-
},
|
|
53
|
-
selectOptionClick: () => {
|
|
54
|
-
e.disabled || t("select", e.item, e.index);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const to = Re({
|
|
59
|
-
/**
|
|
60
|
-
* @description whether creating new items is allowed. To use this, `filterable` must be true
|
|
61
|
-
*/
|
|
62
|
-
allowCreate: Boolean,
|
|
63
|
-
/**
|
|
64
|
-
* @description autocomplete of select input
|
|
65
|
-
*/
|
|
66
|
-
autocomplete: {
|
|
67
|
-
type: Q(String),
|
|
68
|
-
default: "none"
|
|
69
|
-
},
|
|
70
|
-
/**
|
|
71
|
-
* @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused
|
|
72
|
-
*/
|
|
73
|
-
automaticDropdown: Boolean,
|
|
74
|
-
/**
|
|
75
|
-
* @description whether select can be cleared
|
|
76
|
-
*/
|
|
77
|
-
clearable: Boolean,
|
|
78
|
-
/**
|
|
79
|
-
* @description custom clear icon
|
|
80
|
-
*/
|
|
81
|
-
clearIcon: {
|
|
82
|
-
type: Ut,
|
|
83
|
-
default: Cn
|
|
84
|
-
},
|
|
85
|
-
/**
|
|
86
|
-
* @description tooltip theme, built-in theme: `dark` / `light`
|
|
87
|
-
*/
|
|
88
|
-
effect: {
|
|
89
|
-
type: Q(String),
|
|
90
|
-
default: "light"
|
|
91
|
-
},
|
|
92
|
-
/**
|
|
93
|
-
* @description whether to collapse tags to a text when multiple selecting
|
|
94
|
-
*/
|
|
95
|
-
collapseTags: Boolean,
|
|
96
|
-
/**
|
|
97
|
-
* @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true
|
|
98
|
-
*/
|
|
99
|
-
collapseTagsTooltip: Boolean,
|
|
100
|
-
/**
|
|
101
|
-
* @description The max tags number to be shown. To use this, `collapse-tags` must be true
|
|
102
|
-
*/
|
|
103
|
-
maxCollapseTags: {
|
|
104
|
-
type: Number,
|
|
105
|
-
default: 1
|
|
106
|
-
},
|
|
107
|
-
/**
|
|
108
|
-
* @description
|
|
109
|
-
*/
|
|
110
|
-
defaultFirstOption: Boolean,
|
|
111
|
-
/**
|
|
112
|
-
* @description is disabled
|
|
113
|
-
*/
|
|
114
|
-
disabled: {
|
|
115
|
-
type: Boolean,
|
|
116
|
-
default: void 0
|
|
117
|
-
},
|
|
118
|
-
/**
|
|
119
|
-
* @description
|
|
120
|
-
*/
|
|
121
|
-
estimatedOptionHeight: {
|
|
122
|
-
type: Number,
|
|
123
|
-
default: void 0
|
|
124
|
-
},
|
|
125
|
-
/**
|
|
126
|
-
* @description whether Select is filterable
|
|
127
|
-
*/
|
|
128
|
-
filterable: Boolean,
|
|
129
|
-
/**
|
|
130
|
-
* @description custom filter method, the first parameter is the current input value. To use this, `filterable` must be true
|
|
131
|
-
*/
|
|
132
|
-
filterMethod: {
|
|
133
|
-
type: Q(Function)
|
|
134
|
-
},
|
|
135
|
-
/**
|
|
136
|
-
* @description The height of the dropdown panel, 34px for each item
|
|
137
|
-
*/
|
|
138
|
-
height: {
|
|
139
|
-
type: Number,
|
|
140
|
-
default: 274
|
|
141
|
-
// same as select dropdown menu
|
|
142
|
-
},
|
|
143
|
-
/**
|
|
144
|
-
* @description The height of the dropdown item
|
|
145
|
-
*/
|
|
146
|
-
itemHeight: {
|
|
147
|
-
type: Number,
|
|
148
|
-
default: 34
|
|
149
|
-
},
|
|
150
|
-
/**
|
|
151
|
-
* @description native input id
|
|
152
|
-
*/
|
|
153
|
-
id: String,
|
|
154
|
-
/**
|
|
155
|
-
* @description whether Select is loading data from server
|
|
156
|
-
*/
|
|
157
|
-
loading: Boolean,
|
|
158
|
-
/**
|
|
159
|
-
* @description displayed text while loading data from server, default is 'Loading'
|
|
160
|
-
*/
|
|
161
|
-
loadingText: String,
|
|
162
|
-
/**
|
|
163
|
-
* @description biding value
|
|
164
|
-
*/
|
|
165
|
-
modelValue: {
|
|
166
|
-
type: Q([Array, String, Number, Boolean, Object]),
|
|
167
|
-
default: void 0
|
|
168
|
-
},
|
|
169
|
-
/**
|
|
170
|
-
* @description is multiple
|
|
171
|
-
*/
|
|
172
|
-
multiple: Boolean,
|
|
173
|
-
/**
|
|
174
|
-
* @description maximum number of options user can select when multiple is true. No limit when set to 0
|
|
175
|
-
*/
|
|
176
|
-
multipleLimit: {
|
|
177
|
-
type: Number,
|
|
178
|
-
default: 0
|
|
179
|
-
},
|
|
180
|
-
/**
|
|
181
|
-
* @description the name attribute of select input
|
|
182
|
-
*/
|
|
183
|
-
name: String,
|
|
184
|
-
/**
|
|
185
|
-
* @description displayed text when there is no options, you can also use slot empty, the default is 'No Data'
|
|
186
|
-
*/
|
|
187
|
-
noDataText: String,
|
|
188
|
-
/**
|
|
189
|
-
* @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'
|
|
190
|
-
*/
|
|
191
|
-
noMatchText: String,
|
|
192
|
-
/**
|
|
193
|
-
* @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true
|
|
194
|
-
*/
|
|
195
|
-
remoteMethod: {
|
|
196
|
-
type: Q(Function)
|
|
197
|
-
},
|
|
198
|
-
/**
|
|
199
|
-
* @description whether reserve the keyword after select filtered option.
|
|
200
|
-
*/
|
|
201
|
-
reserveKeyword: {
|
|
202
|
-
type: Boolean,
|
|
203
|
-
default: !0
|
|
204
|
-
},
|
|
205
|
-
/**
|
|
206
|
-
* @description data of the options, the key of `value` and `label` can be customize by `props`
|
|
207
|
-
*/
|
|
208
|
-
options: {
|
|
209
|
-
type: Q(Array),
|
|
210
|
-
required: !0
|
|
211
|
-
},
|
|
212
|
-
/**
|
|
213
|
-
* @description placeholder, the default is 'Please select'
|
|
214
|
-
*/
|
|
215
|
-
placeholder: {
|
|
216
|
-
type: String
|
|
217
|
-
},
|
|
218
|
-
/**
|
|
219
|
-
* @description whether select dropdown is teleported, if `true` it will be teleported to where `append-to` sets
|
|
220
|
-
*/
|
|
221
|
-
teleported: Ye.teleported,
|
|
222
|
-
/**
|
|
223
|
-
* @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed
|
|
224
|
-
*/
|
|
225
|
-
persistent: {
|
|
226
|
-
type: Boolean,
|
|
227
|
-
default: !0
|
|
228
|
-
},
|
|
229
|
-
/**
|
|
230
|
-
* @description custom class name for Select's dropdown
|
|
231
|
-
*/
|
|
232
|
-
popperClass: Ye.popperClass,
|
|
233
|
-
/**
|
|
234
|
-
* @description custom style for Select's dropdown
|
|
235
|
-
*/
|
|
236
|
-
popperStyle: Ye.popperStyle,
|
|
237
|
-
/**
|
|
238
|
-
* @description [popper.js](https://popper.js.org/docs/v2/) parameters
|
|
239
|
-
*/
|
|
240
|
-
popperOptions: {
|
|
241
|
-
type: Q(Object),
|
|
242
|
-
default: () => ({})
|
|
243
|
-
},
|
|
244
|
-
/**
|
|
245
|
-
* @description whether search data from server
|
|
246
|
-
*/
|
|
247
|
-
remote: Boolean,
|
|
248
|
-
/**
|
|
249
|
-
* @description debounce delay during remote search, in milliseconds
|
|
250
|
-
*/
|
|
251
|
-
debounce: {
|
|
252
|
-
type: Number,
|
|
253
|
-
default: 300
|
|
254
|
-
},
|
|
255
|
-
/**
|
|
256
|
-
* @description size of component
|
|
257
|
-
*/
|
|
258
|
-
size: Nn,
|
|
259
|
-
/**
|
|
260
|
-
* @description configuration options, see the following table
|
|
261
|
-
*/
|
|
262
|
-
props: {
|
|
263
|
-
type: Q(Object),
|
|
264
|
-
default: () => yn
|
|
265
|
-
},
|
|
266
|
-
/**
|
|
267
|
-
* @description unique identity key name for value, required when value is an object
|
|
268
|
-
*/
|
|
269
|
-
valueKey: {
|
|
270
|
-
type: String,
|
|
271
|
-
default: "value"
|
|
272
|
-
},
|
|
273
|
-
/**
|
|
274
|
-
* @description Controls whether the scrollbar is always displayed
|
|
275
|
-
*/
|
|
276
|
-
scrollbarAlwaysOn: Boolean,
|
|
277
|
-
/**
|
|
278
|
-
* @description whether to trigger form validation
|
|
279
|
-
*/
|
|
280
|
-
validateEvent: {
|
|
281
|
-
type: Boolean,
|
|
282
|
-
default: !0
|
|
283
|
-
},
|
|
284
|
-
/**
|
|
285
|
-
* @description offset of the dropdown
|
|
286
|
-
*/
|
|
287
|
-
offset: {
|
|
288
|
-
type: Number,
|
|
289
|
-
default: 12
|
|
290
|
-
},
|
|
291
|
-
/**
|
|
292
|
-
* @description in remote search method show suffix icon
|
|
293
|
-
*/
|
|
294
|
-
remoteShowSuffix: Boolean,
|
|
295
|
-
/**
|
|
296
|
-
* @description Determines whether the arrow is displayed
|
|
297
|
-
*/
|
|
298
|
-
showArrow: {
|
|
299
|
-
type: Boolean,
|
|
300
|
-
default: !0
|
|
301
|
-
},
|
|
302
|
-
/**
|
|
303
|
-
* @description position of dropdown
|
|
304
|
-
*/
|
|
305
|
-
placement: {
|
|
306
|
-
type: Q(String),
|
|
307
|
-
values: pn,
|
|
308
|
-
default: "bottom-start"
|
|
309
|
-
},
|
|
310
|
-
/**
|
|
311
|
-
* @description list of possible positions for dropdown
|
|
312
|
-
*/
|
|
313
|
-
fallbackPlacements: {
|
|
314
|
-
type: Q(Array),
|
|
315
|
-
default: ["bottom-start", "top-start", "right", "left"]
|
|
316
|
-
},
|
|
317
|
-
/**
|
|
318
|
-
* @description tag type
|
|
319
|
-
*/
|
|
320
|
-
tagType: { ...qt.type, default: "info" },
|
|
321
|
-
/**
|
|
322
|
-
* @description tag effect
|
|
323
|
-
*/
|
|
324
|
-
tagEffect: { ...qt.effect, default: "light" },
|
|
325
|
-
/**
|
|
326
|
-
* @description tabindex for input
|
|
327
|
-
*/
|
|
328
|
-
tabindex: {
|
|
329
|
-
type: [String, Number],
|
|
330
|
-
default: 0
|
|
331
|
-
},
|
|
332
|
-
/**
|
|
333
|
-
* @description which element the select dropdown appends to
|
|
334
|
-
*/
|
|
335
|
-
appendTo: Ye.appendTo,
|
|
336
|
-
/**
|
|
337
|
-
* @description if it is `true`, the width of the dropdown panel is the same as the input box.
|
|
338
|
-
* if it is `false`, the width is automatically calculated based on the value of `label`,
|
|
339
|
-
* or it can be set to a number to make it a fixed width
|
|
340
|
-
*/
|
|
341
|
-
fitInputWidth: {
|
|
342
|
-
type: [Boolean, Number],
|
|
343
|
-
default: !0,
|
|
344
|
-
validator(e) {
|
|
345
|
-
return Ln(e) || Oe(e);
|
|
346
|
-
}
|
|
347
|
-
},
|
|
348
|
-
suffixIcon: {
|
|
349
|
-
type: Ut,
|
|
350
|
-
default: Mn
|
|
351
|
-
},
|
|
352
|
-
...vn,
|
|
353
|
-
...Bn(["ariaLabel"])
|
|
354
|
-
}), lo = Re({
|
|
355
|
-
data: Array,
|
|
356
|
-
disabled: Boolean,
|
|
357
|
-
hovering: Boolean,
|
|
358
|
-
item: {
|
|
359
|
-
type: Q(Object),
|
|
360
|
-
required: !0
|
|
361
|
-
},
|
|
362
|
-
index: Number,
|
|
363
|
-
style: Object,
|
|
364
|
-
selected: Boolean,
|
|
365
|
-
created: Boolean
|
|
366
|
-
}), no = {
|
|
367
|
-
[tl]: (e) => !0,
|
|
368
|
-
[el]: (e) => !0,
|
|
369
|
-
"remove-tag": (e) => !0,
|
|
370
|
-
"visible-change": (e) => !0,
|
|
371
|
-
focus: (e) => e instanceof FocusEvent,
|
|
372
|
-
blur: (e) => e instanceof FocusEvent,
|
|
373
|
-
clear: () => !0
|
|
374
|
-
}, oo = {
|
|
375
|
-
hover: (e) => Oe(e),
|
|
376
|
-
select: (e, t) => !0
|
|
377
|
-
}, Ot = /* @__PURE__ */ Symbol(
|
|
378
|
-
"ElSelectV2Injection"
|
|
379
|
-
);
|
|
380
|
-
var ao = Ce({
|
|
381
|
-
props: lo,
|
|
382
|
-
emits: oo,
|
|
383
|
-
setup(e, { emit: t }) {
|
|
384
|
-
const n = Jt(Ot), a = be("select"), { hoverItem: r, selectOptionClick: d } = eo(e, { emit: t }), { getLabel: v } = tt(n.props), h = n.contentId;
|
|
385
|
-
return {
|
|
386
|
-
ns: a,
|
|
387
|
-
contentId: h,
|
|
388
|
-
hoverItem: r,
|
|
389
|
-
selectOptionClick: d,
|
|
390
|
-
getLabel: v
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
const so = ["id", "aria-selected", "aria-disabled"];
|
|
395
|
-
function io(e, t, n, a, r, d) {
|
|
396
|
-
return K(), ce("li", {
|
|
397
|
-
id: `${e.contentId}-${e.index}`,
|
|
398
|
-
role: "option",
|
|
399
|
-
"aria-selected": e.selected,
|
|
400
|
-
"aria-disabled": e.disabled || void 0,
|
|
401
|
-
style: Ae(e.style),
|
|
402
|
-
class: N([
|
|
403
|
-
e.ns.be("dropdown", "item"),
|
|
404
|
-
e.ns.is("selected", e.selected),
|
|
405
|
-
e.ns.is("disabled", e.disabled),
|
|
406
|
-
e.ns.is("created", e.created),
|
|
407
|
-
e.ns.is("hovering", e.hovering)
|
|
408
|
-
]),
|
|
409
|
-
onMousemove: t[0] || (t[0] = (...v) => e.hoverItem && e.hoverItem(...v)),
|
|
410
|
-
onClick: t[1] || (t[1] = oe((...v) => e.selectOptionClick && e.selectOptionClick(...v), ["stop"]))
|
|
411
|
-
}, [
|
|
412
|
-
ue(e.$slots, "default", {
|
|
413
|
-
item: e.item,
|
|
414
|
-
index: e.index,
|
|
415
|
-
disabled: e.disabled
|
|
416
|
-
}, () => [
|
|
417
|
-
j(
|
|
418
|
-
"span",
|
|
419
|
-
null,
|
|
420
|
-
me(e.getLabel(e.item)),
|
|
421
|
-
1
|
|
422
|
-
/* TEXT */
|
|
423
|
-
)
|
|
424
|
-
])
|
|
425
|
-
], 46, so);
|
|
426
|
-
}
|
|
427
|
-
var ro = /* @__PURE__ */ St(ao, [["render", io]]), jt = Number.isNaN || function(t) {
|
|
428
|
-
return typeof t == "number" && t !== t;
|
|
429
|
-
};
|
|
430
|
-
function uo(e, t) {
|
|
431
|
-
return !!(e === t || jt(e) && jt(t));
|
|
432
|
-
}
|
|
433
|
-
function co(e, t) {
|
|
434
|
-
if (e.length !== t.length)
|
|
435
|
-
return !1;
|
|
436
|
-
for (var n = 0; n < e.length; n++)
|
|
437
|
-
if (!uo(e[n], t[n]))
|
|
438
|
-
return !1;
|
|
439
|
-
return !0;
|
|
440
|
-
}
|
|
441
|
-
function fo(e, t) {
|
|
442
|
-
t === void 0 && (t = co);
|
|
443
|
-
var n = null;
|
|
444
|
-
function a() {
|
|
445
|
-
for (var r = [], d = 0; d < arguments.length; d++)
|
|
446
|
-
r[d] = arguments[d];
|
|
447
|
-
if (n && n.lastThis === this && t(r, n.lastArgs))
|
|
448
|
-
return n.lastResult;
|
|
449
|
-
var v = e.apply(this, r);
|
|
450
|
-
return n = {
|
|
451
|
-
lastResult: v,
|
|
452
|
-
lastArgs: r,
|
|
453
|
-
lastThis: this
|
|
454
|
-
}, v;
|
|
455
|
-
}
|
|
456
|
-
return a.clear = function() {
|
|
457
|
-
n = null;
|
|
458
|
-
}, a;
|
|
459
|
-
}
|
|
460
|
-
const mo = () => {
|
|
461
|
-
const t = xt().proxy.$props;
|
|
462
|
-
return b(() => {
|
|
463
|
-
const n = (a, r, d) => ({});
|
|
464
|
-
return t.perfMode ? En(n) : fo(n);
|
|
465
|
-
});
|
|
466
|
-
}, vo = 50, Qt = "itemRendered", Zt = "scroll", rl = "forward", ul = "backward", Pe = "auto", cl = "smart", dl = "start", _e = "center", fl = "end", Me = "horizontal", ml = "vertical", po = "ltr", Je = "rtl", vt = "negative", vl = "positive-ascending", pl = "positive-descending", ho = {
|
|
467
|
-
[Me]: "left",
|
|
468
|
-
[ml]: "top"
|
|
469
|
-
}, go = 20, bo = ({ atEndEdge: e, atStartEdge: t, layout: n }, a) => {
|
|
470
|
-
let r, d = 0;
|
|
471
|
-
const v = (y) => y < 0 && t.value || y > 0 && e.value;
|
|
472
|
-
return {
|
|
473
|
-
hasReachedEdge: v,
|
|
474
|
-
onWheel: (y) => {
|
|
475
|
-
il(r);
|
|
476
|
-
let { deltaX: S, deltaY: i } = y;
|
|
477
|
-
y.shiftKey && i !== 0 && (S = i, i = 0);
|
|
478
|
-
const m = n.value === Me ? S : i;
|
|
479
|
-
v(m) || (d += m, !Kn() && m !== 0 && y.preventDefault(), r = sl(() => {
|
|
480
|
-
a(d), d = 0;
|
|
481
|
-
}));
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
}, pt = Ie({
|
|
485
|
-
type: Q([Number, Function]),
|
|
486
|
-
required: !0
|
|
487
|
-
}), ht = Ie({
|
|
488
|
-
type: Number
|
|
489
|
-
}), gt = Ie({
|
|
490
|
-
type: Number,
|
|
491
|
-
default: 2
|
|
492
|
-
}), yo = Ie({
|
|
493
|
-
type: String,
|
|
494
|
-
values: ["ltr", "rtl"],
|
|
495
|
-
default: "ltr"
|
|
496
|
-
}), bt = Ie({
|
|
497
|
-
type: Number,
|
|
498
|
-
default: 0
|
|
499
|
-
}), et = Ie({
|
|
500
|
-
type: Number,
|
|
501
|
-
required: !0
|
|
502
|
-
}), hl = Ie({
|
|
503
|
-
type: String,
|
|
504
|
-
values: ["horizontal", "vertical"],
|
|
505
|
-
default: ml
|
|
506
|
-
}), gl = Re({
|
|
507
|
-
className: {
|
|
508
|
-
type: String,
|
|
509
|
-
default: ""
|
|
510
|
-
},
|
|
511
|
-
containerElement: {
|
|
512
|
-
type: Q([String, Object]),
|
|
513
|
-
default: "div"
|
|
514
|
-
},
|
|
515
|
-
data: {
|
|
516
|
-
type: Q(Array),
|
|
517
|
-
default: () => Un([])
|
|
518
|
-
},
|
|
519
|
-
/**
|
|
520
|
-
* @description controls the horizontal direction.
|
|
521
|
-
*/
|
|
522
|
-
direction: yo,
|
|
523
|
-
height: {
|
|
524
|
-
type: [String, Number],
|
|
525
|
-
required: !0
|
|
526
|
-
},
|
|
527
|
-
innerElement: {
|
|
528
|
-
type: [String, Object],
|
|
529
|
-
default: "div"
|
|
530
|
-
},
|
|
531
|
-
innerProps: {
|
|
532
|
-
type: Q(Object),
|
|
533
|
-
default: () => ({})
|
|
534
|
-
},
|
|
535
|
-
style: {
|
|
536
|
-
type: Q([Object, String, Array])
|
|
537
|
-
},
|
|
538
|
-
useIsScrolling: Boolean,
|
|
539
|
-
width: {
|
|
540
|
-
type: [Number, String],
|
|
541
|
-
required: !1
|
|
542
|
-
},
|
|
543
|
-
perfMode: {
|
|
544
|
-
type: Boolean,
|
|
545
|
-
default: !0
|
|
546
|
-
},
|
|
547
|
-
scrollbarAlwaysOn: Boolean
|
|
548
|
-
}), So = Re({
|
|
549
|
-
/**
|
|
550
|
-
* @description describes how many items should be pre rendered to the head
|
|
551
|
-
* and the tail of the window
|
|
552
|
-
*/
|
|
553
|
-
cache: gt,
|
|
554
|
-
estimatedItemSize: ht,
|
|
555
|
-
/**
|
|
556
|
-
* @description controls the list's orientation
|
|
557
|
-
*/
|
|
558
|
-
layout: hl,
|
|
559
|
-
initScrollOffset: bt,
|
|
560
|
-
/**
|
|
561
|
-
* @description describes the total number of the list.
|
|
562
|
-
*/
|
|
563
|
-
total: et,
|
|
564
|
-
itemSize: pt,
|
|
565
|
-
...gl
|
|
566
|
-
}), yt = {
|
|
567
|
-
type: Number,
|
|
568
|
-
default: 6
|
|
569
|
-
}, bl = { type: Number, default: 0 }, yl = { type: Number, default: 2 };
|
|
570
|
-
Re({
|
|
571
|
-
columnCache: gt,
|
|
572
|
-
columnWidth: pt,
|
|
573
|
-
estimatedColumnWidth: ht,
|
|
574
|
-
estimatedRowHeight: ht,
|
|
575
|
-
initScrollLeft: bt,
|
|
576
|
-
initScrollTop: bt,
|
|
577
|
-
itemKey: {
|
|
578
|
-
type: Q(Function),
|
|
579
|
-
default: ({
|
|
580
|
-
columnIndex: e,
|
|
581
|
-
rowIndex: t
|
|
582
|
-
}) => `${t}:${e}`
|
|
583
|
-
},
|
|
584
|
-
rowCache: gt,
|
|
585
|
-
rowHeight: pt,
|
|
586
|
-
totalColumn: et,
|
|
587
|
-
totalRow: et,
|
|
588
|
-
hScrollbarSize: yt,
|
|
589
|
-
vScrollbarSize: yt,
|
|
590
|
-
scrollbarStartGap: bl,
|
|
591
|
-
scrollbarEndGap: yl,
|
|
592
|
-
role: String,
|
|
593
|
-
...gl
|
|
594
|
-
});
|
|
595
|
-
const wo = Re({
|
|
596
|
-
alwaysOn: Boolean,
|
|
597
|
-
class: String,
|
|
598
|
-
layout: hl,
|
|
599
|
-
total: et,
|
|
600
|
-
ratio: {
|
|
601
|
-
type: Number,
|
|
602
|
-
required: !0
|
|
603
|
-
},
|
|
604
|
-
clientSize: {
|
|
605
|
-
type: Number,
|
|
606
|
-
required: !0
|
|
607
|
-
},
|
|
608
|
-
scrollFrom: {
|
|
609
|
-
type: Number,
|
|
610
|
-
required: !0
|
|
611
|
-
},
|
|
612
|
-
scrollbarSize: yt,
|
|
613
|
-
startGap: bl,
|
|
614
|
-
endGap: yl,
|
|
615
|
-
visible: Boolean
|
|
616
|
-
}), ct = (e, t) => e < t ? rl : ul, He = (e) => e === po || e === Je || e === Me;
|
|
617
|
-
let Ee = null;
|
|
618
|
-
function Yt(e = !1) {
|
|
619
|
-
if (Ee === null || e) {
|
|
620
|
-
const t = document.createElement("div"), n = t.style;
|
|
621
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
622
|
-
const a = document.createElement("div"), r = a.style;
|
|
623
|
-
return r.width = "100px", r.height = "100px", t.appendChild(a), document.body.appendChild(t), t.scrollLeft > 0 ? Ee = pl : (t.scrollLeft = 1, t.scrollLeft === 0 ? Ee = vt : Ee = vl), document.body.removeChild(t), Ee;
|
|
624
|
-
}
|
|
625
|
-
return Ee;
|
|
626
|
-
}
|
|
627
|
-
function Oo({ move: e, size: t, bar: n }, a) {
|
|
628
|
-
const r = {}, d = `translate${n.axis}(${e}px)`;
|
|
629
|
-
return r[n.size] = t, r.transform = d, a === "horizontal" ? r.height = "100%" : r.width = "100%", r;
|
|
630
|
-
}
|
|
631
|
-
const Io = Ce({
|
|
632
|
-
name: "ElVirtualScrollBar",
|
|
633
|
-
props: wo,
|
|
634
|
-
emits: ["scroll", "start-move", "stop-move"],
|
|
635
|
-
setup(e, { emit: t }) {
|
|
636
|
-
const n = b(() => e.startGap + e.endGap), a = be("virtual-scrollbar"), r = be("scrollbar"), d = L(), v = L();
|
|
637
|
-
let h = null, y = null;
|
|
638
|
-
const S = xe({
|
|
639
|
-
isDragging: !1,
|
|
640
|
-
traveled: 0
|
|
641
|
-
}), i = b(() => hn[e.layout]), m = b(() => e.clientSize - T(n)), V = b(() => ({
|
|
642
|
-
position: "absolute",
|
|
643
|
-
width: `${Me === e.layout ? m.value : e.scrollbarSize}px`,
|
|
644
|
-
height: `${Me === e.layout ? e.scrollbarSize : m.value}px`,
|
|
645
|
-
[ho[e.layout]]: "2px",
|
|
646
|
-
right: "2px",
|
|
647
|
-
bottom: "2px",
|
|
648
|
-
borderRadius: "4px"
|
|
649
|
-
})), u = b(() => {
|
|
650
|
-
const w = e.ratio;
|
|
651
|
-
if (w >= 100)
|
|
652
|
-
return Number.POSITIVE_INFINITY;
|
|
653
|
-
if (w >= 50)
|
|
654
|
-
return w * m.value / 100;
|
|
655
|
-
const D = m.value / 3;
|
|
656
|
-
return Math.floor(
|
|
657
|
-
Math.min(
|
|
658
|
-
Math.max(w * m.value / 100, go),
|
|
659
|
-
D
|
|
660
|
-
)
|
|
661
|
-
);
|
|
662
|
-
}), M = b(() => {
|
|
663
|
-
if (!Number.isFinite(u.value))
|
|
664
|
-
return {
|
|
665
|
-
display: "none"
|
|
666
|
-
};
|
|
667
|
-
const w = `${u.value}px`;
|
|
668
|
-
return Oo(
|
|
669
|
-
{
|
|
670
|
-
bar: i.value,
|
|
671
|
-
size: w,
|
|
672
|
-
move: S.traveled
|
|
673
|
-
},
|
|
674
|
-
e.layout
|
|
675
|
-
);
|
|
676
|
-
}), C = b(
|
|
677
|
-
() => Math.ceil(e.clientSize - u.value - T(n))
|
|
678
|
-
), o = () => {
|
|
679
|
-
window.addEventListener("mousemove", E), window.addEventListener("mouseup", J);
|
|
680
|
-
const w = T(v);
|
|
681
|
-
w && (y = document.onselectstart, document.onselectstart = () => !1, w.addEventListener("touchmove", E, { passive: !0 }), w.addEventListener("touchend", J));
|
|
682
|
-
}, B = () => {
|
|
683
|
-
window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", J), document.onselectstart = y, y = null;
|
|
684
|
-
const w = T(v);
|
|
685
|
-
w && (w.removeEventListener("touchmove", E), w.removeEventListener("touchend", J));
|
|
686
|
-
}, te = (w) => {
|
|
687
|
-
w.stopImmediatePropagation(), !(w.ctrlKey || [1, 2].includes(w.button)) && (S.isDragging = !0, S[i.value.axis] = w.currentTarget[i.value.offset] - (w[i.value.client] - w.currentTarget.getBoundingClientRect()[i.value.direction]), t("start-move"), o());
|
|
688
|
-
}, J = () => {
|
|
689
|
-
S.isDragging = !1, S[i.value.axis] = 0, t("stop-move"), B();
|
|
690
|
-
}, E = (w) => {
|
|
691
|
-
const { isDragging: D } = S;
|
|
692
|
-
if (!D || !v.value || !d.value) return;
|
|
693
|
-
const le = S[i.value.axis];
|
|
694
|
-
if (!le) return;
|
|
695
|
-
il(h);
|
|
696
|
-
const Z = (d.value.getBoundingClientRect()[i.value.direction] - w[i.value.client]) * -1, G = v.value[i.value.offset] - le, O = Z - G;
|
|
697
|
-
h = sl(() => {
|
|
698
|
-
S.traveled = Math.max(0, Math.min(O, C.value)), t("scroll", O, C.value);
|
|
699
|
-
});
|
|
700
|
-
}, ee = (w) => {
|
|
701
|
-
const D = Math.abs(
|
|
702
|
-
w.target.getBoundingClientRect()[i.value.direction] - w[i.value.client]
|
|
703
|
-
), le = v.value[i.value.offset] / 2, Z = D - le;
|
|
704
|
-
S.traveled = Math.max(0, Math.min(Z, C.value)), t("scroll", Z, C.value);
|
|
705
|
-
};
|
|
706
|
-
return ve(
|
|
707
|
-
() => e.scrollFrom,
|
|
708
|
-
(w) => {
|
|
709
|
-
S.isDragging || (S.traveled = Math.ceil(w * C.value));
|
|
710
|
-
}
|
|
711
|
-
), ln(() => {
|
|
712
|
-
B();
|
|
713
|
-
}), () => we(
|
|
714
|
-
"div",
|
|
715
|
-
{
|
|
716
|
-
role: "presentation",
|
|
717
|
-
ref: d,
|
|
718
|
-
class: [
|
|
719
|
-
a.b(),
|
|
720
|
-
e.class,
|
|
721
|
-
(e.alwaysOn || S.isDragging) && "always-on"
|
|
722
|
-
],
|
|
723
|
-
style: V.value,
|
|
724
|
-
onMousedown: oe(ee, [
|
|
725
|
-
"stop",
|
|
726
|
-
"prevent"
|
|
727
|
-
]),
|
|
728
|
-
onTouchstartPrevent: te
|
|
729
|
-
},
|
|
730
|
-
we(
|
|
731
|
-
"div",
|
|
732
|
-
{
|
|
733
|
-
ref: v,
|
|
734
|
-
class: r.e("thumb"),
|
|
735
|
-
style: M.value,
|
|
736
|
-
onMousedown: te
|
|
737
|
-
},
|
|
738
|
-
[]
|
|
739
|
-
)
|
|
740
|
-
);
|
|
741
|
-
}
|
|
742
|
-
}), Sl = ({
|
|
743
|
-
name: e,
|
|
744
|
-
getOffset: t,
|
|
745
|
-
getItemSize: n,
|
|
746
|
-
getItemOffset: a,
|
|
747
|
-
getEstimatedTotalSize: r,
|
|
748
|
-
getStartIndexForOffset: d,
|
|
749
|
-
getStopIndexForStartIndex: v,
|
|
750
|
-
initCache: h,
|
|
751
|
-
clearCache: y,
|
|
752
|
-
validateProps: S
|
|
753
|
-
}) => Ce({
|
|
754
|
-
name: e ?? "ElVirtualList",
|
|
755
|
-
props: So,
|
|
756
|
-
emits: [Qt, Zt],
|
|
757
|
-
setup(i, { emit: m, expose: V }) {
|
|
758
|
-
S(i);
|
|
759
|
-
const u = xt(), M = be("vl"), C = L(h(i, u)), o = mo(), B = L(), te = L(), J = L(), E = L({
|
|
760
|
-
isScrolling: !1,
|
|
761
|
-
scrollDir: "forward",
|
|
762
|
-
scrollOffset: Oe(i.initScrollOffset) ? i.initScrollOffset : 0,
|
|
763
|
-
updateRequested: !1,
|
|
764
|
-
isScrollbarDragging: !1,
|
|
765
|
-
scrollbarAlwaysOn: i.scrollbarAlwaysOn
|
|
766
|
-
}), ee = b(() => {
|
|
767
|
-
const { total: f, cache: g } = i, { isScrolling: R, scrollDir: P, scrollOffset: z } = T(E);
|
|
768
|
-
if (f === 0)
|
|
769
|
-
return [0, 0, 0, 0];
|
|
770
|
-
const W = d(
|
|
771
|
-
i,
|
|
772
|
-
z,
|
|
773
|
-
T(C)
|
|
774
|
-
), H = v(
|
|
775
|
-
i,
|
|
776
|
-
W,
|
|
777
|
-
z,
|
|
778
|
-
T(C)
|
|
779
|
-
), pe = !R || P === ul ? Math.max(1, g) : 1, fe = !R || P === rl ? Math.max(1, g) : 1;
|
|
780
|
-
return [
|
|
781
|
-
Math.max(0, W - pe),
|
|
782
|
-
Math.max(0, Math.min(f - 1, H + fe)),
|
|
783
|
-
W,
|
|
784
|
-
H
|
|
785
|
-
];
|
|
786
|
-
}), w = b(
|
|
787
|
-
() => r(i, T(C))
|
|
788
|
-
), D = b(() => He(i.layout)), le = b(() => [
|
|
789
|
-
{
|
|
790
|
-
position: "relative",
|
|
791
|
-
[`overflow-${D.value ? "x" : "y"}`]: "scroll",
|
|
792
|
-
WebkitOverflowScrolling: "touch",
|
|
793
|
-
willChange: "transform"
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
direction: i.direction,
|
|
797
|
-
height: Oe(i.height) ? `${i.height}px` : i.height,
|
|
798
|
-
width: Oe(i.width) ? `${i.width}px` : i.width
|
|
799
|
-
},
|
|
800
|
-
i.style
|
|
801
|
-
]), Z = b(() => {
|
|
802
|
-
const f = T(w), g = T(D);
|
|
803
|
-
return {
|
|
804
|
-
height: g ? "100%" : `${f}px`,
|
|
805
|
-
pointerEvents: T(E).isScrolling ? "none" : void 0,
|
|
806
|
-
width: g ? `${f}px` : "100%",
|
|
807
|
-
// fix scrolling issues in Firefox.
|
|
808
|
-
margin: 0,
|
|
809
|
-
boxSizing: "border-box"
|
|
810
|
-
};
|
|
811
|
-
}), G = b(
|
|
812
|
-
() => D.value ? i.width : i.height
|
|
813
|
-
), { onWheel: O } = bo(
|
|
814
|
-
{
|
|
815
|
-
atStartEdge: b(() => E.value.scrollOffset <= 0),
|
|
816
|
-
atEndEdge: b(
|
|
817
|
-
() => E.value.scrollOffset >= w.value
|
|
818
|
-
),
|
|
819
|
-
layout: b(() => i.layout)
|
|
820
|
-
},
|
|
821
|
-
(f) => {
|
|
822
|
-
var g, R;
|
|
823
|
-
(R = (g = J.value).onMouseUp) == null || R.call(g), k(
|
|
824
|
-
Math.min(
|
|
825
|
-
E.value.scrollOffset + f,
|
|
826
|
-
w.value - G.value
|
|
827
|
-
)
|
|
828
|
-
);
|
|
829
|
-
}
|
|
830
|
-
);
|
|
831
|
-
Pn(B, "wheel", O, {
|
|
832
|
-
passive: !1
|
|
833
|
-
});
|
|
834
|
-
const I = () => {
|
|
835
|
-
const { total: f } = i;
|
|
836
|
-
if (f > 0) {
|
|
837
|
-
const [z, W, H, pe] = T(ee);
|
|
838
|
-
m(Qt, z, W, H, pe);
|
|
839
|
-
}
|
|
840
|
-
const { scrollDir: g, scrollOffset: R, updateRequested: P } = T(E);
|
|
841
|
-
m(Zt, g, R, P);
|
|
842
|
-
}, $ = (f) => {
|
|
843
|
-
const { clientHeight: g, scrollHeight: R, scrollTop: P } = f.currentTarget, z = T(E);
|
|
844
|
-
if (z.scrollOffset === P)
|
|
845
|
-
return;
|
|
846
|
-
const W = Math.max(
|
|
847
|
-
0,
|
|
848
|
-
Math.min(P, R - g)
|
|
849
|
-
);
|
|
850
|
-
E.value = {
|
|
851
|
-
...z,
|
|
852
|
-
isScrolling: !0,
|
|
853
|
-
scrollDir: ct(z.scrollOffset, W),
|
|
854
|
-
scrollOffset: W,
|
|
855
|
-
updateRequested: !1
|
|
856
|
-
}, ae(ie);
|
|
857
|
-
}, q = (f) => {
|
|
858
|
-
const { clientWidth: g, scrollLeft: R, scrollWidth: P } = f.currentTarget, z = T(E);
|
|
859
|
-
if (z.scrollOffset === R)
|
|
860
|
-
return;
|
|
861
|
-
const { direction: W } = i;
|
|
862
|
-
let H = R;
|
|
863
|
-
if (W === Je)
|
|
864
|
-
switch (Yt()) {
|
|
865
|
-
case vt: {
|
|
866
|
-
H = -R;
|
|
867
|
-
break;
|
|
868
|
-
}
|
|
869
|
-
case pl: {
|
|
870
|
-
H = P - g - R;
|
|
871
|
-
break;
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
H = Math.max(
|
|
875
|
-
0,
|
|
876
|
-
Math.min(H, P - g)
|
|
877
|
-
), E.value = {
|
|
878
|
-
...z,
|
|
879
|
-
isScrolling: !0,
|
|
880
|
-
scrollDir: ct(z.scrollOffset, H),
|
|
881
|
-
scrollOffset: H,
|
|
882
|
-
updateRequested: !1
|
|
883
|
-
}, ae(ie);
|
|
884
|
-
}, U = (f) => {
|
|
885
|
-
T(D) ? q(f) : $(f), I();
|
|
886
|
-
}, x = (f, g) => {
|
|
887
|
-
const R = (w.value - G.value) / g * f;
|
|
888
|
-
k(
|
|
889
|
-
Math.min(
|
|
890
|
-
w.value - G.value,
|
|
891
|
-
R
|
|
892
|
-
)
|
|
893
|
-
);
|
|
894
|
-
}, k = (f) => {
|
|
895
|
-
f = Math.max(f, 0), f !== T(E).scrollOffset && (E.value = {
|
|
896
|
-
...T(E),
|
|
897
|
-
scrollOffset: f,
|
|
898
|
-
scrollDir: ct(T(E).scrollOffset, f),
|
|
899
|
-
updateRequested: !0
|
|
900
|
-
}, ae(ie));
|
|
901
|
-
}, Y = (f, g = Pe) => {
|
|
902
|
-
const { scrollOffset: R } = T(E);
|
|
903
|
-
f = Math.max(0, Math.min(f, i.total - 1)), k(
|
|
904
|
-
t(
|
|
905
|
-
i,
|
|
906
|
-
f,
|
|
907
|
-
g,
|
|
908
|
-
R,
|
|
909
|
-
T(C)
|
|
910
|
-
)
|
|
911
|
-
);
|
|
912
|
-
}, se = (f) => {
|
|
913
|
-
const { direction: g, itemSize: R, layout: P } = i, z = o.value(
|
|
914
|
-
y && R,
|
|
915
|
-
y && P,
|
|
916
|
-
y && g
|
|
917
|
-
);
|
|
918
|
-
let W;
|
|
919
|
-
if (Rn(z, String(f)))
|
|
920
|
-
W = z[f];
|
|
921
|
-
else {
|
|
922
|
-
const H = a(i, f, T(C)), pe = n(i, f, T(C)), fe = T(D), We = g === Je, ze = fe ? H : 0;
|
|
923
|
-
z[f] = W = {
|
|
924
|
-
position: "absolute",
|
|
925
|
-
left: We ? void 0 : `${ze}px`,
|
|
926
|
-
right: We ? `${ze}px` : void 0,
|
|
927
|
-
top: fe ? 0 : `${H}px`,
|
|
928
|
-
height: fe ? "100%" : `${pe}px`,
|
|
929
|
-
width: fe ? `${pe}px` : "100%"
|
|
930
|
-
};
|
|
931
|
-
}
|
|
932
|
-
return W;
|
|
933
|
-
}, ie = () => {
|
|
934
|
-
E.value.isScrolling = !1, ae(() => {
|
|
935
|
-
o.value(-1, null, null);
|
|
936
|
-
});
|
|
937
|
-
}, A = () => {
|
|
938
|
-
const f = B.value;
|
|
939
|
-
f && (f.scrollTop = 0);
|
|
940
|
-
};
|
|
941
|
-
_t(() => {
|
|
942
|
-
if (!wt) return;
|
|
943
|
-
const { initScrollOffset: f } = i, g = T(B);
|
|
944
|
-
Oe(f) && g && (T(D) ? g.scrollLeft = f : g.scrollTop = f), I();
|
|
945
|
-
}), nn(() => {
|
|
946
|
-
const { direction: f, layout: g } = i, { scrollOffset: R, updateRequested: P } = T(E), z = T(B);
|
|
947
|
-
if (P && z)
|
|
948
|
-
if (g === Me)
|
|
949
|
-
if (f === Je)
|
|
950
|
-
switch (Yt()) {
|
|
951
|
-
case vt: {
|
|
952
|
-
z.scrollLeft = -R;
|
|
953
|
-
break;
|
|
954
|
-
}
|
|
955
|
-
case vl: {
|
|
956
|
-
z.scrollLeft = R;
|
|
957
|
-
break;
|
|
958
|
-
}
|
|
959
|
-
default: {
|
|
960
|
-
const { clientWidth: W, scrollWidth: H } = z;
|
|
961
|
-
z.scrollLeft = H - W - R;
|
|
962
|
-
break;
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
else
|
|
966
|
-
z.scrollLeft = R;
|
|
967
|
-
else
|
|
968
|
-
z.scrollTop = R;
|
|
969
|
-
}), on(() => {
|
|
970
|
-
T(B).scrollTop = T(E).scrollOffset;
|
|
971
|
-
});
|
|
972
|
-
const re = {
|
|
973
|
-
ns: M,
|
|
974
|
-
clientSize: G,
|
|
975
|
-
estimatedTotalSize: w,
|
|
976
|
-
windowStyle: le,
|
|
977
|
-
windowRef: B,
|
|
978
|
-
innerRef: te,
|
|
979
|
-
innerStyle: Z,
|
|
980
|
-
itemsToRender: ee,
|
|
981
|
-
scrollbarRef: J,
|
|
982
|
-
states: E,
|
|
983
|
-
getItemStyle: se,
|
|
984
|
-
onScroll: U,
|
|
985
|
-
onScrollbarScroll: x,
|
|
986
|
-
onWheel: O,
|
|
987
|
-
scrollTo: k,
|
|
988
|
-
scrollToItem: Y,
|
|
989
|
-
resetScrollTop: A
|
|
990
|
-
};
|
|
991
|
-
return V({
|
|
992
|
-
windowRef: B,
|
|
993
|
-
innerRef: te,
|
|
994
|
-
getItemStyleCache: o,
|
|
995
|
-
scrollTo: k,
|
|
996
|
-
scrollToItem: Y,
|
|
997
|
-
resetScrollTop: A,
|
|
998
|
-
states: E
|
|
999
|
-
}), re;
|
|
1000
|
-
},
|
|
1001
|
-
render(i) {
|
|
1002
|
-
var m;
|
|
1003
|
-
const {
|
|
1004
|
-
$slots: V,
|
|
1005
|
-
className: u,
|
|
1006
|
-
clientSize: M,
|
|
1007
|
-
containerElement: C,
|
|
1008
|
-
data: o,
|
|
1009
|
-
getItemStyle: B,
|
|
1010
|
-
innerElement: te,
|
|
1011
|
-
itemsToRender: J,
|
|
1012
|
-
innerStyle: E,
|
|
1013
|
-
layout: ee,
|
|
1014
|
-
total: w,
|
|
1015
|
-
onScroll: D,
|
|
1016
|
-
onScrollbarScroll: le,
|
|
1017
|
-
states: Z,
|
|
1018
|
-
useIsScrolling: G,
|
|
1019
|
-
windowStyle: O,
|
|
1020
|
-
ns: I
|
|
1021
|
-
} = i, [$, q] = J, U = Be(C), x = Be(te), k = [];
|
|
1022
|
-
if (w > 0)
|
|
1023
|
-
for (let A = $; A <= q; A++)
|
|
1024
|
-
k.push(
|
|
1025
|
-
we(
|
|
1026
|
-
dt,
|
|
1027
|
-
{ key: A },
|
|
1028
|
-
(m = V.default) == null ? void 0 : m.call(V, {
|
|
1029
|
-
data: o,
|
|
1030
|
-
index: A,
|
|
1031
|
-
isScrolling: G ? Z.isScrolling : void 0,
|
|
1032
|
-
style: B(A)
|
|
1033
|
-
})
|
|
1034
|
-
)
|
|
1035
|
-
);
|
|
1036
|
-
const Y = [
|
|
1037
|
-
we(
|
|
1038
|
-
x,
|
|
1039
|
-
ft(i.innerProps, {
|
|
1040
|
-
style: E,
|
|
1041
|
-
ref: "innerRef"
|
|
1042
|
-
}),
|
|
1043
|
-
mt(x) ? k : {
|
|
1044
|
-
default: () => k
|
|
1045
|
-
}
|
|
1046
|
-
)
|
|
1047
|
-
], se = we(Io, {
|
|
1048
|
-
ref: "scrollbarRef",
|
|
1049
|
-
clientSize: M,
|
|
1050
|
-
layout: ee,
|
|
1051
|
-
onScroll: le,
|
|
1052
|
-
ratio: M * 100 / this.estimatedTotalSize,
|
|
1053
|
-
scrollFrom: Z.scrollOffset / (this.estimatedTotalSize - M),
|
|
1054
|
-
total: w,
|
|
1055
|
-
alwaysOn: Z.scrollbarAlwaysOn
|
|
1056
|
-
}), ie = we(
|
|
1057
|
-
U,
|
|
1058
|
-
{
|
|
1059
|
-
class: [I.e("window"), u],
|
|
1060
|
-
style: O,
|
|
1061
|
-
onScroll: D,
|
|
1062
|
-
ref: "windowRef",
|
|
1063
|
-
key: 0
|
|
1064
|
-
},
|
|
1065
|
-
mt(U) ? [Y] : { default: () => [Y] }
|
|
1066
|
-
);
|
|
1067
|
-
return we(
|
|
1068
|
-
"div",
|
|
1069
|
-
{
|
|
1070
|
-
key: 0,
|
|
1071
|
-
class: [I.e("wrapper"), Z.scrollbarAlwaysOn ? "always-on" : ""]
|
|
1072
|
-
},
|
|
1073
|
-
[ie, se]
|
|
1074
|
-
);
|
|
1075
|
-
}
|
|
1076
|
-
}), Vo = Sl({
|
|
1077
|
-
name: "ElFixedSizeList",
|
|
1078
|
-
getItemOffset: ({ itemSize: e }, t) => t * e,
|
|
1079
|
-
getItemSize: ({ itemSize: e }) => e,
|
|
1080
|
-
getEstimatedTotalSize: ({ total: e, itemSize: t }) => t * e,
|
|
1081
|
-
getOffset: ({ height: e, total: t, itemSize: n, layout: a, width: r }, d, v, h) => {
|
|
1082
|
-
const y = He(a) ? r : e;
|
|
1083
|
-
process.env.NODE_ENV !== "production" && mt(y) && ll(
|
|
1084
|
-
"[ElVirtualList]",
|
|
1085
|
-
`
|
|
1086
|
-
You should set
|
|
1087
|
-
width/height
|
|
1088
|
-
to number when your layout is
|
|
1089
|
-
horizontal/vertical
|
|
1090
|
-
`
|
|
1091
|
-
);
|
|
1092
|
-
const S = Math.max(0, t * n - y), i = Math.min(S, d * n), m = Math.max(0, (d + 1) * n - y);
|
|
1093
|
-
switch (v === cl && (h >= m - y && h <= i + y ? v = Pe : v = _e), v) {
|
|
1094
|
-
case dl:
|
|
1095
|
-
return i;
|
|
1096
|
-
case fl:
|
|
1097
|
-
return m;
|
|
1098
|
-
case _e: {
|
|
1099
|
-
const V = Math.round(m + (i - m) / 2);
|
|
1100
|
-
return V < Math.ceil(y / 2) ? 0 : V > S + Math.floor(y / 2) ? S : V;
|
|
1101
|
-
}
|
|
1102
|
-
case Pe:
|
|
1103
|
-
default:
|
|
1104
|
-
return h >= m && h <= i ? h : h < m ? m : i;
|
|
1105
|
-
}
|
|
1106
|
-
},
|
|
1107
|
-
getStartIndexForOffset: ({ total: e, itemSize: t }, n) => Math.max(0, Math.min(e - 1, Math.floor(n / t))),
|
|
1108
|
-
getStopIndexForStartIndex: ({ height: e, total: t, itemSize: n, layout: a, width: r }, d, v) => {
|
|
1109
|
-
const h = d * n, y = He(a) ? r : e, S = Math.ceil(
|
|
1110
|
-
(y + v - h) / n
|
|
1111
|
-
);
|
|
1112
|
-
return Math.max(
|
|
1113
|
-
0,
|
|
1114
|
-
Math.min(
|
|
1115
|
-
t - 1,
|
|
1116
|
-
// because startIndex is inclusive, so in order to prevent array outbound indexing
|
|
1117
|
-
// we need to - 1 to prevent outbound behavior
|
|
1118
|
-
d + S - 1
|
|
1119
|
-
)
|
|
1120
|
-
);
|
|
1121
|
-
},
|
|
1122
|
-
/**
|
|
1123
|
-
* Fixed size list does not need this cache
|
|
1124
|
-
* Using any to bypass it, TODO: Using type inference to fix this.
|
|
1125
|
-
*/
|
|
1126
|
-
initCache() {
|
|
1127
|
-
},
|
|
1128
|
-
clearCache: !0,
|
|
1129
|
-
validateProps() {
|
|
1130
|
-
}
|
|
1131
|
-
}), Eo = "ElDynamicSizeList", Te = (e, t, n) => {
|
|
1132
|
-
const { itemSize: a } = e, { items: r, lastVisitedIndex: d } = n;
|
|
1133
|
-
if (t > d) {
|
|
1134
|
-
let v = 0;
|
|
1135
|
-
if (d >= 0) {
|
|
1136
|
-
const h = r[d];
|
|
1137
|
-
v = h.offset + h.size;
|
|
1138
|
-
}
|
|
1139
|
-
for (let h = d + 1; h <= t; h++) {
|
|
1140
|
-
const y = a(h);
|
|
1141
|
-
r[h] = {
|
|
1142
|
-
offset: v,
|
|
1143
|
-
size: y
|
|
1144
|
-
}, v += y;
|
|
1145
|
-
}
|
|
1146
|
-
n.lastVisitedIndex = t;
|
|
1147
|
-
}
|
|
1148
|
-
return r[t];
|
|
1149
|
-
}, To = (e, t, n) => {
|
|
1150
|
-
const { items: a, lastVisitedIndex: r } = t;
|
|
1151
|
-
return (r > 0 ? a[r].offset : 0) >= n ? wl(e, t, 0, r, n) : Mo(e, t, Math.max(0, r), n);
|
|
1152
|
-
}, wl = (e, t, n, a, r) => {
|
|
1153
|
-
for (; n <= a; ) {
|
|
1154
|
-
const d = n + Math.floor((a - n) / 2), v = Te(e, d, t).offset;
|
|
1155
|
-
if (v === r)
|
|
1156
|
-
return d;
|
|
1157
|
-
v < r ? n = d + 1 : v > r && (a = d - 1);
|
|
1158
|
-
}
|
|
1159
|
-
return Math.max(0, n - 1);
|
|
1160
|
-
}, Mo = (e, t, n, a) => {
|
|
1161
|
-
const { total: r } = e;
|
|
1162
|
-
let d = 1;
|
|
1163
|
-
for (; n < r && Te(e, n, t).offset < a; )
|
|
1164
|
-
n += d, d *= 2;
|
|
1165
|
-
return wl(
|
|
1166
|
-
e,
|
|
1167
|
-
t,
|
|
1168
|
-
Math.floor(n / 2),
|
|
1169
|
-
Math.min(n, r - 1),
|
|
1170
|
-
a
|
|
1171
|
-
);
|
|
1172
|
-
}, Xt = ({ total: e }, { items: t, estimatedItemSize: n, lastVisitedIndex: a }) => {
|
|
1173
|
-
let r = 0;
|
|
1174
|
-
if (a >= e && (a = e - 1), a >= 0) {
|
|
1175
|
-
const h = t[a];
|
|
1176
|
-
r = h.offset + h.size;
|
|
1177
|
-
}
|
|
1178
|
-
const v = (e - a - 1) * n;
|
|
1179
|
-
return r + v;
|
|
1180
|
-
}, Co = Sl({
|
|
1181
|
-
name: "ElDynamicSizeList",
|
|
1182
|
-
getItemOffset: (e, t, n) => Te(e, t, n).offset,
|
|
1183
|
-
getItemSize: (e, t, { items: n }) => n[t].size,
|
|
1184
|
-
getEstimatedTotalSize: Xt,
|
|
1185
|
-
getOffset: (e, t, n, a, r) => {
|
|
1186
|
-
const { height: d, layout: v, width: h } = e, y = He(v) ? h : d, S = Te(e, t, r), i = Xt(e, r), m = Math.max(
|
|
1187
|
-
0,
|
|
1188
|
-
Math.min(i - y, S.offset)
|
|
1189
|
-
), V = Math.max(0, S.offset - y + S.size);
|
|
1190
|
-
switch (n === cl && (a >= V - y && a <= m + y ? n = Pe : n = _e), n) {
|
|
1191
|
-
case dl:
|
|
1192
|
-
return m;
|
|
1193
|
-
case fl:
|
|
1194
|
-
return V;
|
|
1195
|
-
case _e:
|
|
1196
|
-
return Math.round(V + (m - V) / 2);
|
|
1197
|
-
case Pe:
|
|
1198
|
-
default:
|
|
1199
|
-
return a >= V && a <= m ? a : a < V ? V : m;
|
|
1200
|
-
}
|
|
1201
|
-
},
|
|
1202
|
-
getStartIndexForOffset: (e, t, n) => To(e, n, t),
|
|
1203
|
-
getStopIndexForStartIndex: (e, t, n, a) => {
|
|
1204
|
-
const { height: r, total: d, layout: v, width: h } = e, y = He(v) ? h : r, S = Te(e, t, a), i = n + y;
|
|
1205
|
-
let m = S.offset + S.size, V = t;
|
|
1206
|
-
for (; V < d - 1 && m < i; )
|
|
1207
|
-
V++, m += Te(e, V, a).size;
|
|
1208
|
-
return V;
|
|
1209
|
-
},
|
|
1210
|
-
initCache({ estimatedItemSize: e = vo }, t) {
|
|
1211
|
-
const n = {
|
|
1212
|
-
items: {},
|
|
1213
|
-
estimatedItemSize: e,
|
|
1214
|
-
lastVisitedIndex: -1
|
|
1215
|
-
};
|
|
1216
|
-
return n.clearCacheAfterIndex = (a, r = !0) => {
|
|
1217
|
-
var d, v;
|
|
1218
|
-
n.lastVisitedIndex = Math.min(n.lastVisitedIndex, a - 1), (d = t.exposed) == null || d.getItemStyleCache(-1), r && ((v = t.proxy) == null || v.$forceUpdate());
|
|
1219
|
-
}, n;
|
|
1220
|
-
},
|
|
1221
|
-
clearCache: !1,
|
|
1222
|
-
validateProps: ({ itemSize: e }) => {
|
|
1223
|
-
process.env.NODE_ENV !== "production" && typeof e != "function" && ll(
|
|
1224
|
-
Eo,
|
|
1225
|
-
`
|
|
1226
|
-
itemSize is required as function, but the given value was ${typeof e}
|
|
1227
|
-
`
|
|
1228
|
-
);
|
|
1229
|
-
}
|
|
1230
|
-
}), Ro = {
|
|
1231
|
-
loading: Boolean,
|
|
1232
|
-
data: {
|
|
1233
|
-
type: Array,
|
|
1234
|
-
required: !0
|
|
1235
|
-
},
|
|
1236
|
-
hoveringIndex: Number,
|
|
1237
|
-
width: Number,
|
|
1238
|
-
id: String,
|
|
1239
|
-
ariaLabel: String
|
|
1240
|
-
};
|
|
1241
|
-
var zo = /* @__PURE__ */ Ce({
|
|
1242
|
-
name: "ElSelectDropdown",
|
|
1243
|
-
props: Ro,
|
|
1244
|
-
setup(e, {
|
|
1245
|
-
slots: t,
|
|
1246
|
-
expose: n
|
|
1247
|
-
}) {
|
|
1248
|
-
const a = Jt(Ot), r = be("select"), {
|
|
1249
|
-
getLabel: d,
|
|
1250
|
-
getValue: v,
|
|
1251
|
-
getDisabled: h
|
|
1252
|
-
} = tt(a.props), y = L([]), S = L(), i = b(() => e.data.length);
|
|
1253
|
-
ve(() => i.value, () => {
|
|
1254
|
-
var O, I;
|
|
1255
|
-
(I = (O = a.tooltipRef.value) == null ? void 0 : O.updatePopper) == null || I.call(O);
|
|
1256
|
-
});
|
|
1257
|
-
const m = b(() => nl(a.props.estimatedOptionHeight)), V = b(() => m.value ? {
|
|
1258
|
-
itemSize: a.props.itemHeight
|
|
1259
|
-
} : {
|
|
1260
|
-
estimatedSize: a.props.estimatedOptionHeight,
|
|
1261
|
-
itemSize: (O) => y.value[O]
|
|
1262
|
-
}), u = (O = [], I) => {
|
|
1263
|
-
const {
|
|
1264
|
-
props: {
|
|
1265
|
-
valueKey: $
|
|
1266
|
-
}
|
|
1267
|
-
} = a;
|
|
1268
|
-
return Fe(I) ? O && O.some((q) => an(ge(q, $)) === ge(I, $)) : O.includes(I);
|
|
1269
|
-
}, M = (O, I) => {
|
|
1270
|
-
if (Fe(I)) {
|
|
1271
|
-
const {
|
|
1272
|
-
valueKey: $
|
|
1273
|
-
} = a.props;
|
|
1274
|
-
return ge(O, $) === ge(I, $);
|
|
1275
|
-
} else
|
|
1276
|
-
return O === I;
|
|
1277
|
-
}, C = (O, I) => a.props.multiple ? u(O, v(I)) : M(O, v(I)), o = (O, I) => {
|
|
1278
|
-
const {
|
|
1279
|
-
disabled: $,
|
|
1280
|
-
multiple: q,
|
|
1281
|
-
multipleLimit: U
|
|
1282
|
-
} = a.props;
|
|
1283
|
-
return $ || !I && (q ? U > 0 && O.length >= U : !1);
|
|
1284
|
-
}, B = (O) => e.hoveringIndex === O;
|
|
1285
|
-
n({
|
|
1286
|
-
listRef: S,
|
|
1287
|
-
isSized: m,
|
|
1288
|
-
isItemDisabled: o,
|
|
1289
|
-
isItemHovering: B,
|
|
1290
|
-
isItemSelected: C,
|
|
1291
|
-
scrollToItem: (O) => {
|
|
1292
|
-
const I = S.value;
|
|
1293
|
-
I && I.scrollToItem(O);
|
|
1294
|
-
},
|
|
1295
|
-
resetScrollTop: () => {
|
|
1296
|
-
const O = S.value;
|
|
1297
|
-
O && O.resetScrollTop();
|
|
1298
|
-
}
|
|
1299
|
-
});
|
|
1300
|
-
const ee = (O) => {
|
|
1301
|
-
const {
|
|
1302
|
-
index: I,
|
|
1303
|
-
data: $,
|
|
1304
|
-
style: q
|
|
1305
|
-
} = O, U = T(m), {
|
|
1306
|
-
itemSize: x,
|
|
1307
|
-
estimatedSize: k
|
|
1308
|
-
} = T(V), {
|
|
1309
|
-
modelValue: Y
|
|
1310
|
-
} = a.props, {
|
|
1311
|
-
onSelect: se,
|
|
1312
|
-
onHover: ie
|
|
1313
|
-
} = a, A = $[I];
|
|
1314
|
-
if (A.type === "Group")
|
|
1315
|
-
return de(_n, {
|
|
1316
|
-
item: A,
|
|
1317
|
-
style: q,
|
|
1318
|
-
height: U ? x : k
|
|
1319
|
-
}, null);
|
|
1320
|
-
const re = C(Y, A), f = o(Y, re), g = B(I);
|
|
1321
|
-
return de(ro, ft(O, {
|
|
1322
|
-
selected: re,
|
|
1323
|
-
disabled: h(A) || f,
|
|
1324
|
-
created: !!A.created,
|
|
1325
|
-
hovering: g,
|
|
1326
|
-
item: A,
|
|
1327
|
-
onSelect: se,
|
|
1328
|
-
onHover: ie
|
|
1329
|
-
}), {
|
|
1330
|
-
default: (R) => {
|
|
1331
|
-
var P;
|
|
1332
|
-
return ((P = t.default) == null ? void 0 : P.call(t, R)) || de("span", null, [d(A)]);
|
|
1333
|
-
}
|
|
1334
|
-
});
|
|
1335
|
-
}, {
|
|
1336
|
-
onKeyboardNavigate: w,
|
|
1337
|
-
onKeyboardSelect: D
|
|
1338
|
-
} = a, le = () => {
|
|
1339
|
-
w("forward");
|
|
1340
|
-
}, Z = () => {
|
|
1341
|
-
w("backward");
|
|
1342
|
-
}, G = (O) => {
|
|
1343
|
-
const I = ol(O), {
|
|
1344
|
-
tab: $,
|
|
1345
|
-
esc: q,
|
|
1346
|
-
down: U,
|
|
1347
|
-
up: x,
|
|
1348
|
-
enter: k,
|
|
1349
|
-
numpadEnter: Y
|
|
1350
|
-
} = al;
|
|
1351
|
-
switch ([q, U, x, k, Y].includes(I) && (O.preventDefault(), O.stopPropagation()), I) {
|
|
1352
|
-
case $:
|
|
1353
|
-
case q:
|
|
1354
|
-
break;
|
|
1355
|
-
case U:
|
|
1356
|
-
le();
|
|
1357
|
-
break;
|
|
1358
|
-
case x:
|
|
1359
|
-
Z();
|
|
1360
|
-
break;
|
|
1361
|
-
case k:
|
|
1362
|
-
case Y:
|
|
1363
|
-
D();
|
|
1364
|
-
break;
|
|
1365
|
-
}
|
|
1366
|
-
};
|
|
1367
|
-
return () => {
|
|
1368
|
-
var O, I, $, q;
|
|
1369
|
-
const {
|
|
1370
|
-
data: U,
|
|
1371
|
-
width: x
|
|
1372
|
-
} = e, {
|
|
1373
|
-
height: k,
|
|
1374
|
-
multiple: Y,
|
|
1375
|
-
scrollbarAlwaysOn: se
|
|
1376
|
-
} = a.props, ie = b(() => Hn ? !0 : se), A = T(m) ? Vo : Co;
|
|
1377
|
-
return de("div", {
|
|
1378
|
-
class: [r.b("dropdown"), r.is("multiple", Y)],
|
|
1379
|
-
style: {
|
|
1380
|
-
width: `${x}px`
|
|
1381
|
-
}
|
|
1382
|
-
}, [(O = t.header) == null ? void 0 : O.call(t), ((I = t.loading) == null ? void 0 : I.call(t)) || (($ = t.empty) == null ? void 0 : $.call(t)) || de(A, ft({
|
|
1383
|
-
ref: S
|
|
1384
|
-
}, T(V), {
|
|
1385
|
-
className: r.be("dropdown", "list"),
|
|
1386
|
-
scrollbarAlwaysOn: ie.value,
|
|
1387
|
-
data: U,
|
|
1388
|
-
height: k,
|
|
1389
|
-
width: x,
|
|
1390
|
-
total: U.length,
|
|
1391
|
-
innerElement: "ul",
|
|
1392
|
-
innerProps: {
|
|
1393
|
-
id: e.id,
|
|
1394
|
-
role: "listbox",
|
|
1395
|
-
"aria-label": e.ariaLabel,
|
|
1396
|
-
"aria-orientation": "vertical"
|
|
1397
|
-
},
|
|
1398
|
-
onKeydown: G
|
|
1399
|
-
}), {
|
|
1400
|
-
default: (re) => de(ee, re, null)
|
|
1401
|
-
}), (q = t.footer) == null ? void 0 : q.call(t)]);
|
|
1402
|
-
};
|
|
1403
|
-
}
|
|
1404
|
-
});
|
|
1405
|
-
function No(e, t) {
|
|
1406
|
-
const { aliasProps: n, getLabel: a, getValue: r } = tt(e), d = L(0), v = L(), h = b(() => e.allowCreate && e.filterable);
|
|
1407
|
-
ve(
|
|
1408
|
-
() => e.options,
|
|
1409
|
-
(u) => {
|
|
1410
|
-
const M = new Set(u.map((C) => a(C)));
|
|
1411
|
-
t.createdOptions = t.createdOptions.filter(
|
|
1412
|
-
(C) => !M.has(a(C))
|
|
1413
|
-
);
|
|
1414
|
-
}
|
|
1415
|
-
);
|
|
1416
|
-
function y(u) {
|
|
1417
|
-
const M = (C) => a(C) === u;
|
|
1418
|
-
return e.options && e.options.some(M) || t.createdOptions.some(M);
|
|
1419
|
-
}
|
|
1420
|
-
function S(u) {
|
|
1421
|
-
h.value && (e.multiple && u.created ? d.value++ : v.value = u);
|
|
1422
|
-
}
|
|
1423
|
-
function i(u) {
|
|
1424
|
-
if (h.value)
|
|
1425
|
-
if (u && u.length > 0) {
|
|
1426
|
-
if (y(u)) {
|
|
1427
|
-
t.createdOptions = t.createdOptions.filter(
|
|
1428
|
-
(C) => a(C) !== t.previousQuery
|
|
1429
|
-
);
|
|
1430
|
-
return;
|
|
1431
|
-
}
|
|
1432
|
-
const M = {
|
|
1433
|
-
[n.value.value]: u,
|
|
1434
|
-
[n.value.label]: u,
|
|
1435
|
-
created: !0,
|
|
1436
|
-
[n.value.disabled]: !1
|
|
1437
|
-
};
|
|
1438
|
-
t.createdOptions.length >= d.value ? t.createdOptions[d.value] = M : t.createdOptions.push(M);
|
|
1439
|
-
} else if (e.multiple)
|
|
1440
|
-
t.createdOptions.length = d.value;
|
|
1441
|
-
else {
|
|
1442
|
-
const M = v.value;
|
|
1443
|
-
t.createdOptions.length = 0, M && M.created && t.createdOptions.push(M);
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
function m(u) {
|
|
1447
|
-
if (!h.value || !u || !u.created || u.created && e.reserveKeyword && t.inputValue === a(u))
|
|
1448
|
-
return;
|
|
1449
|
-
const M = t.createdOptions.findIndex(
|
|
1450
|
-
(C) => r(C) === r(u)
|
|
1451
|
-
);
|
|
1452
|
-
~M && (t.createdOptions.splice(M, 1), d.value--);
|
|
1453
|
-
}
|
|
1454
|
-
function V() {
|
|
1455
|
-
h.value && (t.createdOptions.length = 0, d.value = 0);
|
|
1456
|
-
}
|
|
1457
|
-
return {
|
|
1458
|
-
createNewOption: i,
|
|
1459
|
-
removeNewOption: m,
|
|
1460
|
-
selectNewOption: S,
|
|
1461
|
-
clearAllNewOption: V
|
|
1462
|
-
};
|
|
1463
|
-
}
|
|
1464
|
-
const Lo = (e, t) => {
|
|
1465
|
-
const { t: n } = jn(), a = sn(), r = be("select"), d = be("input"), { form: v, formItem: h } = Qn(), { inputId: y } = Zn(e, {
|
|
1466
|
-
formItemContext: h
|
|
1467
|
-
}), { aliasProps: S, getLabel: i, getValue: m, getDisabled: V, getOptions: u } = tt(e), { valueOnClear: M, isEmptyValue: C } = gn(e), o = xe({
|
|
1468
|
-
inputValue: "",
|
|
1469
|
-
cachedOptions: [],
|
|
1470
|
-
createdOptions: [],
|
|
1471
|
-
hoveringIndex: -1,
|
|
1472
|
-
inputHovering: !1,
|
|
1473
|
-
selectionWidth: 0,
|
|
1474
|
-
collapseItemWidth: 0,
|
|
1475
|
-
previousQuery: null,
|
|
1476
|
-
previousValue: void 0,
|
|
1477
|
-
selectedLabel: "",
|
|
1478
|
-
menuVisibleOnFocus: !1,
|
|
1479
|
-
isBeforeHide: !1
|
|
1480
|
-
}), B = L(-1), te = L(!1), J = L(), E = L(), ee = L(), w = L(), D = L(), le = L(), Z = L(), G = L(), O = L(), I = L(), {
|
|
1481
|
-
isComposing: $,
|
|
1482
|
-
handleCompositionStart: q,
|
|
1483
|
-
handleCompositionEnd: U,
|
|
1484
|
-
handleCompositionUpdate: x
|
|
1485
|
-
} = Gn({
|
|
1486
|
-
afterComposition: (l) => Bt(l)
|
|
1487
|
-
}), k = Dn(), { wrapperRef: Y, isFocused: se, handleBlur: ie } = qn(D, {
|
|
1488
|
-
disabled: k,
|
|
1489
|
-
afterFocus() {
|
|
1490
|
-
e.automaticDropdown && !g.value && (g.value = !0, o.menuVisibleOnFocus = !0);
|
|
1491
|
-
},
|
|
1492
|
-
beforeBlur(l) {
|
|
1493
|
-
var s, c;
|
|
1494
|
-
return ((s = ee.value) == null ? void 0 : s.isFocusInsideContent(l)) || ((c = w.value) == null ? void 0 : c.isFocusInsideContent(l));
|
|
1495
|
-
},
|
|
1496
|
-
afterBlur() {
|
|
1497
|
-
var l;
|
|
1498
|
-
g.value = !1, o.menuVisibleOnFocus = !1, e.validateEvent && ((l = h == null ? void 0 : h.validate) == null || l.call(h, "blur").catch((s) => ut(s)));
|
|
1499
|
-
}
|
|
1500
|
-
}), A = b(() => It("")), re = b(() => e.loading ? !1 : e.options.length > 0 || o.createdOptions.length > 0), f = L([]), g = L(!1), R = b(() => {
|
|
1501
|
-
var l;
|
|
1502
|
-
return (l = v == null ? void 0 : v.statusIcon) != null ? l : !1;
|
|
1503
|
-
}), P = b(() => {
|
|
1504
|
-
const l = f.value.length * e.itemHeight;
|
|
1505
|
-
return l > e.height ? e.height : l;
|
|
1506
|
-
}), z = b(() => e.multiple ? Se(e.modelValue) && e.modelValue.length > 0 : !C(e.modelValue)), W = b(() => e.clearable && !k.value && z.value && (se.value || o.inputHovering)), H = b(
|
|
1507
|
-
() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon
|
|
1508
|
-
), pe = b(
|
|
1509
|
-
() => H.value && r.is("reverse", g.value)
|
|
1510
|
-
), fe = b(() => (h == null ? void 0 : h.validateState) || ""), We = b(() => {
|
|
1511
|
-
if (fe.value)
|
|
1512
|
-
return Fn[fe.value];
|
|
1513
|
-
}), ze = b(() => e.remote ? e.debounce : 0), Ol = b(
|
|
1514
|
-
() => e.remote && !o.inputValue && !re.value
|
|
1515
|
-
), Il = b(() => e.loading ? e.loadingText || n("el.select.loading") : e.filterable && o.inputValue && re.value && f.value.length === 0 ? e.noMatchText || n("el.select.noMatch") : re.value ? null : e.noDataText || n("el.select.noData")), Vl = b(
|
|
1516
|
-
() => e.filterable && Xe(e.filterMethod)
|
|
1517
|
-
), El = b(
|
|
1518
|
-
() => e.filterable && e.remote && Xe(e.remoteMethod)
|
|
1519
|
-
), It = (l) => {
|
|
1520
|
-
const s = new RegExp(zn(l), "i"), c = (p) => Vl.value || El.value ? !0 : l ? s.test(i(p) || "") : !0;
|
|
1521
|
-
return e.loading ? [] : [...o.createdOptions, ...e.options].reduce((p, F) => {
|
|
1522
|
-
const ne = u(F);
|
|
1523
|
-
if (Se(ne)) {
|
|
1524
|
-
const De = ne.filter(c);
|
|
1525
|
-
De.length > 0 && p.push(
|
|
1526
|
-
{
|
|
1527
|
-
label: i(F),
|
|
1528
|
-
type: "Group"
|
|
1529
|
-
},
|
|
1530
|
-
...De
|
|
1531
|
-
);
|
|
1532
|
-
} else (e.remote || c(F)) && p.push(F);
|
|
1533
|
-
return p;
|
|
1534
|
-
}, []);
|
|
1535
|
-
}, Vt = () => {
|
|
1536
|
-
f.value = It(o.inputValue);
|
|
1537
|
-
}, Ke = b(() => {
|
|
1538
|
-
const l = /* @__PURE__ */ new Map();
|
|
1539
|
-
return A.value.forEach((s, c) => {
|
|
1540
|
-
l.set(_(m(s)), { option: s, index: c });
|
|
1541
|
-
}), l;
|
|
1542
|
-
}), Ge = b(() => {
|
|
1543
|
-
const l = /* @__PURE__ */ new Map();
|
|
1544
|
-
return f.value.forEach((s, c) => {
|
|
1545
|
-
l.set(_(m(s)), { option: s, index: c });
|
|
1546
|
-
}), l;
|
|
1547
|
-
}), Tl = b(
|
|
1548
|
-
() => f.value.every((l) => V(l))
|
|
1549
|
-
), Et = kn(), Ml = b(
|
|
1550
|
-
() => Et.value === "small" ? "small" : "default"
|
|
1551
|
-
), Ne = () => {
|
|
1552
|
-
var l;
|
|
1553
|
-
if (Oe(e.fitInputWidth)) {
|
|
1554
|
-
B.value = e.fitInputWidth;
|
|
1555
|
-
return;
|
|
1556
|
-
}
|
|
1557
|
-
const s = ((l = J.value) == null ? void 0 : l.offsetWidth) || 200;
|
|
1558
|
-
!e.fitInputWidth && re.value ? ae(() => {
|
|
1559
|
-
B.value = Math.max(s, Cl());
|
|
1560
|
-
}) : B.value = s;
|
|
1561
|
-
}, Cl = () => {
|
|
1562
|
-
var l, s;
|
|
1563
|
-
const p = document.createElement("canvas").getContext("2d"), F = r.be("dropdown", "item"), De = (((s = (l = G.value) == null ? void 0 : l.listRef) == null ? void 0 : s.innerRef) || document).querySelector(`.${F}`);
|
|
1564
|
-
if (De === null || p === null) return 0;
|
|
1565
|
-
const Qe = getComputedStyle(De), xl = Number.parseFloat(Qe.paddingLeft) + Number.parseFloat(Qe.paddingRight);
|
|
1566
|
-
return p.font = `bold ${Qe.font.replace(
|
|
1567
|
-
new RegExp(`\\b${Qe.fontWeight}\\b`),
|
|
1568
|
-
""
|
|
1569
|
-
)}`, f.value.reduce((_l, en) => {
|
|
1570
|
-
const tn = p.measureText(i(en));
|
|
1571
|
-
return Math.max(tn.width, _l);
|
|
1572
|
-
}, 0) + xl;
|
|
1573
|
-
}, Rl = () => {
|
|
1574
|
-
if (!E.value) return 0;
|
|
1575
|
-
const l = window.getComputedStyle(E.value);
|
|
1576
|
-
return Number.parseFloat(l.gap || "6px");
|
|
1577
|
-
}, zl = b(() => {
|
|
1578
|
-
const l = Rl(), s = e.filterable ? l + Sn : 0;
|
|
1579
|
-
return { maxWidth: `${I.value && e.maxCollapseTags === 1 ? o.selectionWidth - o.collapseItemWidth - l - s : o.selectionWidth - s}px` };
|
|
1580
|
-
}), Nl = b(() => ({ maxWidth: `${o.selectionWidth}px` })), Ll = b(() => Se(e.modelValue) ? e.modelValue.length === 0 && !o.inputValue : e.filterable ? !o.inputValue : !0), Dl = b(() => {
|
|
1581
|
-
var l;
|
|
1582
|
-
const s = (l = e.placeholder) != null ? l : n("el.select.placeholder");
|
|
1583
|
-
return e.multiple || !z.value ? s : o.selectedLabel;
|
|
1584
|
-
}), kl = b(() => {
|
|
1585
|
-
var l, s;
|
|
1586
|
-
return (s = (l = ee.value) == null ? void 0 : l.popperRef) == null ? void 0 : s.contentRef;
|
|
1587
|
-
}), Tt = b(() => {
|
|
1588
|
-
if (e.multiple) {
|
|
1589
|
-
const l = e.modelValue.length;
|
|
1590
|
-
if (l > 0 && Ge.value.has(e.modelValue[l - 1])) {
|
|
1591
|
-
const { index: s } = Ge.value.get(
|
|
1592
|
-
e.modelValue[l - 1]
|
|
1593
|
-
);
|
|
1594
|
-
return s;
|
|
1595
|
-
}
|
|
1596
|
-
} else if (!C(e.modelValue) && Ge.value.has(e.modelValue)) {
|
|
1597
|
-
const { index: l } = Ge.value.get(e.modelValue);
|
|
1598
|
-
return l;
|
|
1599
|
-
}
|
|
1600
|
-
return -1;
|
|
1601
|
-
}), Mt = b({
|
|
1602
|
-
get() {
|
|
1603
|
-
return g.value && (e.loading || !Ol.value || e.remote && !!a.empty) && (!te.value || !$n(o.previousQuery));
|
|
1604
|
-
},
|
|
1605
|
-
set(l) {
|
|
1606
|
-
g.value = l;
|
|
1607
|
-
}
|
|
1608
|
-
}), $l = b(() => e.multiple ? e.collapseTags ? o.cachedOptions.slice(0, e.maxCollapseTags) : o.cachedOptions : []), Al = b(() => e.multiple ? e.collapseTags ? o.cachedOptions.slice(e.maxCollapseTags) : [] : []), {
|
|
1609
|
-
createNewOption: Ct,
|
|
1610
|
-
removeNewOption: lt,
|
|
1611
|
-
selectNewOption: Rt,
|
|
1612
|
-
clearAllNewOption: nt
|
|
1613
|
-
} = No(e, o), ot = (l) => {
|
|
1614
|
-
var s;
|
|
1615
|
-
k.value || e.filterable && g.value && l && !((s = Z.value) != null && s.contains(l.target)) || (o.menuVisibleOnFocus ? o.menuVisibleOnFocus = !1 : g.value = !g.value);
|
|
1616
|
-
}, zt = () => {
|
|
1617
|
-
o.inputValue.length > 0 && !g.value && (g.value = !0), Ct(o.inputValue), ae(() => {
|
|
1618
|
-
at(o.inputValue);
|
|
1619
|
-
});
|
|
1620
|
-
}, Nt = Wn(() => {
|
|
1621
|
-
zt(), te.value = !1;
|
|
1622
|
-
}, ze), at = (l) => {
|
|
1623
|
-
o.previousQuery === l || $.value || (o.previousQuery = l, e.filterable && Xe(e.filterMethod) ? e.filterMethod(l) : e.filterable && e.remote && Xe(e.remoteMethod) && e.remoteMethod(l), e.defaultFirstOption && (e.filterable || e.remote) && f.value.length ? ae(Bl) : ae(Zl));
|
|
1624
|
-
}, Bl = () => {
|
|
1625
|
-
const l = f.value.filter(
|
|
1626
|
-
(p) => !p.disabled && p.type !== "Group"
|
|
1627
|
-
), s = l.find((p) => p.created), c = l[0];
|
|
1628
|
-
o.hoveringIndex = st(
|
|
1629
|
-
f.value,
|
|
1630
|
-
s || c
|
|
1631
|
-
);
|
|
1632
|
-
}, Fl = (l) => {
|
|
1633
|
-
$e(e.modelValue, l) || t(el, l);
|
|
1634
|
-
}, Le = (l) => {
|
|
1635
|
-
t(tl, l), Fl(l), o.previousValue = e.multiple ? String(l) : l, ae(() => {
|
|
1636
|
-
if (e.multiple && Se(e.modelValue)) {
|
|
1637
|
-
const s = o.cachedOptions.slice(), c = e.modelValue.map(
|
|
1638
|
-
(p) => Ft(p, s)
|
|
1639
|
-
);
|
|
1640
|
-
$e(o.cachedOptions, c) || (o.cachedOptions = c);
|
|
1641
|
-
} else
|
|
1642
|
-
Ue(!0);
|
|
1643
|
-
});
|
|
1644
|
-
}, st = (l = [], s) => {
|
|
1645
|
-
if (!Fe(s))
|
|
1646
|
-
return l.indexOf(s);
|
|
1647
|
-
const c = e.valueKey;
|
|
1648
|
-
let p = -1;
|
|
1649
|
-
return l.some((F, ne) => ge(F, c) === ge(s, c) ? (p = ne, !0) : !1), p;
|
|
1650
|
-
}, _ = (l) => Fe(l) ? ge(l, e.valueKey) : l, Lt = () => {
|
|
1651
|
-
Ne();
|
|
1652
|
-
}, Dt = () => {
|
|
1653
|
-
o.selectionWidth = Number.parseFloat(
|
|
1654
|
-
window.getComputedStyle(E.value).width
|
|
1655
|
-
);
|
|
1656
|
-
}, Pl = () => {
|
|
1657
|
-
o.collapseItemWidth = I.value.getBoundingClientRect().width;
|
|
1658
|
-
}, it = () => {
|
|
1659
|
-
var l, s;
|
|
1660
|
-
(s = (l = ee.value) == null ? void 0 : l.updatePopper) == null || s.call(l);
|
|
1661
|
-
}, kt = () => {
|
|
1662
|
-
var l, s;
|
|
1663
|
-
(s = (l = w.value) == null ? void 0 : l.updatePopper) == null || s.call(l);
|
|
1664
|
-
}, $t = (l) => {
|
|
1665
|
-
const s = m(l);
|
|
1666
|
-
if (e.multiple) {
|
|
1667
|
-
let c = e.modelValue.slice();
|
|
1668
|
-
const p = st(c, s);
|
|
1669
|
-
p > -1 ? (c = [
|
|
1670
|
-
...c.slice(0, p),
|
|
1671
|
-
...c.slice(p + 1)
|
|
1672
|
-
], o.cachedOptions.splice(p, 1), lt(l)) : (e.multipleLimit <= 0 || c.length < e.multipleLimit) && (c = [...c, s], o.cachedOptions.push(l), Rt(l)), Le(c), l.created && at(""), e.filterable && !e.reserveKeyword && (o.inputValue = "");
|
|
1673
|
-
} else
|
|
1674
|
-
o.selectedLabel = i(l), !$e(e.modelValue, s) && Le(s), g.value = !1, Rt(l), l.created || nt();
|
|
1675
|
-
qe();
|
|
1676
|
-
}, Hl = (l, s) => {
|
|
1677
|
-
let c = e.modelValue.slice();
|
|
1678
|
-
const p = st(c, m(s));
|
|
1679
|
-
p > -1 && !k.value && (c = [
|
|
1680
|
-
...e.modelValue.slice(0, p),
|
|
1681
|
-
...e.modelValue.slice(p + 1)
|
|
1682
|
-
], o.cachedOptions.splice(p, 1), Le(c), t("remove-tag", m(s)), lt(s)), l.stopPropagation(), qe();
|
|
1683
|
-
}, qe = () => {
|
|
1684
|
-
var l;
|
|
1685
|
-
(l = D.value) == null || l.focus();
|
|
1686
|
-
}, Wl = () => {
|
|
1687
|
-
var l;
|
|
1688
|
-
if (g.value) {
|
|
1689
|
-
g.value = !1, ae(() => {
|
|
1690
|
-
var s;
|
|
1691
|
-
return (s = D.value) == null ? void 0 : s.blur();
|
|
1692
|
-
});
|
|
1693
|
-
return;
|
|
1694
|
-
}
|
|
1695
|
-
(l = D.value) == null || l.blur();
|
|
1696
|
-
}, Kl = () => {
|
|
1697
|
-
o.inputValue.length > 0 ? o.inputValue = "" : g.value = !1;
|
|
1698
|
-
}, Gl = (l) => Tn(
|
|
1699
|
-
l,
|
|
1700
|
-
(s) => !o.cachedOptions.some(
|
|
1701
|
-
(c) => m(c) === s && V(c)
|
|
1702
|
-
)
|
|
1703
|
-
), ql = (l) => {
|
|
1704
|
-
const s = ol(l);
|
|
1705
|
-
if (e.multiple && s !== al.delete && o.inputValue.length === 0) {
|
|
1706
|
-
l.preventDefault();
|
|
1707
|
-
const c = e.modelValue.slice(), p = Gl(c);
|
|
1708
|
-
if (p < 0) return;
|
|
1709
|
-
const F = c[p];
|
|
1710
|
-
c.splice(p, 1);
|
|
1711
|
-
const ne = o.cachedOptions[p];
|
|
1712
|
-
o.cachedOptions.splice(p, 1), lt(ne), Le(c), t("remove-tag", F);
|
|
1713
|
-
}
|
|
1714
|
-
}, Ul = () => {
|
|
1715
|
-
let l;
|
|
1716
|
-
Se(e.modelValue) ? l = [] : l = M.value, o.selectedLabel = "", g.value = !1, Le(l), t("clear"), nt(), qe();
|
|
1717
|
-
}, At = (l, s = void 0) => {
|
|
1718
|
-
const c = f.value;
|
|
1719
|
-
if (!["forward", "backward"].includes(l) || k.value || c.length <= 0 || Tl.value || $.value)
|
|
1720
|
-
return;
|
|
1721
|
-
if (!g.value)
|
|
1722
|
-
return ot();
|
|
1723
|
-
nl(s) && (s = o.hoveringIndex);
|
|
1724
|
-
let p = -1;
|
|
1725
|
-
l === "forward" ? (p = s + 1, p >= c.length && (p = 0)) : l === "backward" && (p = s - 1, (p < 0 || p >= c.length) && (p = c.length - 1));
|
|
1726
|
-
const F = c[p];
|
|
1727
|
-
if (V(F) || F.type === "Group")
|
|
1728
|
-
return At(l, p);
|
|
1729
|
-
o.hoveringIndex = p, rt(p);
|
|
1730
|
-
}, jl = () => {
|
|
1731
|
-
if (g.value)
|
|
1732
|
-
~o.hoveringIndex && f.value[o.hoveringIndex] && $t(f.value[o.hoveringIndex]);
|
|
1733
|
-
else return ot();
|
|
1734
|
-
}, Ql = (l) => {
|
|
1735
|
-
o.hoveringIndex = l ?? -1;
|
|
1736
|
-
}, Zl = () => {
|
|
1737
|
-
if (!e.multiple)
|
|
1738
|
-
o.hoveringIndex = f.value.findIndex((l) => _(m(l)) === _(e.modelValue));
|
|
1739
|
-
else {
|
|
1740
|
-
const l = e.modelValue.length;
|
|
1741
|
-
if (l > 0) {
|
|
1742
|
-
const s = e.modelValue[l - 1];
|
|
1743
|
-
o.hoveringIndex = f.value.findIndex(
|
|
1744
|
-
(c) => _(s) === _(m(c))
|
|
1745
|
-
);
|
|
1746
|
-
} else
|
|
1747
|
-
o.hoveringIndex = -1;
|
|
1748
|
-
}
|
|
1749
|
-
}, Bt = (l) => {
|
|
1750
|
-
if (o.inputValue = l.target.value, e.remote)
|
|
1751
|
-
te.value = !0, Nt();
|
|
1752
|
-
else
|
|
1753
|
-
return zt();
|
|
1754
|
-
}, Yl = (l) => {
|
|
1755
|
-
if (g.value = !1, se.value) {
|
|
1756
|
-
const s = new FocusEvent("blur", l);
|
|
1757
|
-
ie(s);
|
|
1758
|
-
}
|
|
1759
|
-
}, Xl = () => (o.isBeforeHide = !1, ae(() => {
|
|
1760
|
-
~Tt.value && rt(Tt.value);
|
|
1761
|
-
})), rt = (l) => {
|
|
1762
|
-
G.value.scrollToItem(l);
|
|
1763
|
-
}, Ft = (l, s) => {
|
|
1764
|
-
const c = _(l);
|
|
1765
|
-
if (Ke.value.has(c)) {
|
|
1766
|
-
const { option: p } = Ke.value.get(c);
|
|
1767
|
-
return p;
|
|
1768
|
-
}
|
|
1769
|
-
if (s && s.length) {
|
|
1770
|
-
const p = s.find(
|
|
1771
|
-
(F) => _(m(F)) === c
|
|
1772
|
-
);
|
|
1773
|
-
if (p)
|
|
1774
|
-
return p;
|
|
1775
|
-
}
|
|
1776
|
-
return {
|
|
1777
|
-
[S.value.value]: l,
|
|
1778
|
-
[S.value.label]: l
|
|
1779
|
-
};
|
|
1780
|
-
}, Jl = (l) => {
|
|
1781
|
-
var s, c;
|
|
1782
|
-
return (c = (s = Ke.value.get(m(l))) == null ? void 0 : s.index) != null ? c : -1;
|
|
1783
|
-
}, Ue = (l = !1) => {
|
|
1784
|
-
if (e.multiple)
|
|
1785
|
-
if (e.modelValue.length > 0) {
|
|
1786
|
-
const s = o.cachedOptions.slice();
|
|
1787
|
-
o.cachedOptions.length = 0, o.previousValue = e.modelValue.toString();
|
|
1788
|
-
for (const c of e.modelValue) {
|
|
1789
|
-
const p = Ft(c, s);
|
|
1790
|
-
o.cachedOptions.push(p);
|
|
1791
|
-
}
|
|
1792
|
-
} else
|
|
1793
|
-
o.cachedOptions = [], o.previousValue = void 0;
|
|
1794
|
-
else if (z.value) {
|
|
1795
|
-
o.previousValue = e.modelValue;
|
|
1796
|
-
const s = f.value, c = s.findIndex(
|
|
1797
|
-
(p) => _(m(p)) === _(e.modelValue)
|
|
1798
|
-
);
|
|
1799
|
-
~c ? o.selectedLabel = i(s[c]) : (!o.selectedLabel || l) && (o.selectedLabel = _(e.modelValue));
|
|
1800
|
-
} else
|
|
1801
|
-
o.selectedLabel = "", o.previousValue = void 0;
|
|
1802
|
-
nt(), Ne();
|
|
1803
|
-
};
|
|
1804
|
-
ve(
|
|
1805
|
-
() => e.fitInputWidth,
|
|
1806
|
-
() => {
|
|
1807
|
-
Ne();
|
|
1808
|
-
}
|
|
1809
|
-
), ve(g, (l) => {
|
|
1810
|
-
l ? (e.persistent || Ne(), at("")) : (o.inputValue = "", o.previousQuery = null, o.isBeforeHide = !0, o.menuVisibleOnFocus = !1, Ct(""));
|
|
1811
|
-
}), ve(
|
|
1812
|
-
() => e.modelValue,
|
|
1813
|
-
(l, s) => {
|
|
1814
|
-
var c;
|
|
1815
|
-
(!l || Se(l) && l.length === 0 || e.multiple && !$e(l.toString(), o.previousValue) || !e.multiple && _(l) !== _(o.previousValue)) && Ue(!0), !$e(l, s) && e.validateEvent && ((c = h == null ? void 0 : h.validate) == null || c.call(h, "change").catch((F) => ut(F)));
|
|
1816
|
-
},
|
|
1817
|
-
{
|
|
1818
|
-
deep: !0
|
|
1819
|
-
}
|
|
1820
|
-
), ve(
|
|
1821
|
-
() => e.options,
|
|
1822
|
-
() => {
|
|
1823
|
-
const l = D.value;
|
|
1824
|
-
(!l || l && document.activeElement !== l) && Ue();
|
|
1825
|
-
},
|
|
1826
|
-
{
|
|
1827
|
-
deep: !0,
|
|
1828
|
-
flush: "post"
|
|
1829
|
-
}
|
|
1830
|
-
), ve(
|
|
1831
|
-
() => f.value,
|
|
1832
|
-
() => (Ne(), G.value && ae(G.value.resetScrollTop))
|
|
1833
|
-
), Pt(() => {
|
|
1834
|
-
o.isBeforeHide || Vt();
|
|
1835
|
-
}), Pt(() => {
|
|
1836
|
-
const { valueKey: l, options: s } = e, c = /* @__PURE__ */ new Map();
|
|
1837
|
-
for (const p of s) {
|
|
1838
|
-
const F = m(p);
|
|
1839
|
-
let ne = F;
|
|
1840
|
-
if (Fe(ne) && (ne = ge(F, l)), c.get(ne)) {
|
|
1841
|
-
ut(
|
|
1842
|
-
"ElSelectV2",
|
|
1843
|
-
"The option values you provided seem to be duplicated, which may cause some problems, please check."
|
|
1844
|
-
);
|
|
1845
|
-
break;
|
|
1846
|
-
} else
|
|
1847
|
-
c.set(ne, !0);
|
|
1848
|
-
}
|
|
1849
|
-
}), _t(() => {
|
|
1850
|
-
Ue();
|
|
1851
|
-
}), Ve(J, Lt), Ve(E, Dt), Ve(Y, it), Ve(O, kt), Ve(I, Pl);
|
|
1852
|
-
let je;
|
|
1853
|
-
return ve(
|
|
1854
|
-
() => Mt.value,
|
|
1855
|
-
(l) => {
|
|
1856
|
-
l ? je = Ve(G, it).stop : (je == null || je(), je = void 0), t("visible-change", l);
|
|
1857
|
-
}
|
|
1858
|
-
), {
|
|
1859
|
-
// data exports
|
|
1860
|
-
inputId: y,
|
|
1861
|
-
collapseTagSize: Ml,
|
|
1862
|
-
currentPlaceholder: Dl,
|
|
1863
|
-
expanded: g,
|
|
1864
|
-
emptyText: Il,
|
|
1865
|
-
popupHeight: P,
|
|
1866
|
-
debounce: ze,
|
|
1867
|
-
allOptions: A,
|
|
1868
|
-
allOptionsValueMap: Ke,
|
|
1869
|
-
filteredOptions: f,
|
|
1870
|
-
iconComponent: H,
|
|
1871
|
-
iconReverse: pe,
|
|
1872
|
-
tagStyle: zl,
|
|
1873
|
-
collapseTagStyle: Nl,
|
|
1874
|
-
popperSize: B,
|
|
1875
|
-
dropdownMenuVisible: Mt,
|
|
1876
|
-
hasModelValue: z,
|
|
1877
|
-
shouldShowPlaceholder: Ll,
|
|
1878
|
-
selectDisabled: k,
|
|
1879
|
-
selectSize: Et,
|
|
1880
|
-
needStatusIcon: R,
|
|
1881
|
-
showClearBtn: W,
|
|
1882
|
-
states: o,
|
|
1883
|
-
isFocused: se,
|
|
1884
|
-
nsSelect: r,
|
|
1885
|
-
nsInput: d,
|
|
1886
|
-
// refs items exports
|
|
1887
|
-
inputRef: D,
|
|
1888
|
-
menuRef: G,
|
|
1889
|
-
tagMenuRef: O,
|
|
1890
|
-
tooltipRef: ee,
|
|
1891
|
-
tagTooltipRef: w,
|
|
1892
|
-
selectRef: J,
|
|
1893
|
-
wrapperRef: Y,
|
|
1894
|
-
selectionRef: E,
|
|
1895
|
-
prefixRef: le,
|
|
1896
|
-
suffixRef: Z,
|
|
1897
|
-
collapseItemRef: I,
|
|
1898
|
-
popperRef: kl,
|
|
1899
|
-
validateState: fe,
|
|
1900
|
-
validateIcon: We,
|
|
1901
|
-
showTagList: $l,
|
|
1902
|
-
collapseTagList: Al,
|
|
1903
|
-
// methods exports
|
|
1904
|
-
debouncedOnInputChange: Nt,
|
|
1905
|
-
deleteTag: Hl,
|
|
1906
|
-
getLabel: i,
|
|
1907
|
-
getValue: m,
|
|
1908
|
-
getDisabled: V,
|
|
1909
|
-
getValueKey: _,
|
|
1910
|
-
getIndex: Jl,
|
|
1911
|
-
handleClear: Ul,
|
|
1912
|
-
handleClickOutside: Yl,
|
|
1913
|
-
handleDel: ql,
|
|
1914
|
-
handleEsc: Kl,
|
|
1915
|
-
focus: qe,
|
|
1916
|
-
blur: Wl,
|
|
1917
|
-
handleMenuEnter: Xl,
|
|
1918
|
-
handleResize: Lt,
|
|
1919
|
-
resetSelectionWidth: Dt,
|
|
1920
|
-
updateTooltip: it,
|
|
1921
|
-
updateTagTooltip: kt,
|
|
1922
|
-
updateOptions: Vt,
|
|
1923
|
-
toggleMenu: ot,
|
|
1924
|
-
scrollTo: rt,
|
|
1925
|
-
onInput: Bt,
|
|
1926
|
-
onKeyboardNavigate: At,
|
|
1927
|
-
onKeyboardSelect: jl,
|
|
1928
|
-
onSelect: $t,
|
|
1929
|
-
onHover: Ql,
|
|
1930
|
-
handleCompositionStart: q,
|
|
1931
|
-
handleCompositionEnd: U,
|
|
1932
|
-
handleCompositionUpdate: x
|
|
1933
|
-
};
|
|
1934
|
-
};
|
|
1935
|
-
var Do = Ce({
|
|
1936
|
-
name: "ElSelectV2",
|
|
1937
|
-
components: {
|
|
1938
|
-
ElSelectMenu: zo,
|
|
1939
|
-
ElTag: wn,
|
|
1940
|
-
ElTooltip: bn,
|
|
1941
|
-
ElIcon: Vn
|
|
1942
|
-
},
|
|
1943
|
-
directives: { ClickOutside: Xn },
|
|
1944
|
-
props: to,
|
|
1945
|
-
emits: no,
|
|
1946
|
-
setup(e, { emit: t }) {
|
|
1947
|
-
const n = b(() => {
|
|
1948
|
-
const { modelValue: y, multiple: S } = e, i = S ? [] : void 0;
|
|
1949
|
-
return Se(y) ? S ? y : i : S ? i : y;
|
|
1950
|
-
}), a = Lo(
|
|
1951
|
-
xe({
|
|
1952
|
-
...Ht(e),
|
|
1953
|
-
modelValue: n
|
|
1954
|
-
}),
|
|
1955
|
-
t
|
|
1956
|
-
), { calculatorRef: r, inputStyle: d } = On(), v = Yn();
|
|
1957
|
-
rn(Ot, {
|
|
1958
|
-
props: xe({
|
|
1959
|
-
...Ht(e),
|
|
1960
|
-
height: a.popupHeight,
|
|
1961
|
-
modelValue: n
|
|
1962
|
-
}),
|
|
1963
|
-
expanded: a.expanded,
|
|
1964
|
-
tooltipRef: a.tooltipRef,
|
|
1965
|
-
contentId: v,
|
|
1966
|
-
onSelect: a.onSelect,
|
|
1967
|
-
onHover: a.onHover,
|
|
1968
|
-
onKeyboardNavigate: a.onKeyboardNavigate,
|
|
1969
|
-
onKeyboardSelect: a.onKeyboardSelect
|
|
1970
|
-
});
|
|
1971
|
-
const h = b(() => e.multiple ? a.states.cachedOptions.map((y) => a.getLabel(y)) : a.states.selectedLabel);
|
|
1972
|
-
return {
|
|
1973
|
-
...a,
|
|
1974
|
-
modelValue: n,
|
|
1975
|
-
selectedLabel: h,
|
|
1976
|
-
calculatorRef: r,
|
|
1977
|
-
inputStyle: d,
|
|
1978
|
-
contentId: v,
|
|
1979
|
-
BORDER_HORIZONTAL_WIDTH: In
|
|
1980
|
-
};
|
|
1981
|
-
}
|
|
1982
|
-
});
|
|
1983
|
-
const ko = ["id", "value", "autocomplete", "tabindex", "aria-expanded", "aria-label", "disabled", "aria-controls", "aria-activedescendant", "readonly", "name"], $o = ["textContent"], Ao = { key: 1 };
|
|
1984
|
-
function Bo(e, t, n, a, r, d) {
|
|
1985
|
-
const v = Ze("el-tag"), h = Ze("el-tooltip"), y = Ze("el-icon"), S = Ze("el-select-menu"), i = un("click-outside");
|
|
1986
|
-
return Wt((K(), ce(
|
|
1987
|
-
"div",
|
|
1988
|
-
{
|
|
1989
|
-
ref: "selectRef",
|
|
1990
|
-
class: N([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
|
|
1991
|
-
onMouseenter: t[14] || (t[14] = (m) => e.states.inputHovering = !0),
|
|
1992
|
-
onMouseleave: t[15] || (t[15] = (m) => e.states.inputHovering = !1)
|
|
1993
|
-
},
|
|
1994
|
-
[
|
|
1995
|
-
de(h, {
|
|
1996
|
-
ref: "tooltipRef",
|
|
1997
|
-
visible: e.dropdownMenuVisible,
|
|
1998
|
-
teleported: e.teleported,
|
|
1999
|
-
"popper-class": [e.nsSelect.e("popper"), e.popperClass],
|
|
2000
|
-
"popper-style": e.popperStyle,
|
|
2001
|
-
"gpu-acceleration": !1,
|
|
2002
|
-
"stop-popper-mouse-event": !1,
|
|
2003
|
-
"popper-options": e.popperOptions,
|
|
2004
|
-
"fallback-placements": e.fallbackPlacements,
|
|
2005
|
-
effect: e.effect,
|
|
2006
|
-
placement: e.placement,
|
|
2007
|
-
pure: "",
|
|
2008
|
-
transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
|
|
2009
|
-
trigger: "click",
|
|
2010
|
-
persistent: e.persistent,
|
|
2011
|
-
"append-to": e.appendTo,
|
|
2012
|
-
"show-arrow": e.showArrow,
|
|
2013
|
-
offset: e.offset,
|
|
2014
|
-
onBeforeShow: e.handleMenuEnter,
|
|
2015
|
-
onHide: t[13] || (t[13] = (m) => e.states.isBeforeHide = !1)
|
|
2016
|
-
}, {
|
|
2017
|
-
default: X(() => {
|
|
2018
|
-
var m, V;
|
|
2019
|
-
return [
|
|
2020
|
-
j(
|
|
2021
|
-
"div",
|
|
2022
|
-
{
|
|
2023
|
-
ref: "wrapperRef",
|
|
2024
|
-
class: N([
|
|
2025
|
-
e.nsSelect.e("wrapper"),
|
|
2026
|
-
e.nsSelect.is("focused", e.isFocused),
|
|
2027
|
-
e.nsSelect.is("hovering", e.states.inputHovering),
|
|
2028
|
-
e.nsSelect.is("filterable", e.filterable),
|
|
2029
|
-
e.nsSelect.is("disabled", e.selectDisabled)
|
|
2030
|
-
]),
|
|
2031
|
-
onClick: t[10] || (t[10] = oe((...u) => e.toggleMenu && e.toggleMenu(...u), ["prevent"]))
|
|
2032
|
-
},
|
|
2033
|
-
[
|
|
2034
|
-
e.$slots.prefix ? (K(), ce(
|
|
2035
|
-
"div",
|
|
2036
|
-
{
|
|
2037
|
-
key: 0,
|
|
2038
|
-
ref: "prefixRef",
|
|
2039
|
-
class: N(e.nsSelect.e("prefix"))
|
|
2040
|
-
},
|
|
2041
|
-
[
|
|
2042
|
-
ue(e.$slots, "prefix")
|
|
2043
|
-
],
|
|
2044
|
-
2
|
|
2045
|
-
/* CLASS */
|
|
2046
|
-
)) : he("v-if", !0),
|
|
2047
|
-
j(
|
|
2048
|
-
"div",
|
|
2049
|
-
{
|
|
2050
|
-
ref: "selectionRef",
|
|
2051
|
-
class: N([
|
|
2052
|
-
e.nsSelect.e("selection"),
|
|
2053
|
-
e.nsSelect.is(
|
|
2054
|
-
"near",
|
|
2055
|
-
e.multiple && !e.$slots.prefix && !!e.modelValue.length
|
|
2056
|
-
)
|
|
2057
|
-
])
|
|
2058
|
-
},
|
|
2059
|
-
[
|
|
2060
|
-
e.multiple ? ue(e.$slots, "tag", {
|
|
2061
|
-
key: 0,
|
|
2062
|
-
data: e.states.cachedOptions,
|
|
2063
|
-
deleteTag: e.deleteTag,
|
|
2064
|
-
selectDisabled: e.selectDisabled
|
|
2065
|
-
}, () => [
|
|
2066
|
-
(K(!0), ce(
|
|
2067
|
-
dt,
|
|
2068
|
-
null,
|
|
2069
|
-
Kt(e.showTagList, (u) => (K(), ce(
|
|
2070
|
-
"div",
|
|
2071
|
-
{
|
|
2072
|
-
key: e.getValueKey(e.getValue(u)),
|
|
2073
|
-
class: N(e.nsSelect.e("selected-item"))
|
|
2074
|
-
},
|
|
2075
|
-
[
|
|
2076
|
-
de(v, {
|
|
2077
|
-
closable: !e.selectDisabled && !e.getDisabled(u),
|
|
2078
|
-
size: e.collapseTagSize,
|
|
2079
|
-
type: e.tagType,
|
|
2080
|
-
effect: e.tagEffect,
|
|
2081
|
-
"disable-transitions": "",
|
|
2082
|
-
style: Ae(e.tagStyle),
|
|
2083
|
-
onClose: (M) => e.deleteTag(M, u)
|
|
2084
|
-
}, {
|
|
2085
|
-
default: X(() => [
|
|
2086
|
-
j(
|
|
2087
|
-
"span",
|
|
2088
|
-
{
|
|
2089
|
-
class: N(e.nsSelect.e("tags-text"))
|
|
2090
|
-
},
|
|
2091
|
-
[
|
|
2092
|
-
ue(e.$slots, "label", {
|
|
2093
|
-
index: e.getIndex(u),
|
|
2094
|
-
label: e.getLabel(u),
|
|
2095
|
-
value: e.getValue(u)
|
|
2096
|
-
}, () => [
|
|
2097
|
-
Gt(
|
|
2098
|
-
me(e.getLabel(u)),
|
|
2099
|
-
1
|
|
2100
|
-
/* TEXT */
|
|
2101
|
-
)
|
|
2102
|
-
])
|
|
2103
|
-
],
|
|
2104
|
-
2
|
|
2105
|
-
/* CLASS */
|
|
2106
|
-
)
|
|
2107
|
-
]),
|
|
2108
|
-
_: 2
|
|
2109
|
-
/* DYNAMIC */
|
|
2110
|
-
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
|
|
2111
|
-
],
|
|
2112
|
-
2
|
|
2113
|
-
/* CLASS */
|
|
2114
|
-
))),
|
|
2115
|
-
128
|
|
2116
|
-
/* KEYED_FRAGMENT */
|
|
2117
|
-
)),
|
|
2118
|
-
e.collapseTags && e.modelValue.length > e.maxCollapseTags ? (K(), ye(h, {
|
|
2119
|
-
key: 0,
|
|
2120
|
-
ref: "tagTooltipRef",
|
|
2121
|
-
disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
|
|
2122
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
2123
|
-
effect: e.effect,
|
|
2124
|
-
placement: "bottom",
|
|
2125
|
-
"popper-class": e.popperClass,
|
|
2126
|
-
"popper-style": e.popperStyle,
|
|
2127
|
-
teleported: e.teleported,
|
|
2128
|
-
"popper-options": e.popperOptions
|
|
2129
|
-
}, {
|
|
2130
|
-
default: X(() => [
|
|
2131
|
-
j(
|
|
2132
|
-
"div",
|
|
2133
|
-
{
|
|
2134
|
-
ref: "collapseItemRef",
|
|
2135
|
-
class: N(e.nsSelect.e("selected-item"))
|
|
2136
|
-
},
|
|
2137
|
-
[
|
|
2138
|
-
de(v, {
|
|
2139
|
-
closable: !1,
|
|
2140
|
-
size: e.collapseTagSize,
|
|
2141
|
-
type: e.tagType,
|
|
2142
|
-
effect: e.tagEffect,
|
|
2143
|
-
style: Ae(e.collapseTagStyle),
|
|
2144
|
-
"disable-transitions": ""
|
|
2145
|
-
}, {
|
|
2146
|
-
default: X(() => [
|
|
2147
|
-
j(
|
|
2148
|
-
"span",
|
|
2149
|
-
{
|
|
2150
|
-
class: N(e.nsSelect.e("tags-text"))
|
|
2151
|
-
},
|
|
2152
|
-
" + " + me(e.modelValue.length - e.maxCollapseTags),
|
|
2153
|
-
3
|
|
2154
|
-
/* TEXT, CLASS */
|
|
2155
|
-
)
|
|
2156
|
-
]),
|
|
2157
|
-
_: 1
|
|
2158
|
-
/* STABLE */
|
|
2159
|
-
}, 8, ["size", "type", "effect", "style"])
|
|
2160
|
-
],
|
|
2161
|
-
2
|
|
2162
|
-
/* CLASS */
|
|
2163
|
-
)
|
|
2164
|
-
]),
|
|
2165
|
-
content: X(() => [
|
|
2166
|
-
j(
|
|
2167
|
-
"div",
|
|
2168
|
-
{
|
|
2169
|
-
ref: "tagMenuRef",
|
|
2170
|
-
class: N(e.nsSelect.e("selection"))
|
|
2171
|
-
},
|
|
2172
|
-
[
|
|
2173
|
-
(K(!0), ce(
|
|
2174
|
-
dt,
|
|
2175
|
-
null,
|
|
2176
|
-
Kt(e.collapseTagList, (u) => (K(), ce(
|
|
2177
|
-
"div",
|
|
2178
|
-
{
|
|
2179
|
-
key: e.getValueKey(e.getValue(u)),
|
|
2180
|
-
class: N(e.nsSelect.e("selected-item"))
|
|
2181
|
-
},
|
|
2182
|
-
[
|
|
2183
|
-
de(v, {
|
|
2184
|
-
class: "in-tooltip",
|
|
2185
|
-
closable: !e.selectDisabled && !e.getDisabled(u),
|
|
2186
|
-
size: e.collapseTagSize,
|
|
2187
|
-
type: e.tagType,
|
|
2188
|
-
effect: e.tagEffect,
|
|
2189
|
-
"disable-transitions": "",
|
|
2190
|
-
onClose: (M) => e.deleteTag(M, u)
|
|
2191
|
-
}, {
|
|
2192
|
-
default: X(() => [
|
|
2193
|
-
j(
|
|
2194
|
-
"span",
|
|
2195
|
-
{
|
|
2196
|
-
class: N(e.nsSelect.e("tags-text"))
|
|
2197
|
-
},
|
|
2198
|
-
[
|
|
2199
|
-
ue(e.$slots, "label", {
|
|
2200
|
-
index: e.getIndex(u),
|
|
2201
|
-
label: e.getLabel(u),
|
|
2202
|
-
value: e.getValue(u)
|
|
2203
|
-
}, () => [
|
|
2204
|
-
Gt(
|
|
2205
|
-
me(e.getLabel(u)),
|
|
2206
|
-
1
|
|
2207
|
-
/* TEXT */
|
|
2208
|
-
)
|
|
2209
|
-
])
|
|
2210
|
-
],
|
|
2211
|
-
2
|
|
2212
|
-
/* CLASS */
|
|
2213
|
-
)
|
|
2214
|
-
]),
|
|
2215
|
-
_: 2
|
|
2216
|
-
/* DYNAMIC */
|
|
2217
|
-
}, 1032, ["closable", "size", "type", "effect", "onClose"])
|
|
2218
|
-
],
|
|
2219
|
-
2
|
|
2220
|
-
/* CLASS */
|
|
2221
|
-
))),
|
|
2222
|
-
128
|
|
2223
|
-
/* KEYED_FRAGMENT */
|
|
2224
|
-
))
|
|
2225
|
-
],
|
|
2226
|
-
2
|
|
2227
|
-
/* CLASS */
|
|
2228
|
-
)
|
|
2229
|
-
]),
|
|
2230
|
-
_: 3
|
|
2231
|
-
/* FORWARDED */
|
|
2232
|
-
}, 8, ["disabled", "effect", "popper-class", "popper-style", "teleported", "popper-options"])) : he("v-if", !0)
|
|
2233
|
-
]) : he("v-if", !0),
|
|
2234
|
-
j(
|
|
2235
|
-
"div",
|
|
2236
|
-
{
|
|
2237
|
-
class: N([
|
|
2238
|
-
e.nsSelect.e("selected-item"),
|
|
2239
|
-
e.nsSelect.e("input-wrapper"),
|
|
2240
|
-
e.nsSelect.is("hidden", !e.filterable || e.selectDisabled)
|
|
2241
|
-
])
|
|
2242
|
-
},
|
|
2243
|
-
[
|
|
2244
|
-
j("input", {
|
|
2245
|
-
id: e.inputId,
|
|
2246
|
-
ref: "inputRef",
|
|
2247
|
-
value: e.states.inputValue,
|
|
2248
|
-
style: Ae(e.inputStyle),
|
|
2249
|
-
autocomplete: e.autocomplete,
|
|
2250
|
-
tabindex: e.tabindex,
|
|
2251
|
-
"aria-autocomplete": "none",
|
|
2252
|
-
"aria-haspopup": "listbox",
|
|
2253
|
-
autocapitalize: "off",
|
|
2254
|
-
"aria-expanded": e.expanded,
|
|
2255
|
-
"aria-label": e.ariaLabel,
|
|
2256
|
-
class: N([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
|
|
2257
|
-
disabled: e.selectDisabled,
|
|
2258
|
-
role: "combobox",
|
|
2259
|
-
"aria-controls": e.contentId,
|
|
2260
|
-
"aria-activedescendant": e.states.hoveringIndex >= 0 ? `${e.contentId}-${e.states.hoveringIndex}` : "",
|
|
2261
|
-
readonly: !e.filterable,
|
|
2262
|
-
spellcheck: "false",
|
|
2263
|
-
type: "text",
|
|
2264
|
-
name: e.name,
|
|
2265
|
-
onInput: t[0] || (t[0] = (...u) => e.onInput && e.onInput(...u)),
|
|
2266
|
-
onCompositionstart: t[1] || (t[1] = (...u) => e.handleCompositionStart && e.handleCompositionStart(...u)),
|
|
2267
|
-
onCompositionupdate: t[2] || (t[2] = (...u) => e.handleCompositionUpdate && e.handleCompositionUpdate(...u)),
|
|
2268
|
-
onCompositionend: t[3] || (t[3] = (...u) => e.handleCompositionEnd && e.handleCompositionEnd(...u)),
|
|
2269
|
-
onKeydown: [
|
|
2270
|
-
t[4] || (t[4] = ke(oe((u) => e.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])),
|
|
2271
|
-
t[5] || (t[5] = ke(oe((u) => e.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])),
|
|
2272
|
-
t[6] || (t[6] = ke(oe((...u) => e.onKeyboardSelect && e.onKeyboardSelect(...u), ["stop", "prevent"]), ["enter"])),
|
|
2273
|
-
t[7] || (t[7] = ke(oe((...u) => e.handleEsc && e.handleEsc(...u), ["stop", "prevent"]), ["esc"])),
|
|
2274
|
-
t[8] || (t[8] = ke(oe((...u) => e.handleDel && e.handleDel(...u), ["stop"]), ["delete"]))
|
|
2275
|
-
],
|
|
2276
|
-
onClick: t[9] || (t[9] = oe((...u) => e.toggleMenu && e.toggleMenu(...u), ["stop"]))
|
|
2277
|
-
}, null, 46, ko),
|
|
2278
|
-
e.filterable ? (K(), ce("span", {
|
|
2279
|
-
key: 0,
|
|
2280
|
-
ref: "calculatorRef",
|
|
2281
|
-
"aria-hidden": "true",
|
|
2282
|
-
class: N(e.nsSelect.e("input-calculator")),
|
|
2283
|
-
textContent: me(e.states.inputValue)
|
|
2284
|
-
}, null, 10, $o)) : he("v-if", !0)
|
|
2285
|
-
],
|
|
2286
|
-
2
|
|
2287
|
-
/* CLASS */
|
|
2288
|
-
),
|
|
2289
|
-
e.shouldShowPlaceholder ? (K(), ce(
|
|
2290
|
-
"div",
|
|
2291
|
-
{
|
|
2292
|
-
key: 1,
|
|
2293
|
-
class: N([
|
|
2294
|
-
e.nsSelect.e("selected-item"),
|
|
2295
|
-
e.nsSelect.e("placeholder"),
|
|
2296
|
-
e.nsSelect.is(
|
|
2297
|
-
"transparent",
|
|
2298
|
-
!e.hasModelValue || e.expanded && !e.states.inputValue
|
|
2299
|
-
)
|
|
2300
|
-
])
|
|
2301
|
-
},
|
|
2302
|
-
[
|
|
2303
|
-
e.hasModelValue ? ue(e.$slots, "label", {
|
|
2304
|
-
key: 0,
|
|
2305
|
-
index: (V = (m = e.allOptionsValueMap.get(e.modelValue)) == null ? void 0 : m.index) != null ? V : -1,
|
|
2306
|
-
label: e.currentPlaceholder,
|
|
2307
|
-
value: e.modelValue
|
|
2308
|
-
}, () => [
|
|
2309
|
-
j(
|
|
2310
|
-
"span",
|
|
2311
|
-
null,
|
|
2312
|
-
me(e.currentPlaceholder),
|
|
2313
|
-
1
|
|
2314
|
-
/* TEXT */
|
|
2315
|
-
)
|
|
2316
|
-
]) : (K(), ce(
|
|
2317
|
-
"span",
|
|
2318
|
-
Ao,
|
|
2319
|
-
me(e.currentPlaceholder),
|
|
2320
|
-
1
|
|
2321
|
-
/* TEXT */
|
|
2322
|
-
))
|
|
2323
|
-
],
|
|
2324
|
-
2
|
|
2325
|
-
/* CLASS */
|
|
2326
|
-
)) : he("v-if", !0)
|
|
2327
|
-
],
|
|
2328
|
-
2
|
|
2329
|
-
/* CLASS */
|
|
2330
|
-
),
|
|
2331
|
-
j(
|
|
2332
|
-
"div",
|
|
2333
|
-
{
|
|
2334
|
-
ref: "suffixRef",
|
|
2335
|
-
class: N(e.nsSelect.e("suffix"))
|
|
2336
|
-
},
|
|
2337
|
-
[
|
|
2338
|
-
e.iconComponent ? Wt((K(), ye(y, {
|
|
2339
|
-
key: 0,
|
|
2340
|
-
class: N([e.nsSelect.e("caret"), e.nsInput.e("icon"), e.iconReverse])
|
|
2341
|
-
}, {
|
|
2342
|
-
default: X(() => [
|
|
2343
|
-
(K(), ye(Be(e.iconComponent)))
|
|
2344
|
-
]),
|
|
2345
|
-
_: 1
|
|
2346
|
-
/* STABLE */
|
|
2347
|
-
}, 8, ["class"])), [
|
|
2348
|
-
[mn, !e.showClearBtn]
|
|
2349
|
-
]) : he("v-if", !0),
|
|
2350
|
-
e.showClearBtn && e.clearIcon ? (K(), ye(y, {
|
|
2351
|
-
key: 1,
|
|
2352
|
-
class: N([
|
|
2353
|
-
e.nsSelect.e("caret"),
|
|
2354
|
-
e.nsInput.e("icon"),
|
|
2355
|
-
e.nsSelect.e("clear")
|
|
2356
|
-
]),
|
|
2357
|
-
onClick: oe(e.handleClear, ["prevent", "stop"])
|
|
2358
|
-
}, {
|
|
2359
|
-
default: X(() => [
|
|
2360
|
-
(K(), ye(Be(e.clearIcon)))
|
|
2361
|
-
]),
|
|
2362
|
-
_: 1
|
|
2363
|
-
/* STABLE */
|
|
2364
|
-
}, 8, ["class", "onClick"])) : he("v-if", !0),
|
|
2365
|
-
e.validateState && e.validateIcon && e.needStatusIcon ? (K(), ye(y, {
|
|
2366
|
-
key: 2,
|
|
2367
|
-
class: N([
|
|
2368
|
-
e.nsInput.e("icon"),
|
|
2369
|
-
e.nsInput.e("validateIcon"),
|
|
2370
|
-
e.nsInput.is("loading", e.validateState === "validating")
|
|
2371
|
-
])
|
|
2372
|
-
}, {
|
|
2373
|
-
default: X(() => [
|
|
2374
|
-
(K(), ye(Be(e.validateIcon)))
|
|
2375
|
-
]),
|
|
2376
|
-
_: 1
|
|
2377
|
-
/* STABLE */
|
|
2378
|
-
}, 8, ["class"])) : he("v-if", !0)
|
|
2379
|
-
],
|
|
2380
|
-
2
|
|
2381
|
-
/* CLASS */
|
|
2382
|
-
)
|
|
2383
|
-
],
|
|
2384
|
-
2
|
|
2385
|
-
/* CLASS */
|
|
2386
|
-
)
|
|
2387
|
-
];
|
|
2388
|
-
}),
|
|
2389
|
-
content: X(() => [
|
|
2390
|
-
de(S, {
|
|
2391
|
-
id: e.contentId,
|
|
2392
|
-
ref: "menuRef",
|
|
2393
|
-
data: e.filteredOptions,
|
|
2394
|
-
width: e.popperSize - e.BORDER_HORIZONTAL_WIDTH,
|
|
2395
|
-
"hovering-index": e.states.hoveringIndex,
|
|
2396
|
-
"scrollbar-always-on": e.scrollbarAlwaysOn,
|
|
2397
|
-
"aria-label": e.ariaLabel
|
|
2398
|
-
}, cn({
|
|
2399
|
-
default: X((m) => [
|
|
2400
|
-
ue(e.$slots, "default", dn(fn(m)))
|
|
2401
|
-
]),
|
|
2402
|
-
_: 2
|
|
2403
|
-
/* DYNAMIC */
|
|
2404
|
-
}, [
|
|
2405
|
-
e.$slots.header ? {
|
|
2406
|
-
name: "header",
|
|
2407
|
-
fn: X(() => [
|
|
2408
|
-
j(
|
|
2409
|
-
"div",
|
|
2410
|
-
{
|
|
2411
|
-
class: N(e.nsSelect.be("dropdown", "header")),
|
|
2412
|
-
onClick: t[11] || (t[11] = oe(() => {
|
|
2413
|
-
}, ["stop"]))
|
|
2414
|
-
},
|
|
2415
|
-
[
|
|
2416
|
-
ue(e.$slots, "header")
|
|
2417
|
-
],
|
|
2418
|
-
2
|
|
2419
|
-
/* CLASS */
|
|
2420
|
-
)
|
|
2421
|
-
]),
|
|
2422
|
-
key: "0"
|
|
2423
|
-
} : void 0,
|
|
2424
|
-
e.$slots.loading && e.loading ? {
|
|
2425
|
-
name: "loading",
|
|
2426
|
-
fn: X(() => [
|
|
2427
|
-
j(
|
|
2428
|
-
"div",
|
|
2429
|
-
{
|
|
2430
|
-
class: N(e.nsSelect.be("dropdown", "loading"))
|
|
2431
|
-
},
|
|
2432
|
-
[
|
|
2433
|
-
ue(e.$slots, "loading")
|
|
2434
|
-
],
|
|
2435
|
-
2
|
|
2436
|
-
/* CLASS */
|
|
2437
|
-
)
|
|
2438
|
-
]),
|
|
2439
|
-
key: "1"
|
|
2440
|
-
} : e.loading || e.filteredOptions.length === 0 ? {
|
|
2441
|
-
name: "empty",
|
|
2442
|
-
fn: X(() => [
|
|
2443
|
-
j(
|
|
2444
|
-
"div",
|
|
2445
|
-
{
|
|
2446
|
-
class: N(e.nsSelect.be("dropdown", "empty"))
|
|
2447
|
-
},
|
|
2448
|
-
[
|
|
2449
|
-
ue(e.$slots, "empty", {}, () => [
|
|
2450
|
-
j(
|
|
2451
|
-
"span",
|
|
2452
|
-
null,
|
|
2453
|
-
me(e.emptyText),
|
|
2454
|
-
1
|
|
2455
|
-
/* TEXT */
|
|
2456
|
-
)
|
|
2457
|
-
])
|
|
2458
|
-
],
|
|
2459
|
-
2
|
|
2460
|
-
/* CLASS */
|
|
2461
|
-
)
|
|
2462
|
-
]),
|
|
2463
|
-
key: "2"
|
|
2464
|
-
} : void 0,
|
|
2465
|
-
e.$slots.footer ? {
|
|
2466
|
-
name: "footer",
|
|
2467
|
-
fn: X(() => [
|
|
2468
|
-
j(
|
|
2469
|
-
"div",
|
|
2470
|
-
{
|
|
2471
|
-
class: N(e.nsSelect.be("dropdown", "footer")),
|
|
2472
|
-
onClick: t[12] || (t[12] = oe(() => {
|
|
2473
|
-
}, ["stop"]))
|
|
2474
|
-
},
|
|
2475
|
-
[
|
|
2476
|
-
ue(e.$slots, "footer")
|
|
2477
|
-
],
|
|
2478
|
-
2
|
|
2479
|
-
/* CLASS */
|
|
2480
|
-
)
|
|
2481
|
-
]),
|
|
2482
|
-
key: "3"
|
|
2483
|
-
} : void 0
|
|
2484
|
-
]), 1032, ["id", "data", "width", "hovering-index", "scrollbar-always-on", "aria-label"])
|
|
2485
|
-
]),
|
|
2486
|
-
_: 3
|
|
2487
|
-
/* FORWARDED */
|
|
2488
|
-
}, 8, ["visible", "teleported", "popper-class", "popper-style", "popper-options", "fallback-placements", "effect", "placement", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow"])
|
|
2489
|
-
],
|
|
2490
|
-
34
|
|
2491
|
-
/* CLASS, NEED_HYDRATION */
|
|
2492
|
-
)), [
|
|
2493
|
-
[i, e.handleClickOutside, e.popperRef]
|
|
2494
|
-
]);
|
|
2495
|
-
}
|
|
2496
|
-
var Fo = /* @__PURE__ */ St(Do, [["render", Bo]]);
|
|
2497
|
-
const la = An(Fo);
|
|
2498
|
-
export {
|
|
2499
|
-
la as ElSelectV2,
|
|
2500
|
-
la as default,
|
|
2501
|
-
Ot as selectV2InjectionKey
|
|
2502
|
-
};
|