ep-craft 0.1.34 → 0.1.35
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/carousel/EpCarousel.vue.d.ts +39 -0
- package/dist/components/carousel/EpCarousel.vue.js +227 -0
- package/dist/components/carousel/EpCarousel2.vue.js +4 -0
- package/dist/components/carousel/carousel.d.ts +86 -0
- package/dist/components/carousel/carousel.js +113 -0
- package/dist/components/carousel/constants.d.ts +32 -0
- package/dist/components/carousel/constants.js +5 -0
- package/dist/components/carousel/index.d.ts +28 -2
- package/dist/components/carousel/index.js +11 -4
- package/dist/components/carousel/instance.d.ts +8 -0
- package/dist/components/carousel/use-carousel.d.ts +41 -0
- package/dist/components/carousel/use-carousel.js +200 -0
- package/dist/components/carousel-item/EpCarouselItem.vue.d.ts +16 -0
- package/dist/components/carousel-item/EpCarouselItem.vue.js +74 -0
- package/dist/components/carousel-item/EpCarouselItem2.vue.js +4 -0
- package/dist/components/carousel-item/carousel-item.d.ts +22 -0
- package/dist/components/carousel-item/carousel-item.js +22 -0
- package/dist/components/carousel-item/index.d.ts +14 -2
- package/dist/components/carousel-item/index.js +9 -4
- package/dist/components/carousel-item/use-carousel-item.d.ts +14 -0
- package/dist/components/carousel-item/use-carousel-item.js +79 -0
- package/dist/components/cascader/EpCascader.vue.d.ts +232 -0
- package/dist/components/cascader/EpCascader.vue.js +757 -0
- package/dist/components/cascader/EpCascader2.vue.js +4 -0
- package/dist/components/cascader/cascader.d.ts +313 -0
- package/dist/components/cascader/cascader.js +210 -0
- package/dist/components/cascader/index.d.ts +17 -2
- package/dist/components/cascader/index.js +9 -3
- package/dist/components/cascader/instances.d.ts +2 -0
- package/dist/components/cascader-panel/EpCascaderMenu.vue.d.ts +32 -0
- package/dist/components/cascader-panel/EpCascaderMenu.vue.js +204 -0
- package/dist/components/cascader-panel/EpCascaderMenu2.vue.js +4 -0
- package/dist/components/cascader-panel/EpCascaderNode.vue.d.ts +11 -0
- package/dist/components/cascader-panel/EpCascaderNode.vue.js +134 -0
- package/dist/components/cascader-panel/EpCascaderNode2.vue.js +4 -0
- package/dist/components/cascader-panel/EpCascaderPanel.vue.d.ts +290 -0
- package/dist/components/cascader-panel/EpCascaderPanel.vue.js +266 -0
- package/dist/components/cascader-panel/EpCascaderPanel2.vue.js +4 -0
- package/dist/components/cascader-panel/config.d.ts +102 -0
- package/dist/components/cascader-panel/config.js +136 -0
- package/dist/components/cascader-panel/index.d.ts +17 -2
- package/dist/components/cascader-panel/index.js +21 -4
- package/dist/components/cascader-panel/instance.d.ts +4 -0
- package/dist/components/cascader-panel/node-content.d.ts +14 -0
- package/dist/components/cascader-panel/node-content.js +50 -0
- package/dist/components/cascader-panel/node.d.ts +50 -0
- package/dist/components/cascader-panel/node.js +75 -0
- package/dist/components/cascader-panel/store.d.ts +17 -0
- package/dist/components/cascader-panel/store.js +49 -0
- package/dist/components/cascader-panel/types.d.ts +64 -0
- package/dist/components/cascader-panel/types.js +4 -0
- package/dist/components/cascader-panel/utils.d.ts +4 -0
- package/dist/components/cascader-panel/utils.js +26 -0
- package/dist/components/checkbox/EpCheckbox.vue.d.ts +1 -1
- package/dist/components/checkbox-button/EpCheckboxButton.vue.d.ts +1 -1
- package/dist/components/checkbox-group/index.js +4 -3
- package/dist/components/collapse-transition/index.js +4 -3
- package/dist/components/color-picker/EpColorPicker.vue.d.ts +53 -0
- package/dist/components/color-picker/EpColorPicker.vue.js +318 -0
- package/dist/components/color-picker/EpColorPicker2.vue.js +4 -0
- package/dist/components/color-picker/color-picker.d.ts +240 -0
- package/dist/components/color-picker/color-picker.js +124 -0
- package/dist/components/color-picker/index.d.ts +16 -2
- package/dist/components/color-picker/index.js +11 -4
- package/dist/components/color-picker-panel/EpColorPickerPanel.vue.d.ts +413 -0
- package/dist/components/color-picker-panel/EpColorPickerPanel.vue.js +142 -0
- package/dist/components/color-picker-panel/EpColorPickerPanel2.vue.js +4 -0
- package/dist/components/color-picker-panel/color-picker-panel.d.ts +91 -0
- package/dist/components/color-picker-panel/color-picker-panel.js +71 -0
- package/dist/components/color-picker-panel/components/EpAlphaSlider.vue.d.ts +19 -0
- package/dist/components/color-picker-panel/components/EpAlphaSlider.vue.js +92 -0
- package/dist/components/color-picker-panel/components/EpAlphaSlider2.vue.js +4 -0
- package/dist/components/color-picker-panel/components/EpHueSlider.vue.d.ts +20 -0
- package/dist/components/color-picker-panel/components/EpHueSlider.vue.js +84 -0
- package/dist/components/color-picker-panel/components/EpHueSlider2.vue.js +4 -0
- package/dist/components/color-picker-panel/components/EpPredefine.vue.d.ts +3 -0
- package/dist/components/color-picker-panel/components/EpPredefine.vue.js +39 -0
- package/dist/components/color-picker-panel/components/EpPredefine2.vue.js +4 -0
- package/dist/components/color-picker-panel/components/EpSvPanel.vue.d.ts +8 -0
- package/dist/components/color-picker-panel/components/EpSvPanel.vue.js +67 -0
- package/dist/components/color-picker-panel/components/EpSvPanel2.vue.js +4 -0
- package/dist/components/color-picker-panel/composables/use-common-color.d.ts +11 -0
- package/dist/components/color-picker-panel/composables/use-common-color.js +23 -0
- package/dist/components/color-picker-panel/composables/use-predefine.d.ts +14 -0
- package/dist/components/color-picker-panel/composables/use-predefine.js +66 -0
- package/dist/components/color-picker-panel/composables/use-slider.d.ts +35 -0
- package/dist/components/color-picker-panel/composables/use-slider.js +152 -0
- package/dist/components/color-picker-panel/composables/use-sv-panel.d.ts +25 -0
- package/dist/components/color-picker-panel/composables/use-sv-panel.js +123 -0
- package/dist/components/color-picker-panel/index.d.ts +4 -0
- package/dist/components/color-picker-panel/props/predefine.d.ts +36 -0
- package/dist/components/color-picker-panel/props/slider.d.ts +39 -0
- package/dist/components/color-picker-panel/props/sv-panel.d.ts +22 -0
- package/dist/components/color-picker-panel/utils/color.d.ts +28 -0
- package/dist/components/color-picker-panel/utils/color.js +62 -0
- package/dist/components/color-picker-panel/utils/draggable.d.ts +6 -0
- package/dist/components/color-picker-panel/utils/draggable.js +23 -0
- package/dist/components/descriptions/EpDescriptions.vue.d.ts +20 -0
- package/dist/components/descriptions/EpDescriptions.vue.js +100 -0
- package/dist/components/descriptions/EpDescriptions2.vue.js +4 -0
- package/dist/components/descriptions/EpDescriptionsRow.vue.d.ts +5 -0
- package/dist/components/descriptions/EpDescriptionsRow.vue.js +56 -0
- package/dist/components/descriptions/EpDescriptionsRow2.vue.js +4 -0
- package/dist/components/descriptions/constants.d.ts +1 -0
- package/dist/components/descriptions/constants.js +4 -0
- package/dist/components/descriptions/description.d.ts +66 -0
- package/dist/components/descriptions/description.js +61 -0
- package/dist/components/descriptions/descriptions-cell.d.ts +31 -0
- package/dist/components/descriptions/descriptions-cell.js +133 -0
- package/dist/components/descriptions/descriptions-row.d.ts +10 -0
- package/dist/components/descriptions/descriptions.type.d.ts +29 -0
- package/dist/components/descriptions/index.d.ts +22 -2
- package/dist/components/descriptions/index.js +9 -3
- package/dist/components/descriptions/token.d.ts +3 -0
- package/dist/components/descriptions/token.js +4 -0
- package/dist/components/descriptions-item/description-item.d.ts +84 -0
- package/dist/components/descriptions-item/description-item.js +87 -0
- package/dist/components/descriptions-item/index.d.ts +14 -2
- package/dist/components/descriptions-item/index.js +6 -4
- package/dist/components/dropdown/src/dropdown-item-impl2.vue.js +1 -1
- package/dist/components/dropdown/src/dropdown-item2.vue.js +1 -1
- package/dist/components/dropdown/src/dropdown-menu2.vue.js +1 -1
- package/dist/components/dropdown/src/dropdown2.vue.js +1 -1
- package/dist/components/input-number/index.js +3 -2
- package/dist/components/mention/EpMention.vue.d.ts +430 -0
- package/dist/components/mention/EpMention.vue.js +303 -0
- package/dist/components/mention/EpMention2.vue.js +4 -0
- package/dist/components/mention/EpMentionDropdown.vue.d.ts +34 -0
- package/dist/components/mention/EpMentionDropdown.vue.js +140 -0
- package/dist/components/mention/EpMentionDropdown2.vue.js +4 -0
- package/dist/components/mention/helper.d.ts +32 -0
- package/dist/components/mention/helper.js +112 -0
- package/dist/components/mention/index.d.ts +13 -2
- package/dist/components/mention/index.js +11 -4
- package/dist/components/mention/mention-dropdown.d.ts +21 -0
- package/dist/components/mention/mention-dropdown.js +22 -0
- package/dist/components/mention/mention.d.ts +313 -0
- package/dist/components/mention/mention.js +123 -0
- package/dist/components/mention/types.d.ts +19 -0
- package/dist/components/radio/index.js +4 -3
- package/dist/components/rate/EpRate.vue.d.ts +32 -0
- package/dist/components/rate/EpRate.vue.js +229 -0
- package/dist/components/rate/EpRate2.vue.js +4 -0
- package/dist/components/rate/index.d.ts +15 -2
- package/dist/components/rate/index.js +7 -4
- package/dist/components/rate/rate.d.ts +131 -0
- package/dist/components/rate/rate.js +158 -0
- package/dist/components/roving-focus-group/index.js +1 -1
- package/dist/components/roving-focus-group/src/roving-focus-item.vue.js +76 -18
- package/dist/components/roving-focus-group/src/roving-focus-item2.vue.js +18 -76
- package/dist/components/segmented/EpSegmented.vue.d.ts +22 -0
- package/dist/components/segmented/EpSegmented.vue.js +136 -0
- package/dist/components/segmented/EpSegmented2.vue.js +4 -0
- package/dist/components/segmented/index.d.ts +14 -2
- package/dist/components/segmented/index.js +11 -4
- package/dist/components/segmented/segmented.d.ts +85 -0
- package/dist/components/segmented/segmented.js +85 -0
- package/dist/components/segmented/types.d.ts +1 -0
- package/dist/components/select/index.d.ts +4 -2
- package/dist/components/select/index.js +3 -2
- package/dist/components/select/select2.vue.js +60 -61
- package/dist/components/select-v2/src/select.vue.d.ts +1 -1
- package/dist/components/slider/EpSlider.vue.d.ts +175 -0
- package/dist/components/slider/EpSlider.vue.js +211 -0
- package/dist/components/slider/EpSlider2.vue.js +4 -0
- package/dist/components/slider/EpSliderButton.vue.d.ts +26 -0
- package/dist/components/slider/EpSliderButton.vue.js +103 -0
- package/dist/components/slider/EpSliderButton2.vue.js +4 -0
- package/dist/components/slider/button.d.ts +28 -0
- package/dist/components/slider/button.js +28 -0
- package/dist/components/slider/composables/index.d.ts +7 -0
- package/dist/components/slider/composables/use-lifecycle.d.ts +4 -0
- package/dist/components/slider/composables/use-lifecycle.js +20 -0
- package/dist/components/slider/composables/use-marks.d.ts +7 -0
- package/dist/components/slider/composables/use-marks.js +30 -0
- package/dist/components/slider/composables/use-slide.d.ts +23 -0
- package/dist/components/slider/composables/use-slide.js +92 -0
- package/dist/components/slider/composables/use-slider-button.d.ts +18 -0
- package/dist/components/slider/composables/use-slider-button.js +179 -0
- package/dist/components/slider/composables/use-stops.d.ts +8 -0
- package/dist/components/slider/composables/use-stops.js +23 -0
- package/dist/components/slider/composables/use-watch.d.ts +4 -0
- package/dist/components/slider/composables/use-watch.js +42 -0
- package/dist/components/slider/constants.d.ts +17 -0
- package/dist/components/slider/constants.js +4 -0
- package/dist/components/slider/index.d.ts +18 -2
- package/dist/components/slider/index.js +10 -4
- package/dist/components/slider/marker.d.ts +64 -0
- package/dist/components/slider/marker.js +40 -0
- package/dist/components/slider/slider.d.ts +80 -0
- package/dist/components/slider/slider.js +170 -0
- package/dist/components/step/EpStep.vue.d.ts +38 -0
- package/dist/components/step/EpStep.vue.js +157 -0
- package/dist/components/step/EpStep2.vue.js +4 -0
- package/dist/components/step/index.d.ts +12 -2
- package/dist/components/step/index.js +8 -3
- package/dist/components/step/step.d.ts +42 -0
- package/dist/components/step/step.js +39 -0
- package/dist/components/steps/EpSteps.vue.d.ts +23 -0
- package/dist/components/steps/EpSteps.vue.js +57 -0
- package/dist/components/steps/EpSteps2.vue.js +4 -0
- package/dist/components/steps/index.d.ts +20 -2
- package/dist/components/steps/index.js +8 -4
- package/dist/components/steps/steps.d.ts +69 -0
- package/dist/components/steps/steps.js +66 -0
- package/dist/components/steps/tokens.d.ts +1 -0
- package/dist/components/steps/tokens.js +4 -0
- package/dist/components/switch/EpSwitch.vue.d.ts +50 -0
- package/dist/components/switch/EpSwitch.vue.js +251 -0
- package/dist/components/switch/EpSwitch2.vue.js +4 -0
- package/dist/components/switch/index.d.ts +15 -2
- package/dist/components/switch/index.js +10 -4
- package/dist/components/switch/switch.d.ts +157 -0
- package/dist/components/switch/switch.js +145 -0
- package/dist/components/table/src/filter-panel.vue.d.ts +3 -3
- package/dist/components/table/src/table-header/index.d.ts +3 -3
- package/dist/components/text/index.d.ts +4 -2
- package/dist/components/text/index.js +7 -4
- package/dist/components/text/src/text.d.ts +43 -0
- package/dist/components/text/src/text.js +45 -0
- package/dist/components/text/src/text.vue.d.ts +17 -0
- package/dist/components/text/src/text.vue.js +63 -0
- package/dist/components/text/src/text2.vue.js +4 -0
- package/dist/components/time-select/EpTimeSelect.vue.d.ts +38 -0
- package/dist/components/time-select/EpTimeSelect.vue.js +154 -0
- package/dist/components/time-select/EpTimeSelect2.vue.js +4 -0
- package/dist/components/time-select/index.d.ts +17 -2
- package/dist/components/time-select/index.js +12 -4
- package/dist/components/time-select/time-select.d.ts +143 -0
- package/dist/components/time-select/time-select.js +139 -0
- package/dist/components/time-select/utils.d.ts +11 -0
- package/dist/components/time-select/utils.js +39 -0
- package/dist/components/tour/EpTour.vue.d.ts +40 -0
- package/dist/components/tour/EpTour.vue.js +174 -0
- package/dist/components/tour/EpTour2.vue.js +4 -0
- package/dist/components/tour/EpTourContent.vue.d.ts +23 -0
- package/dist/components/tour/EpTourContent.vue.js +72 -0
- package/dist/components/tour/EpTourContent2.vue.js +4 -0
- package/dist/components/tour/EpTourMask.vue.d.ts +7 -0
- package/dist/components/tour/EpTourMask.vue.js +76 -0
- package/dist/components/tour/EpTourMask2.vue.js +4 -0
- package/dist/components/tour/constants.d.ts +10 -0
- package/dist/components/tour/constants.js +4 -0
- package/dist/components/tour/content.d.ts +49 -0
- package/dist/components/tour/content.js +70 -0
- package/dist/components/tour/helper.d.ts +36 -0
- package/dist/components/tour/helper.js +161 -0
- package/dist/components/tour/index.d.ts +28 -2
- package/dist/components/tour/index.js +19 -4
- package/dist/components/tour/mask.d.ts +43 -0
- package/dist/components/tour/steps.d.ts +19 -0
- package/dist/components/tour/steps.js +35 -0
- package/dist/components/tour/tour.d.ts +136 -0
- package/dist/components/tour/tour.js +120 -0
- package/dist/components/tour/types.d.ts +21 -0
- package/dist/components/tour-step/EpTourStep.vue.d.ts +25 -0
- package/dist/components/tour-step/EpTourStep.vue.js +179 -0
- package/dist/components/tour-step/EpTourStep2.vue.js +4 -0
- package/dist/components/tour-step/index.d.ts +13 -2
- package/dist/components/tour-step/index.js +10 -4
- package/dist/components/tour-step/step.d.ts +120 -0
- package/dist/components/tour-step/step.js +91 -0
- package/dist/components/transfer/EpTransfer.vue.d.ts +36 -0
- package/dist/components/transfer/EpTransfer.vue.js +195 -0
- package/dist/components/transfer/EpTransfer2.vue.js +4 -0
- package/dist/components/transfer/EpTransferPanel.vue.d.ts +24 -0
- package/dist/components/transfer/EpTransferPanel.vue.js +191 -0
- package/dist/components/transfer/EpTransferPanel2.vue.js +4 -0
- package/dist/components/transfer/composables/index.d.ts +5 -0
- package/dist/components/transfer/composables/use-check.d.ts +286 -0
- package/dist/components/transfer/composables/use-check.js +89 -0
- package/dist/components/transfer/composables/use-checked-change.d.ts +6 -0
- package/dist/components/transfer/composables/use-checked-change.js +12 -0
- package/dist/components/transfer/composables/use-computed-data.d.ts +5 -0
- package/dist/components/transfer/composables/use-computed-data.js +26 -0
- package/dist/components/transfer/composables/use-move.d.ts +6 -0
- package/dist/components/transfer/composables/use-move.js +27 -0
- package/dist/components/transfer/composables/use-props-alias.d.ts +8 -0
- package/dist/components/transfer/composables/use-props-alias.js +15 -0
- package/dist/components/transfer/index.d.ts +19 -2
- package/dist/components/transfer/index.js +13 -4
- package/dist/components/transfer/transfer-panel.d.ts +63 -0
- package/dist/components/transfer/transfer-panel.js +32 -0
- package/dist/components/transfer/transfer.d.ts +136 -0
- package/dist/components/transfer/transfer.js +130 -0
- package/dist/components/tree/index.d.ts +7 -2
- package/dist/components/tree/index.js +8 -4
- package/dist/components/tree/src/instance.d.ts +2 -0
- package/dist/components/tree/src/model/node.d.ts +63 -0
- package/dist/components/tree/src/model/node.js +263 -0
- package/dist/components/tree/src/model/tree-store.d.ts +51 -0
- package/dist/components/tree/src/model/tree-store.js +223 -0
- package/dist/components/tree/src/model/useDragNode.d.ts +459 -0
- package/dist/components/tree/src/model/useDragNode.js +98 -0
- package/dist/components/tree/src/model/useKeydown.d.ts +7 -0
- package/dist/components/tree/src/model/useKeydown.js +93 -0
- package/dist/components/tree/src/model/useNodeExpandEventBroadcast.d.ts +9 -0
- package/dist/components/tree/src/model/useNodeExpandEventBroadcast.js +27 -0
- package/dist/components/tree/src/model/util.d.ts +7 -0
- package/dist/components/tree/src/model/util.js +19 -0
- package/dist/components/tree/src/tokens.d.ts +3 -0
- package/dist/components/tree/src/tokens.js +6 -0
- package/dist/components/tree/src/tree-node-content.vue.d.ts +14 -0
- package/dist/components/tree/src/tree-node-content.vue.js +43 -0
- package/dist/components/tree/src/tree-node-content2.vue.js +4 -0
- package/dist/components/tree/src/tree-node.vue.d.ts +377 -0
- package/dist/components/tree/src/tree-node.vue.js +108 -0
- package/dist/components/tree/src/tree-node2.vue.js +166 -0
- package/dist/components/tree/src/tree.d.ts +103 -0
- package/dist/components/tree/src/tree.js +99 -0
- package/dist/components/tree/src/tree.type.d.ts +112 -0
- package/dist/components/tree/src/tree.vue.d.ts +1745 -0
- package/dist/components/tree/src/tree.vue.js +48 -0
- package/dist/components/tree/src/tree2.vue.js +192 -0
- package/dist/components/tree-select/index.d.ts +3 -2
- package/dist/components/tree-select/index.js +7 -4
- package/dist/components/tree-select/src/cache-options.d.ts +20 -0
- package/dist/components/tree-select/src/cache-options.js +36 -0
- package/dist/components/tree-select/src/instance.d.ts +6 -0
- package/dist/components/tree-select/src/select.d.ts +11 -0
- package/dist/components/tree-select/src/select.js +92 -0
- package/dist/components/tree-select/src/tree-select-option.d.ts +364 -0
- package/dist/components/tree-select/src/tree-select-option.js +32 -0
- package/dist/components/tree-select/src/tree-select.vue.d.ts +412 -0
- package/dist/components/tree-select/src/tree-select.vue.js +96 -0
- package/dist/components/tree-select/src/tree-select2.vue.js +4 -0
- package/dist/components/tree-select/src/tree.d.ts +12 -0
- package/dist/components/tree-select/src/tree.js +179 -0
- package/dist/components/tree-select/src/utils.d.ts +10 -0
- package/dist/components/tree-select/src/utils.js +49 -0
- package/dist/components/upload/src/upload-content.vue.d.ts +2 -2
- package/dist/components/upload/src/upload.vue.d.ts +2 -2
- package/dist/constants/column-alignment.js +4 -0
- package/dist/ep-craft.js +367 -279
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-lockscreen/index.d.ts +11 -0
- package/dist/hooks/use-lockscreen/index.js +34 -0
- package/dist/index.d.ts +98 -0
- package/dist/utils/arrays.js +4 -3
- package/dist/utils/dom/aria.js +23 -13
- package/dist/utils/dom/scroll.js +61 -46
- package/dist/utils/vue/icon.js +17 -14
- package/dist/utils/vue/validator.js +5 -0
- package/dist/utils/vue/vnode.js +24 -12
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +69 -5
- package/package.json +3 -2
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { ComponentSize } from '@element-plus/constants';
|
|
2
|
+
import type { ExtractPublicPropTypes, PropType } from 'vue';
|
|
3
|
+
import type { IconPropType } from '@element-plus/utils';
|
|
4
|
+
import type Switch from './EpSwitch.vue';
|
|
5
|
+
export interface SwitchProps {
|
|
6
|
+
/**
|
|
7
|
+
* @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type
|
|
8
|
+
*/
|
|
9
|
+
modelValue?: boolean | string | number;
|
|
10
|
+
/**
|
|
11
|
+
* @description whether Switch is disabled
|
|
12
|
+
*/
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @description whether Switch is in loading state
|
|
16
|
+
*/
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @description size of Switch
|
|
20
|
+
*/
|
|
21
|
+
size?: ComponentSize;
|
|
22
|
+
/**
|
|
23
|
+
* @description width of Switch
|
|
24
|
+
*/
|
|
25
|
+
width?: string | number;
|
|
26
|
+
/**
|
|
27
|
+
* @description whether icon or text is displayed inside dot, only the first character will be rendered for text
|
|
28
|
+
*/
|
|
29
|
+
inlinePrompt?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @description component of the icon displayed in action when in `off` state
|
|
32
|
+
*/
|
|
33
|
+
inactiveActionIcon?: IconPropType;
|
|
34
|
+
/**
|
|
35
|
+
* @description component of the icon displayed in action when in `on` state
|
|
36
|
+
*/
|
|
37
|
+
activeActionIcon?: IconPropType;
|
|
38
|
+
/**
|
|
39
|
+
* @description component of the icon displayed when in `on` state, overrides `active-text`
|
|
40
|
+
*/
|
|
41
|
+
activeIcon?: IconPropType;
|
|
42
|
+
/**
|
|
43
|
+
* @description component of the icon displayed when in `off` state, overrides `inactive-text`
|
|
44
|
+
*/
|
|
45
|
+
inactiveIcon?: IconPropType;
|
|
46
|
+
/**
|
|
47
|
+
* @description text displayed when in `on` state
|
|
48
|
+
*/
|
|
49
|
+
activeText?: string;
|
|
50
|
+
/**
|
|
51
|
+
* @description text displayed when in `off` state
|
|
52
|
+
*/
|
|
53
|
+
inactiveText?: string;
|
|
54
|
+
/**
|
|
55
|
+
* @description switch value when in `on` state
|
|
56
|
+
*/
|
|
57
|
+
activeValue?: boolean | string | number;
|
|
58
|
+
/**
|
|
59
|
+
* @description switch value when in `off` state
|
|
60
|
+
*/
|
|
61
|
+
inactiveValue?: boolean | string | number;
|
|
62
|
+
/**
|
|
63
|
+
* @description input name of Switch
|
|
64
|
+
*/
|
|
65
|
+
name?: string;
|
|
66
|
+
/**
|
|
67
|
+
* @description whether to trigger form validation
|
|
68
|
+
*/
|
|
69
|
+
validateEvent?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* @description before-change hook before the switch state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop switching
|
|
72
|
+
*/
|
|
73
|
+
beforeChange?: () => Promise<boolean> | boolean;
|
|
74
|
+
/**
|
|
75
|
+
* @description id for input
|
|
76
|
+
*/
|
|
77
|
+
id?: string;
|
|
78
|
+
/**
|
|
79
|
+
* @description tabindex for input
|
|
80
|
+
*/
|
|
81
|
+
tabindex?: string | number;
|
|
82
|
+
/**
|
|
83
|
+
* @description native `aria-label` attribute
|
|
84
|
+
*/
|
|
85
|
+
ariaLabel?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated Removed after 3.0.0, Use `SwitchProps` instead.
|
|
89
|
+
*/
|
|
90
|
+
export declare const switchProps: {
|
|
91
|
+
readonly ariaLabel: StringConstructor;
|
|
92
|
+
readonly modelValue: import("@element-plus/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, false, boolean>;
|
|
93
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
94
|
+
readonly loading: BooleanConstructor;
|
|
95
|
+
readonly size: {
|
|
96
|
+
readonly type: PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => "" | "small" | "default" | "large") | (() => "" | "small" | "default" | "large") | (((new (...args: any[]) => "" | "small" | "default" | "large") | (() => "" | "small" | "default" | "large")) | null)[], unknown, "" | "small" | "default" | "large">>;
|
|
97
|
+
readonly required: false;
|
|
98
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
99
|
+
__epPropKey: true;
|
|
100
|
+
};
|
|
101
|
+
readonly width: import("@element-plus/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
102
|
+
readonly inlinePrompt: BooleanConstructor;
|
|
103
|
+
readonly inactiveActionIcon: {
|
|
104
|
+
readonly type: PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
105
|
+
readonly required: false;
|
|
106
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
107
|
+
__epPropKey: true;
|
|
108
|
+
};
|
|
109
|
+
readonly activeActionIcon: {
|
|
110
|
+
readonly type: PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
111
|
+
readonly required: false;
|
|
112
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
113
|
+
__epPropKey: true;
|
|
114
|
+
};
|
|
115
|
+
readonly activeIcon: {
|
|
116
|
+
readonly type: PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
117
|
+
readonly required: false;
|
|
118
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
119
|
+
__epPropKey: true;
|
|
120
|
+
};
|
|
121
|
+
readonly inactiveIcon: {
|
|
122
|
+
readonly type: PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
123
|
+
readonly required: false;
|
|
124
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
125
|
+
__epPropKey: true;
|
|
126
|
+
};
|
|
127
|
+
readonly activeText: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
128
|
+
readonly inactiveText: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
129
|
+
readonly activeValue: import("@element-plus/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, true, boolean>;
|
|
130
|
+
readonly inactiveValue: import("@element-plus/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, false, boolean>;
|
|
131
|
+
readonly name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
132
|
+
readonly validateEvent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
133
|
+
readonly beforeChange: {
|
|
134
|
+
readonly type: PropType<() => Promise<boolean> | boolean>;
|
|
135
|
+
readonly required: false;
|
|
136
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
137
|
+
__epPropKey: true;
|
|
138
|
+
};
|
|
139
|
+
readonly id: StringConstructor;
|
|
140
|
+
readonly tabindex: {
|
|
141
|
+
readonly type: PropType<import("@element-plus/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
142
|
+
readonly required: false;
|
|
143
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
144
|
+
__epPropKey: true;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* @deprecated Removed after 3.0.0, Use `SwitchProps` instead.
|
|
149
|
+
*/
|
|
150
|
+
export type SwitchPropsPublic = ExtractPublicPropTypes<typeof switchProps>;
|
|
151
|
+
export declare const switchEmits: {
|
|
152
|
+
"update:modelValue": (val: boolean | string | number) => boolean;
|
|
153
|
+
change: (val: boolean | string | number) => boolean;
|
|
154
|
+
input: (val: boolean | string | number) => boolean;
|
|
155
|
+
};
|
|
156
|
+
export type SwitchEmits = typeof switchEmits;
|
|
157
|
+
export type SwitchInstance = InstanceType<typeof Switch> & unknown;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { isBoolean as i, isNumber as o } from "../../utils/types.js";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import { isString as r } from "@vue/shared";
|
|
5
|
+
import { INPUT_EVENT as n, CHANGE_EVENT as p, UPDATE_MODEL_EVENT as a } from "../../constants/event.js";
|
|
6
|
+
import { iconPropType as e } from "../../utils/vue/icon.js";
|
|
7
|
+
import { isValidComponentSize as m } from "../../utils/vue/validator.js";
|
|
8
|
+
import "vue";
|
|
9
|
+
import { buildProps as l, definePropType as u } from "../../utils/vue/props/runtime.js";
|
|
10
|
+
import "../../hooks/use-size/index.js";
|
|
11
|
+
import "@popperjs/core";
|
|
12
|
+
import "../../hooks/use-z-index/index.js";
|
|
13
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
14
|
+
import { useAriaProps as d } from "../../hooks/use-aria/index.js";
|
|
15
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
16
|
+
import "../../hooks/use-empty-values/index.js";
|
|
17
|
+
const h = l({
|
|
18
|
+
/**
|
|
19
|
+
* @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type
|
|
20
|
+
*/
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: [Boolean, String, Number],
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* @description whether Switch is disabled
|
|
27
|
+
*/
|
|
28
|
+
disabled: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* @description whether Switch is in loading state
|
|
34
|
+
*/
|
|
35
|
+
loading: Boolean,
|
|
36
|
+
/**
|
|
37
|
+
* @description size of Switch
|
|
38
|
+
*/
|
|
39
|
+
size: {
|
|
40
|
+
type: String,
|
|
41
|
+
validator: m
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* @description width of Switch
|
|
45
|
+
*/
|
|
46
|
+
width: {
|
|
47
|
+
type: [String, Number],
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* @description whether icon or text is displayed inside dot, only the first character will be rendered for text
|
|
52
|
+
*/
|
|
53
|
+
inlinePrompt: Boolean,
|
|
54
|
+
/**
|
|
55
|
+
* @description component of the icon displayed in action when in `off` state
|
|
56
|
+
*/
|
|
57
|
+
inactiveActionIcon: {
|
|
58
|
+
type: e
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* @description component of the icon displayed in action when in `on` state
|
|
62
|
+
*/
|
|
63
|
+
activeActionIcon: {
|
|
64
|
+
type: e
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* @description component of the icon displayed when in `on` state, overrides `active-text`
|
|
68
|
+
*/
|
|
69
|
+
activeIcon: {
|
|
70
|
+
type: e
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* @description component of the icon displayed when in `off` state, overrides `inactive-text`
|
|
74
|
+
*/
|
|
75
|
+
inactiveIcon: {
|
|
76
|
+
type: e
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* @description text displayed when in `on` state
|
|
80
|
+
*/
|
|
81
|
+
activeText: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: ""
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* @description text displayed when in `off` state
|
|
87
|
+
*/
|
|
88
|
+
inactiveText: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: ""
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* @description switch value when in `on` state
|
|
94
|
+
*/
|
|
95
|
+
activeValue: {
|
|
96
|
+
type: [Boolean, String, Number],
|
|
97
|
+
default: !0
|
|
98
|
+
},
|
|
99
|
+
/**
|
|
100
|
+
* @description switch value when in `off` state
|
|
101
|
+
*/
|
|
102
|
+
inactiveValue: {
|
|
103
|
+
type: [Boolean, String, Number],
|
|
104
|
+
default: !1
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* @description input name of Switch
|
|
108
|
+
*/
|
|
109
|
+
name: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: ""
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* @description whether to trigger form validation
|
|
115
|
+
*/
|
|
116
|
+
validateEvent: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: !0
|
|
119
|
+
},
|
|
120
|
+
/**
|
|
121
|
+
* @description before-change hook before the switch state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop switching
|
|
122
|
+
*/
|
|
123
|
+
beforeChange: {
|
|
124
|
+
type: u(Function)
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
* @description id for input
|
|
128
|
+
*/
|
|
129
|
+
id: String,
|
|
130
|
+
/**
|
|
131
|
+
* @description tabindex for input
|
|
132
|
+
*/
|
|
133
|
+
tabindex: {
|
|
134
|
+
type: [String, Number]
|
|
135
|
+
},
|
|
136
|
+
...d(["ariaLabel"])
|
|
137
|
+
}), x = {
|
|
138
|
+
[a]: (t) => i(t) || r(t) || o(t),
|
|
139
|
+
[p]: (t) => i(t) || r(t) || o(t),
|
|
140
|
+
[n]: (t) => i(t) || r(t) || o(t)
|
|
141
|
+
};
|
|
142
|
+
export {
|
|
143
|
+
x as switchEmits,
|
|
144
|
+
h as switchProps
|
|
145
|
+
};
|
|
@@ -159,8 +159,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
159
159
|
id: string;
|
|
160
160
|
modelValue: string | number | boolean;
|
|
161
161
|
validateEvent: boolean;
|
|
162
|
-
checked: boolean;
|
|
163
162
|
indeterminate: boolean;
|
|
163
|
+
checked: boolean;
|
|
164
164
|
trueValue: string | number;
|
|
165
165
|
falseValue: string | number;
|
|
166
166
|
trueLabel: string | number;
|
|
@@ -241,8 +241,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
241
241
|
id: string;
|
|
242
242
|
modelValue: string | number | boolean;
|
|
243
243
|
validateEvent: boolean;
|
|
244
|
-
checked: boolean;
|
|
245
244
|
indeterminate: boolean;
|
|
245
|
+
checked: boolean;
|
|
246
246
|
trueValue: string | number;
|
|
247
247
|
falseValue: string | number;
|
|
248
248
|
trueLabel: string | number;
|
|
@@ -323,8 +323,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
323
323
|
id: string;
|
|
324
324
|
modelValue: string | number | boolean;
|
|
325
325
|
validateEvent: boolean;
|
|
326
|
-
checked: boolean;
|
|
327
326
|
indeterminate: boolean;
|
|
327
|
+
checked: boolean;
|
|
328
328
|
trueValue: string | number;
|
|
329
329
|
falseValue: string | number;
|
|
330
330
|
trueLabel: string | number;
|
|
@@ -182,8 +182,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
182
182
|
id: string;
|
|
183
183
|
modelValue: string | number | boolean;
|
|
184
184
|
validateEvent: boolean;
|
|
185
|
-
checked: boolean;
|
|
186
185
|
indeterminate: boolean;
|
|
186
|
+
checked: boolean;
|
|
187
187
|
trueValue: string | number;
|
|
188
188
|
falseValue: string | number;
|
|
189
189
|
trueLabel: string | number;
|
|
@@ -264,8 +264,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
264
264
|
id: string;
|
|
265
265
|
modelValue: string | number | boolean;
|
|
266
266
|
validateEvent: boolean;
|
|
267
|
-
checked: boolean;
|
|
268
267
|
indeterminate: boolean;
|
|
268
|
+
checked: boolean;
|
|
269
269
|
trueValue: string | number;
|
|
270
270
|
falseValue: string | number;
|
|
271
271
|
trueLabel: string | number;
|
|
@@ -346,8 +346,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
346
346
|
id: string;
|
|
347
347
|
modelValue: string | number | boolean;
|
|
348
348
|
validateEvent: boolean;
|
|
349
|
-
checked: boolean;
|
|
350
349
|
indeterminate: boolean;
|
|
350
|
+
checked: boolean;
|
|
351
351
|
trueValue: string | number;
|
|
352
352
|
falseValue: string | number;
|
|
353
353
|
trueLabel: string | number;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
export declare const EpText: typeof
|
|
2
|
+
import _EpText from './src/text.vue';
|
|
3
|
+
export declare const EpText: typeof _EpText & Plugin;
|
|
4
4
|
export default EpText;
|
|
5
|
+
export { textProps } from './src/text';
|
|
6
|
+
export type { TextProps, TextPropsPublic } from './src/text';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { withInstall as t } from "../../utils/with-install.js";
|
|
2
|
+
import o from "./src/text.vue.js";
|
|
3
|
+
import { textProps as s } from "./src/text.js";
|
|
4
|
+
const p = t(o, "ep-text");
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
p as EpText,
|
|
7
|
+
p as default,
|
|
8
|
+
s as textProps
|
|
6
9
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import type { ComponentSize } from '@element-plus/constants';
|
|
3
|
+
export interface TextProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description text type
|
|
6
|
+
*/
|
|
7
|
+
type?: 'primary' | 'success' | 'info' | 'warning' | 'danger' | '';
|
|
8
|
+
/**
|
|
9
|
+
* @description text size
|
|
10
|
+
*/
|
|
11
|
+
size?: ComponentSize;
|
|
12
|
+
/**
|
|
13
|
+
* @description render ellipsis
|
|
14
|
+
*/
|
|
15
|
+
truncated?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @description maximum lines
|
|
18
|
+
*/
|
|
19
|
+
lineClamp?: number | string;
|
|
20
|
+
/**
|
|
21
|
+
* @description custom element tag
|
|
22
|
+
*/
|
|
23
|
+
tag?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Removed after 3.0.0, Use `TextProps` instead.
|
|
27
|
+
*/
|
|
28
|
+
export declare const textProps: {
|
|
29
|
+
readonly type: import("@element-plus/utils").EpPropFinalized<StringConstructor, "" | "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
|
|
30
|
+
readonly size: import("@element-plus/utils").EpPropFinalized<StringConstructor, "" | "small" | "default" | "large", unknown, "", boolean>;
|
|
31
|
+
readonly truncated: BooleanConstructor;
|
|
32
|
+
readonly lineClamp: {
|
|
33
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
34
|
+
readonly required: false;
|
|
35
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
36
|
+
__epPropKey: true;
|
|
37
|
+
};
|
|
38
|
+
readonly tag: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "span", boolean>;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Removed after 3.0.0, Use `TextProps` instead.
|
|
42
|
+
*/
|
|
43
|
+
export type TextPropsPublic = ExtractPublicPropTypes<typeof textProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import { componentSizes as t } from "../../../constants/size.js";
|
|
5
|
+
import "@element-plus/icons-vue";
|
|
6
|
+
import { buildProps as r } from "../../../utils/vue/props/runtime.js";
|
|
7
|
+
import "vue";
|
|
8
|
+
const s = r({
|
|
9
|
+
/**
|
|
10
|
+
* @description text type
|
|
11
|
+
*/
|
|
12
|
+
type: {
|
|
13
|
+
type: String,
|
|
14
|
+
values: ["primary", "success", "info", "warning", "danger", ""],
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* @description text size
|
|
19
|
+
*/
|
|
20
|
+
size: {
|
|
21
|
+
type: String,
|
|
22
|
+
values: t,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* @description render ellipsis
|
|
27
|
+
*/
|
|
28
|
+
truncated: Boolean,
|
|
29
|
+
/**
|
|
30
|
+
* @description maximum lines
|
|
31
|
+
*/
|
|
32
|
+
lineClamp: {
|
|
33
|
+
type: [String, Number]
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* @description custom element tag
|
|
37
|
+
*/
|
|
38
|
+
tag: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "span"
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
s as textProps
|
|
45
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TextProps } from './text';
|
|
2
|
+
declare var __VLS_7: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_7) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<TextProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextProps> & Readonly<{}>, {
|
|
7
|
+
size: import("../../../constants").ComponentSize;
|
|
8
|
+
type: "primary" | "success" | "info" | "warning" | "danger" | "";
|
|
9
|
+
tag: string;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { defineComponent as T, useAttrs as b, ref as k, computed as z, onMounted as w, onUpdated as A, openBlock as S, createBlock as B, resolveDynamicComponent as H, normalizeStyle as W, normalizeClass as _, withCtx as R, renderSlot as U, nextTick as D } from "vue";
|
|
2
|
+
import { useNamespace as E } from "../../../hooks/use-namespace/index.js";
|
|
3
|
+
import { isUndefined as x } from "../../../utils/types.js";
|
|
4
|
+
import "lodash-unified";
|
|
5
|
+
import "@vueuse/core";
|
|
6
|
+
import "@vue/shared";
|
|
7
|
+
import "@element-plus/icons-vue";
|
|
8
|
+
import "../../../hooks/use-size/index.js";
|
|
9
|
+
import "@popperjs/core";
|
|
10
|
+
import "../../../hooks/use-z-index/index.js";
|
|
11
|
+
import "../../../hooks/use-delayed-toggle/index.js";
|
|
12
|
+
import "../../../hooks/use-aria/index.js";
|
|
13
|
+
import "../../../hooks/use-model-toggle/index.js";
|
|
14
|
+
import "../../../hooks/use-empty-values/index.js";
|
|
15
|
+
import "../../form/index.js";
|
|
16
|
+
import { useFormSize as F } from "../../form/src/hooks/use-form-common-props.js";
|
|
17
|
+
const Z = /* @__PURE__ */ T({
|
|
18
|
+
name: "EpText",
|
|
19
|
+
__name: "text",
|
|
20
|
+
props: {
|
|
21
|
+
type: { default: "" },
|
|
22
|
+
size: { default: "" },
|
|
23
|
+
truncated: { type: Boolean },
|
|
24
|
+
lineClamp: {},
|
|
25
|
+
tag: { default: "span" }
|
|
26
|
+
},
|
|
27
|
+
setup(r) {
|
|
28
|
+
const e = r, v = b(), t = k(), y = F(), i = E("text"), C = z(() => [
|
|
29
|
+
i.b(),
|
|
30
|
+
i.m(e.type),
|
|
31
|
+
i.m(y.value),
|
|
32
|
+
i.is("truncated", e.truncated),
|
|
33
|
+
i.is("line-clamp", !x(e.lineClamp))
|
|
34
|
+
]), s = async () => {
|
|
35
|
+
var m, c, p, u, f, d, h;
|
|
36
|
+
if (await D(), v.title) return;
|
|
37
|
+
let n = !1;
|
|
38
|
+
const g = ((m = t.value) == null ? void 0 : m.textContent) || "";
|
|
39
|
+
if (e.truncated) {
|
|
40
|
+
const o = (c = t.value) == null ? void 0 : c.offsetWidth, l = (p = t.value) == null ? void 0 : p.scrollWidth;
|
|
41
|
+
o && l && l > o && (n = !0);
|
|
42
|
+
} else if (!x(e.lineClamp)) {
|
|
43
|
+
const o = (u = t.value) == null ? void 0 : u.offsetHeight, l = (f = t.value) == null ? void 0 : f.scrollHeight;
|
|
44
|
+
o && l && l > o && (n = !0);
|
|
45
|
+
}
|
|
46
|
+
n ? (d = t.value) == null || d.setAttribute("title", g) : (h = t.value) == null || h.removeAttribute("title");
|
|
47
|
+
};
|
|
48
|
+
return w(s), A(s), (a, n) => (S(), B(H(r.tag), {
|
|
49
|
+
ref_key: "textRef",
|
|
50
|
+
ref: t,
|
|
51
|
+
class: _(C.value),
|
|
52
|
+
style: W({ "-webkit-line-clamp": r.lineClamp })
|
|
53
|
+
}, {
|
|
54
|
+
default: R(() => [
|
|
55
|
+
U(a.$slots, "default")
|
|
56
|
+
]),
|
|
57
|
+
_: 3
|
|
58
|
+
}, 8, ["class", "style"]));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
export {
|
|
62
|
+
Z as default
|
|
63
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { TimeSelectProps } from './time-select';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<TimeSelectProps, {
|
|
3
|
+
/**
|
|
4
|
+
* @description blur the Input component
|
|
5
|
+
*/
|
|
6
|
+
blur: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* @description focus the Input component
|
|
9
|
+
*/
|
|
10
|
+
focus: () => void;
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
clear: (...args: any[]) => void;
|
|
13
|
+
"update:modelValue": (...args: any[]) => void;
|
|
14
|
+
change: (...args: any[]) => void;
|
|
15
|
+
focus: (...args: any[]) => void;
|
|
16
|
+
blur: (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<TimeSelectProps> & Readonly<{
|
|
18
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
end: string;
|
|
25
|
+
start: string;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
effect: import("../popper").PopperEffect;
|
|
28
|
+
valueOnClear: string | number | boolean | Function | null;
|
|
29
|
+
format: string;
|
|
30
|
+
popperClass: string;
|
|
31
|
+
popperStyle: string | import("vue").CSSProperties;
|
|
32
|
+
clearIcon: import("@element-plus/utils").IconPropType;
|
|
33
|
+
prefixIcon: import("@element-plus/utils").IconPropType;
|
|
34
|
+
clearable: boolean;
|
|
35
|
+
editable: boolean;
|
|
36
|
+
step: string;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
export default _default;
|