vue-devui 1.0.0-beta.2 → 1.0.0-beta.220808
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/README.md +163 -172
- package/alert/index.d.ts +7 -0
- package/alert/index.es.js +79 -51
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.d.ts +7 -0
- package/auto-complete/index.es.js +9053 -0
- package/auto-complete/index.umd.js +40 -0
- package/auto-complete/package.json +7 -0
- package/auto-complete/style.css +1 -0
- package/avatar/index.d.ts +7 -0
- package/avatar/index.es.js +154 -147
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.d.ts +7 -0
- package/badge/index.es.js +46 -21
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.d.ts +7 -0
- package/button/index.es.js +5921 -146
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.d.ts +7 -0
- package/card/index.es.js +64 -36
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.d.ts +7 -0
- package/checkbox/index.es.js +8122 -255
- package/checkbox/index.umd.js +38 -1
- package/checkbox/style.css +1 -1
- package/collapse/index.d.ts +7 -0
- package/collapse/index.es.js +195 -0
- package/collapse/index.umd.js +1 -0
- package/{cascader → collapse}/package.json +1 -1
- package/collapse/style.css +1 -0
- package/countdown/index.d.ts +7 -0
- package/countdown/index.es.js +217 -0
- package/countdown/index.umd.js +1 -0
- package/{accordion → countdown}/package.json +1 -1
- package/countdown/style.css +1 -0
- package/date-picker-pro/index.d.ts +7 -0
- package/date-picker-pro/index.es.js +12035 -0
- package/date-picker-pro/index.umd.js +38 -0
- package/date-picker-pro/package.json +7 -0
- package/date-picker-pro/style.css +1 -0
- package/drawer/index.d.ts +7 -0
- package/drawer/index.es.js +205 -154
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.d.ts +7 -0
- package/dropdown/index.es.js +736 -0
- package/dropdown/index.umd.js +1 -0
- package/{carousel → dropdown}/package.json +1 -1
- package/dropdown/style.css +1 -0
- package/editable-select/index.d.ts +7 -0
- package/editable-select/index.es.js +908 -461
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.d.ts +7 -0
- package/form/index.es.js +2439 -1995
- package/form/index.umd.js +29 -18
- package/form/style.css +1 -1
- package/fullscreen/index.d.ts +7 -0
- package/fullscreen/index.es.js +138 -125
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.d.ts +7 -0
- package/grid/index.es.js +271 -0
- package/grid/index.umd.js +1 -0
- package/{toast → grid}/package.json +1 -1
- package/grid/style.css +1 -0
- package/icon/index.d.ts +7 -0
- package/icon/index.es.js +200 -56
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.d.ts +7 -0
- package/image-preview/index.es.js +154 -62
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/index.d.ts +7 -0
- package/input/index.d.ts +7 -0
- package/input/index.es.js +8269 -145
- package/input/index.umd.js +38 -1
- package/input/style.css +1 -1
- package/input-number/index.d.ts +7 -0
- package/input-number/index.es.js +260 -191
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.d.ts +7 -0
- package/layout/index.es.js +41 -26
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.d.ts +7 -0
- package/loading/index.es.js +89 -73
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/mention/index.d.ts +7 -0
- package/mention/index.es.js +8326 -0
- package/mention/index.umd.js +47 -0
- package/mention/package.json +7 -0
- package/mention/style.css +1 -0
- package/menu/index.d.ts +7 -0
- package/menu/index.es.js +891 -0
- package/menu/index.umd.js +1 -0
- package/{anchor → menu}/package.json +1 -1
- package/menu/style.css +1 -0
- package/message/index.d.ts +7 -0
- package/message/index.es.js +533 -0
- package/message/index.umd.js +1 -0
- package/message/package.json +7 -0
- package/message/style.css +1 -0
- package/modal/index.d.ts +7 -0
- package/modal/index.es.js +611 -877
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.d.ts +7 -0
- package/notification/index.es.js +528 -0
- package/notification/index.umd.js +1 -0
- package/notification/package.json +7 -0
- package/notification/style.css +1 -0
- package/nuxt/components/Alert.js +3 -0
- package/nuxt/components/Aside.js +3 -0
- package/nuxt/components/AutoComplete.js +3 -0
- package/nuxt/components/Avatar.js +3 -0
- package/nuxt/components/Badge.js +3 -0
- package/nuxt/components/Button.js +3 -0
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/Card.js +3 -0
- package/nuxt/components/Checkbox.js +3 -0
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/Col.js +3 -0
- package/nuxt/components/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/Column.js +3 -0
- package/nuxt/components/Content.js +3 -0
- package/nuxt/components/Countdown.js +3 -0
- package/nuxt/components/DRangeDatePickerPro.js +3 -0
- package/nuxt/components/DatePickerPro.js +3 -0
- package/nuxt/components/Drawer.js +3 -0
- package/nuxt/components/DrawerService.js +3 -0
- package/nuxt/components/Dropdown.js +3 -0
- package/nuxt/components/DropdownMenu.js +3 -0
- package/nuxt/components/DropdownPropsKey.js +3 -0
- package/nuxt/components/EditableSelect.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/FixedOverlay.js +3 -0
- package/nuxt/components/FlexibleOverlay.js +3 -0
- package/nuxt/components/Footer.js +3 -0
- package/nuxt/components/Form.js +3 -0
- package/nuxt/components/FormItem.js +3 -0
- package/nuxt/components/FormOperation.js +3 -0
- package/nuxt/components/Fullscreen.js +3 -0
- package/nuxt/components/Header.js +3 -0
- package/nuxt/components/IFileOptions.js +3 -0
- package/nuxt/components/IUploadOptions.js +3 -0
- package/nuxt/components/Icon.js +3 -0
- package/nuxt/components/IconGroup.js +3 -0
- package/nuxt/components/ImagePreviewService.js +3 -0
- package/nuxt/components/Input.js +3 -0
- package/nuxt/components/InputNumber.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/Layout.js +3 -0
- package/nuxt/components/Loading.js +3 -0
- package/nuxt/components/LoadingOptions.js +3 -0
- package/nuxt/components/LoadingService.js +3 -0
- package/nuxt/components/Mention.js +3 -0
- package/nuxt/components/Menu.js +3 -0
- package/nuxt/components/MenuItem.js +3 -0
- package/nuxt/components/Message.js +3 -0
- package/nuxt/components/Modal.js +3 -0
- package/nuxt/components/Notification.js +3 -0
- package/nuxt/components/NotificationService.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/OptionGroup.js +3 -0
- package/nuxt/components/Pagination.js +3 -0
- package/nuxt/components/Panel.js +3 -0
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/Popover.js +3 -0
- package/nuxt/components/Progress.js +3 -0
- package/nuxt/components/Radio.js +3 -0
- package/nuxt/components/RadioButton.js +3 -0
- package/nuxt/components/RadioGroup.js +3 -0
- package/nuxt/components/Rate.js +3 -0
- package/nuxt/components/Result.js +3 -0
- package/nuxt/components/Row.js +3 -0
- package/nuxt/components/Search.js +3 -0
- package/nuxt/components/Select.js +3 -0
- package/nuxt/components/Skeleton.js +3 -0
- package/nuxt/components/SkeletonItem.js +3 -0
- package/nuxt/components/Slider.js +3 -0
- package/nuxt/components/Splitter.js +3 -0
- package/nuxt/components/Statistic.js +3 -0
- package/nuxt/components/Status.js +3 -0
- package/nuxt/components/Step.js +3 -0
- package/nuxt/components/Steps.js +3 -0
- package/nuxt/components/SubMenu.js +3 -0
- package/nuxt/components/Switch.js +3 -0
- package/nuxt/components/TABLE_TOKEN.js +3 -0
- package/nuxt/components/Tab.js +3 -0
- package/nuxt/components/Table.js +3 -0
- package/nuxt/components/Tabs.js +3 -0
- package/nuxt/components/Tag.js +3 -0
- package/nuxt/components/Textarea.js +3 -0
- package/nuxt/components/TimePicker.js +3 -0
- package/nuxt/components/TimeSelect.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/Tooltip.js +3 -0
- package/nuxt/components/Tree.js +3 -0
- package/nuxt/components/Upload.js +3 -0
- package/nuxt/components/UploadStatus.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/animationInjectionKey.js +3 -0
- package/nuxt/components/autoCompleteProps.js +3 -0
- package/nuxt/components/avatarProps.js +3 -0
- package/nuxt/components/badgeProps.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.js +3 -0
- package/nuxt/components/buttonProps.js +3 -0
- package/nuxt/components/cardProps.js +3 -0
- package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
- package/nuxt/components/checkboxGroupProps.js +3 -0
- package/nuxt/components/checkboxProps.js +3 -0
- package/nuxt/components/colProps.js +3 -0
- package/nuxt/components/colPropsBaseClass.js +3 -0
- package/nuxt/components/colPropsBaseStyle.js +3 -0
- package/nuxt/components/collapseItemProps.js +3 -0
- package/nuxt/components/collapseProps.js +3 -0
- package/nuxt/components/countdownProps.js +3 -0
- package/nuxt/components/datePickerProCommonProps.js +3 -0
- package/nuxt/components/datePickerProPanelProps.js +3 -0
- package/nuxt/components/datePickerProProps.js +3 -0
- package/nuxt/components/dropdownMenuProps.js +3 -0
- package/nuxt/components/editableSelectProps.js +3 -0
- package/nuxt/components/fixedOverlayProps.js +3 -0
- package/nuxt/components/flexibleOverlayProps.js +3 -0
- package/nuxt/components/formItemProps.js +3 -0
- package/nuxt/components/formProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +3 -0
- package/nuxt/components/imagePreviewProps.js +3 -0
- package/nuxt/components/inputProps.js +3 -0
- package/nuxt/components/loadingProps.js +3 -0
- package/nuxt/components/mentionProps.js +3 -0
- package/nuxt/components/messageProps.js +3 -0
- package/nuxt/components/modalProps.js +3 -0
- package/nuxt/components/notificationProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/popoverProps.js +3 -0
- package/nuxt/components/progressProps.js +3 -0
- package/nuxt/components/rateProps.js +3 -0
- package/nuxt/components/resultProps.js +3 -0
- package/nuxt/components/roundInjectionKey.js +3 -0
- package/nuxt/components/rowProps.js +3 -0
- package/nuxt/components/screenSizes.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/skeletonItemProps.js +3 -0
- package/nuxt/components/skeletonProps.js +3 -0
- package/nuxt/components/sliderProps.js +3 -0
- package/nuxt/components/splitterProps.js +3 -0
- package/nuxt/components/statisticProps.js +3 -0
- package/nuxt/components/stepProps.js +3 -0
- package/nuxt/components/stepsProps.js +3 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/nuxt/components/switchProps.js +3 -0
- package/nuxt/components/tableProps.js +3 -0
- package/nuxt/components/tabsProps.js +3 -0
- package/nuxt/components/tagProps.js +3 -0
- package/nuxt/components/textareaProps.js +3 -0
- package/nuxt/components/timeAxisProps.js +3 -0
- package/nuxt/components/timerPickerPanelProps.js +3 -0
- package/nuxt/components/tooltipProps.js +3 -0
- package/nuxt/components/treeNodeProps.js +3 -0
- package/nuxt/components/treeProps.js +3 -0
- package/nuxt/components/uploadProps.js +3 -0
- package/nuxt/index.js +13 -0
- package/overlay/index.d.ts +7 -0
- package/overlay/index.es.js +245 -303
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +16 -84
- package/pagination/index.d.ts +7 -0
- package/pagination/index.es.js +333 -155
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.d.ts +7 -0
- package/panel/index.es.js +48 -35
- package/panel/index.umd.js +1 -1
- package/panel/style.css +1 -1
- package/popover/index.d.ts +7 -0
- package/popover/index.es.js +6035 -204
- package/popover/index.umd.js +27 -1
- package/popover/style.css +1 -1
- package/progress/index.d.ts +7 -0
- package/progress/index.es.js +111 -57
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.d.ts +7 -0
- package/radio/index.es.js +8015 -182
- package/radio/index.umd.js +38 -1
- package/radio/style.css +1 -1
- package/rate/index.d.ts +7 -0
- package/rate/index.es.js +78 -56
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.d.ts +7 -0
- package/result/index.es.js +248 -0
- package/result/index.umd.js +1 -0
- package/{sticky → result}/package.json +1 -1
- package/result/style.css +1 -0
- package/ripple/index.d.ts +7 -0
- package/ripple/index.es.js +56 -61
- package/ripple/index.umd.js +1 -1
- package/search/index.d.ts +7 -0
- package/search/index.es.js +8381 -406
- package/search/index.umd.js +38 -1
- package/search/style.css +1 -1
- package/select/index.d.ts +7 -0
- package/select/index.es.js +9331 -576
- package/select/index.umd.js +38 -1
- package/select/style.css +1 -1
- package/skeleton/index.d.ts +7 -0
- package/skeleton/index.es.js +115 -145
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.d.ts +7 -0
- package/slider/index.es.js +148 -142
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.d.ts +7 -0
- package/splitter/index.es.js +6308 -181
- package/splitter/index.umd.js +27 -1
- package/splitter/style.css +1 -1
- package/statistic/index.d.ts +7 -0
- package/statistic/index.es.js +253 -0
- package/statistic/index.umd.js +1 -0
- package/statistic/package.json +7 -0
- package/statistic/style.css +1 -0
- package/status/index.d.ts +7 -0
- package/status/index.es.js +29 -8
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/steps/index.d.ts +7 -0
- package/steps/index.es.js +386 -0
- package/steps/index.umd.js +1 -0
- package/steps/package.json +7 -0
- package/steps/style.css +1 -0
- package/style.css +1 -1
- package/switch/index.d.ts +7 -0
- package/switch/index.es.js +7819 -65
- package/switch/index.umd.js +38 -1
- package/switch/style.css +1 -1
- package/table/index.d.ts +7 -0
- package/table/index.es.js +11435 -204
- package/table/index.umd.js +38 -1
- package/table/style.css +1 -1
- package/tabs/index.d.ts +7 -0
- package/tabs/index.es.js +356 -143
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.d.ts +7 -0
- package/tag/index.es.js +156 -0
- package/tag/index.umd.js +1 -0
- package/tag/package.json +7 -0
- package/tag/style.css +1 -0
- package/textarea/index.d.ts +7 -0
- package/textarea/index.es.js +7989 -0
- package/textarea/index.umd.js +46 -0
- package/textarea/package.json +7 -0
- package/textarea/style.css +1 -0
- package/{theme → theme/theme.scss} +0 -0
- package/time-picker/index.d.ts +7 -0
- package/time-picker/index.es.js +9126 -597
- package/time-picker/index.umd.js +38 -1
- package/time-picker/style.css +1 -1
- package/time-select/index.d.ts +7 -0
- package/time-select/index.es.js +9606 -0
- package/time-select/index.umd.js +38 -0
- package/{breadcrumb → time-select}/package.json +1 -1
- package/time-select/style.css +1 -0
- package/timeline/index.d.ts +7 -0
- package/timeline/index.es.js +427 -0
- package/timeline/index.umd.js +1 -0
- package/timeline/package.json +7 -0
- package/timeline/style.css +1 -0
- package/tooltip/index.d.ts +7 -0
- package/tooltip/index.es.js +5870 -141
- package/tooltip/index.umd.js +27 -1
- package/tooltip/style.css +1 -1
- package/tree/index.d.ts +7 -0
- package/tree/index.es.js +11504 -692
- package/tree/index.umd.js +38 -1
- package/tree/style.css +1 -1
- package/upload/index.d.ts +7 -0
- package/upload/index.es.js +968 -2748
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +22816 -16568
- package/vue-devui.umd.js +42 -20
- package/accordion/index.es.js +0 -190
- package/accordion/index.umd.js +0 -1
- package/accordion/style.css +0 -1
- package/anchor/index.es.js +0 -263
- package/anchor/index.umd.js +0 -1
- package/anchor/style.css +0 -1
- package/breadcrumb/index.es.js +0 -127
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/style.css +0 -1
- package/carousel/index.es.js +0 -328
- package/carousel/index.umd.js +0 -1
- package/carousel/style.css +0 -1
- package/cascader/index.es.js +0 -187
- package/cascader/index.umd.js +0 -1
- package/cascader/style.css +0 -1
- package/date-picker/index.es.js +0 -1171
- package/date-picker/index.umd.js +0 -1
- package/date-picker/package.json +0 -7
- package/date-picker/style.css +0 -1
- package/nav-sprite/index.es.js +0 -742
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/quadrant-diagram/index.es.js +0 -489
- package/quadrant-diagram/index.umd.js +0 -1
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/steps-guide/index.es.js +0 -211
- package/steps-guide/index.umd.js +0 -1
- package/steps-guide/package.json +0 -7
- package/steps-guide/style.css +0 -1
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/tag-input/index.es.js +0 -341
- package/tag-input/index.umd.js +0 -1
- package/tag-input/package.json +0 -7
- package/tag-input/style.css +0 -1
- package/time-axis/index.es.js +0 -79
- package/time-axis/index.umd.js +0 -1
- package/time-axis/package.json +0 -7
- package/time-axis/style.css +0 -1
- package/toast/index.es.js +0 -2059
- package/toast/index.umd.js +0 -1
- package/toast/style.css +0 -1
- package/transfer/index.es.js +0 -1446
- package/transfer/index.umd.js +0 -1
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree-select/index.es.js +0 -203
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/carousel/index.es.js
DELETED
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
import { defineComponent, createVNode, Fragment, ref, watch, onMounted, onBeforeUnmount, Comment } from "vue";
|
|
18
|
-
const carouselProps = {
|
|
19
|
-
arrowTrigger: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: "hover"
|
|
22
|
-
},
|
|
23
|
-
autoplay: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: false
|
|
26
|
-
},
|
|
27
|
-
autoplaySpeed: {
|
|
28
|
-
type: Number,
|
|
29
|
-
default: 3e3
|
|
30
|
-
},
|
|
31
|
-
height: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: "100%"
|
|
34
|
-
},
|
|
35
|
-
showDots: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: true
|
|
38
|
-
},
|
|
39
|
-
dotTrigger: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: "click"
|
|
42
|
-
},
|
|
43
|
-
dotPosition: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: "bottom"
|
|
46
|
-
},
|
|
47
|
-
activeIndex: {
|
|
48
|
-
type: Number,
|
|
49
|
-
default: 0
|
|
50
|
-
},
|
|
51
|
-
activeIndexChange: {
|
|
52
|
-
type: Function
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
var Icon = defineComponent({
|
|
56
|
-
name: "DIcon",
|
|
57
|
-
props: {
|
|
58
|
-
name: {
|
|
59
|
-
type: String,
|
|
60
|
-
required: true
|
|
61
|
-
},
|
|
62
|
-
size: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: "inherit"
|
|
65
|
-
},
|
|
66
|
-
color: {
|
|
67
|
-
type: String,
|
|
68
|
-
default: "inherit"
|
|
69
|
-
},
|
|
70
|
-
classPrefix: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: "icon"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
setup(props) {
|
|
76
|
-
return __spreadValues({}, props);
|
|
77
|
-
},
|
|
78
|
-
render() {
|
|
79
|
-
const {
|
|
80
|
-
name,
|
|
81
|
-
size,
|
|
82
|
-
color,
|
|
83
|
-
classPrefix
|
|
84
|
-
} = this;
|
|
85
|
-
return createVNode(Fragment, null, [/^((https?):)?\/\//.test(name) ? createVNode("img", {
|
|
86
|
-
"src": name,
|
|
87
|
-
"alt": name.split("/")[name.split("/").length - 1],
|
|
88
|
-
"style": {
|
|
89
|
-
width: size
|
|
90
|
-
}
|
|
91
|
-
}, null) : createVNode("i", {
|
|
92
|
-
"class": `${classPrefix} ${classPrefix}-${name}`,
|
|
93
|
-
"style": {
|
|
94
|
-
fontSize: size,
|
|
95
|
-
color
|
|
96
|
-
}
|
|
97
|
-
}, null)]);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
var carousel = "";
|
|
101
|
-
var Carousel = defineComponent({
|
|
102
|
-
name: "DCarousel",
|
|
103
|
-
props: carouselProps,
|
|
104
|
-
emits: ["update:activeIndex"],
|
|
105
|
-
setup(props, {
|
|
106
|
-
emit
|
|
107
|
-
}) {
|
|
108
|
-
const {
|
|
109
|
-
arrowTrigger,
|
|
110
|
-
autoplay,
|
|
111
|
-
autoplaySpeed,
|
|
112
|
-
dotTrigger,
|
|
113
|
-
activeIndex,
|
|
114
|
-
activeIndexChange
|
|
115
|
-
} = props;
|
|
116
|
-
const transitionSpeed = 500;
|
|
117
|
-
const itemCount = ref(0);
|
|
118
|
-
const showArrow = ref(false);
|
|
119
|
-
const currentIndex = ref(0);
|
|
120
|
-
const wrapperRef = ref(null);
|
|
121
|
-
const containerRef = ref(null);
|
|
122
|
-
const scheduledId = ref(null);
|
|
123
|
-
watch(() => arrowTrigger, () => {
|
|
124
|
-
showArrow.value = arrowTrigger === "always";
|
|
125
|
-
}, {
|
|
126
|
-
immediate: true
|
|
127
|
-
});
|
|
128
|
-
watch(() => activeIndex, () => {
|
|
129
|
-
currentIndex.value = activeIndex;
|
|
130
|
-
}, {
|
|
131
|
-
immediate: true
|
|
132
|
-
});
|
|
133
|
-
const translatePosition = (size) => {
|
|
134
|
-
if (containerRef.value)
|
|
135
|
-
containerRef.value.style.left = `${-size * 100}%`;
|
|
136
|
-
};
|
|
137
|
-
const adjustTransition = (targetEl) => {
|
|
138
|
-
setTimeout(() => {
|
|
139
|
-
if (containerRef.value)
|
|
140
|
-
containerRef.value.style.transition = "";
|
|
141
|
-
targetEl.style.transform = "";
|
|
142
|
-
translatePosition(currentIndex.value);
|
|
143
|
-
}, transitionSpeed);
|
|
144
|
-
};
|
|
145
|
-
const adjustPosition = (targetEl, firstToLast) => {
|
|
146
|
-
if (wrapperRef.value) {
|
|
147
|
-
const wrapperRect = wrapperRef.value.getBoundingClientRect();
|
|
148
|
-
targetEl.style.transform = `translateX(${(firstToLast ? -itemCount.value : itemCount.value) * wrapperRect.width}px)`;
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
const goto = (index2) => {
|
|
152
|
-
if (index2 === currentIndex.value || !wrapperRef.value || !containerRef.value) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
containerRef.value.style.transition = `left ${transitionSpeed}ms ease`;
|
|
156
|
-
let latestIndex = currentIndex.value;
|
|
157
|
-
if (index2 < 0 && currentIndex.value === 0) {
|
|
158
|
-
latestIndex = itemCount.value - 1;
|
|
159
|
-
const targetEl = containerRef.value.children[latestIndex];
|
|
160
|
-
adjustPosition(targetEl, true);
|
|
161
|
-
translatePosition(-1);
|
|
162
|
-
adjustTransition(targetEl);
|
|
163
|
-
} else if (index2 >= itemCount.value && currentIndex.value === itemCount.value - 1) {
|
|
164
|
-
latestIndex = 0;
|
|
165
|
-
const targetEl = containerRef.value.children[latestIndex];
|
|
166
|
-
adjustPosition(targetEl, false);
|
|
167
|
-
translatePosition(itemCount.value);
|
|
168
|
-
adjustTransition(targetEl);
|
|
169
|
-
} else {
|
|
170
|
-
latestIndex = index2 < 0 ? 0 : index2 > itemCount.value - 1 ? itemCount.value - 1 : index2;
|
|
171
|
-
translatePosition(latestIndex);
|
|
172
|
-
}
|
|
173
|
-
currentIndex.value = latestIndex;
|
|
174
|
-
emit("update:activeIndex", latestIndex);
|
|
175
|
-
activeIndexChange == null ? void 0 : activeIndexChange(latestIndex);
|
|
176
|
-
autoScheduleTransition();
|
|
177
|
-
};
|
|
178
|
-
const prev = () => {
|
|
179
|
-
goto(currentIndex.value - 1);
|
|
180
|
-
};
|
|
181
|
-
const next = () => {
|
|
182
|
-
goto(currentIndex.value + 1);
|
|
183
|
-
};
|
|
184
|
-
const arrowMouseEvent = (type) => {
|
|
185
|
-
if (arrowTrigger !== "hover")
|
|
186
|
-
return;
|
|
187
|
-
showArrow.value = type === "enter";
|
|
188
|
-
};
|
|
189
|
-
const switchStep = (index2, type) => {
|
|
190
|
-
if (type === dotTrigger)
|
|
191
|
-
goto(index2);
|
|
192
|
-
};
|
|
193
|
-
const clearScheduledTransition = () => {
|
|
194
|
-
if (scheduledId.value) {
|
|
195
|
-
clearTimeout(scheduledId.value);
|
|
196
|
-
scheduledId.value = null;
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
const autoScheduleTransition = () => {
|
|
200
|
-
clearScheduledTransition();
|
|
201
|
-
if (autoplay && autoplaySpeed) {
|
|
202
|
-
scheduledId.value = setTimeout(() => {
|
|
203
|
-
next();
|
|
204
|
-
}, autoplaySpeed);
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
const changeItemCount = (val) => {
|
|
208
|
-
itemCount.value = val;
|
|
209
|
-
autoScheduleTransition();
|
|
210
|
-
};
|
|
211
|
-
onMounted(() => {
|
|
212
|
-
if (containerRef.value) {
|
|
213
|
-
containerRef.value.style.transition = `left ${transitionSpeed}ms ease`;
|
|
214
|
-
containerRef.value.style.left = "0%";
|
|
215
|
-
}
|
|
216
|
-
autoScheduleTransition();
|
|
217
|
-
});
|
|
218
|
-
onBeforeUnmount(() => {
|
|
219
|
-
clearScheduledTransition();
|
|
220
|
-
});
|
|
221
|
-
return {
|
|
222
|
-
wrapperRef,
|
|
223
|
-
containerRef,
|
|
224
|
-
showArrow,
|
|
225
|
-
currentIndex,
|
|
226
|
-
itemCount,
|
|
227
|
-
changeItemCount,
|
|
228
|
-
goto,
|
|
229
|
-
prev,
|
|
230
|
-
next,
|
|
231
|
-
arrowMouseEvent,
|
|
232
|
-
switchStep
|
|
233
|
-
};
|
|
234
|
-
},
|
|
235
|
-
render() {
|
|
236
|
-
var _a, _b;
|
|
237
|
-
const {
|
|
238
|
-
showArrow,
|
|
239
|
-
currentIndex,
|
|
240
|
-
itemCount,
|
|
241
|
-
arrowTrigger,
|
|
242
|
-
height,
|
|
243
|
-
showDots,
|
|
244
|
-
dotPosition,
|
|
245
|
-
prev,
|
|
246
|
-
next,
|
|
247
|
-
arrowMouseEvent,
|
|
248
|
-
switchStep,
|
|
249
|
-
changeItemCount,
|
|
250
|
-
$slots
|
|
251
|
-
} = this;
|
|
252
|
-
const slot = (_b = (_a = $slots.default) == null ? void 0 : _a.call($slots)) != null ? _b : [];
|
|
253
|
-
let children = slot;
|
|
254
|
-
if (children.length === 1 && children[0].type === Fragment) {
|
|
255
|
-
children = (children[0].children || []).filter((item) => (item == null ? void 0 : item.type) !== Comment);
|
|
256
|
-
}
|
|
257
|
-
if (children.length !== itemCount) {
|
|
258
|
-
changeItemCount(children.length);
|
|
259
|
-
}
|
|
260
|
-
return createVNode("div", {
|
|
261
|
-
"class": "devui-carousel-container",
|
|
262
|
-
"style": {
|
|
263
|
-
height
|
|
264
|
-
},
|
|
265
|
-
"onMouseenter": () => arrowMouseEvent("enter"),
|
|
266
|
-
"onMouseleave": () => arrowMouseEvent("leave")
|
|
267
|
-
}, [arrowTrigger !== "never" && showArrow ? createVNode("div", {
|
|
268
|
-
"class": "devui-carousel-arrow"
|
|
269
|
-
}, [createVNode("button", {
|
|
270
|
-
"class": "arrow-left",
|
|
271
|
-
"onClick": () => prev()
|
|
272
|
-
}, [createVNode(Icon, {
|
|
273
|
-
"name": "arrow-left"
|
|
274
|
-
}, null)]), createVNode("button", {
|
|
275
|
-
"class": "arrow-right",
|
|
276
|
-
"onClick": () => next()
|
|
277
|
-
}, [createVNode(Icon, {
|
|
278
|
-
"name": "arrow-right"
|
|
279
|
-
}, null)])]) : null, createVNode("div", {
|
|
280
|
-
"class": "devui-carousel-item-wrapper",
|
|
281
|
-
"ref": "wrapperRef"
|
|
282
|
-
}, [createVNode("div", {
|
|
283
|
-
"class": "devui-carousel-item-container",
|
|
284
|
-
"style": {
|
|
285
|
-
width: `${itemCount * 100}%`
|
|
286
|
-
},
|
|
287
|
-
"ref": "containerRef"
|
|
288
|
-
}, [slot])]), itemCount > 0 && showDots ? createVNode("ul", {
|
|
289
|
-
"class": ["devui-carousel-dots", dotPosition]
|
|
290
|
-
}, [children.map((_, index2) => createVNode("li", {
|
|
291
|
-
"class": {
|
|
292
|
-
"dot-item": true,
|
|
293
|
-
active: currentIndex === index2
|
|
294
|
-
},
|
|
295
|
-
"onClick": () => switchStep(index2, "click"),
|
|
296
|
-
"onMouseenter": () => switchStep(index2, "hover")
|
|
297
|
-
}, null))]) : null]);
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
var CarouseItem = defineComponent({
|
|
301
|
-
name: "DCarouselItem",
|
|
302
|
-
render() {
|
|
303
|
-
var _a;
|
|
304
|
-
const {
|
|
305
|
-
$slots
|
|
306
|
-
} = this;
|
|
307
|
-
const children = (_a = $slots.default) == null ? void 0 : _a.call($slots);
|
|
308
|
-
return createVNode("div", {
|
|
309
|
-
"class": "d-carousel-item "
|
|
310
|
-
}, [children]);
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
Carousel.install = function(app) {
|
|
314
|
-
app.component(Carousel.name, Carousel);
|
|
315
|
-
};
|
|
316
|
-
CarouseItem.install = function(app) {
|
|
317
|
-
app.component(CarouseItem.name, CarouseItem);
|
|
318
|
-
};
|
|
319
|
-
var index = {
|
|
320
|
-
title: "Carousel \u8D70\u9A6C\u706F",
|
|
321
|
-
category: "\u6570\u636E\u5C55\u793A",
|
|
322
|
-
status: "80%",
|
|
323
|
-
install(app) {
|
|
324
|
-
app.use(Carousel);
|
|
325
|
-
app.use(CarouseItem);
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
export { Carousel, index as default };
|
package/carousel/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var z=Object.defineProperty;var R=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var $=(a,e,s)=>e in a?z(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s,k=(a,e)=>{for(var s in e||(e={}))_.call(e,s)&&$(a,s,e[s]);if(R)for(var s of R(e))q.call(e,s)&&$(a,s,e[s]);return a};(function(a,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(a=typeof globalThis!="undefined"?globalThis:a||self,e(a.index={},a.Vue))})(this,function(a,e){"use strict";const s={arrowTrigger:{type:String,default:"hover"},autoplay:{type:Boolean,default:!1},autoplaySpeed:{type:Number,default:3e3},height:{type:String,default:"100%"},showDots:{type:Boolean,default:!0},dotTrigger:{type:String,default:"click"},dotPosition:{type:String,default:"bottom"},activeIndex:{type:Number,default:0},activeIndexChange:{type:Function}};var b=e.defineComponent({name:"DIcon",props:{name:{type:String,required:!0},size:{type:String,default:"inherit"},color:{type:String,default:"inherit"},classPrefix:{type:String,default:"icon"}},setup(t){return k({},t)},render(){const{name:t,size:d,color:i,classPrefix:g}=this;return e.createVNode(e.Fragment,null,[/^((https?):)?\/\//.test(t)?e.createVNode("img",{src:t,alt:t.split("/")[t.split("/").length-1],style:{width:d}},null):e.createVNode("i",{class:`${g} ${g}-${t}`,style:{fontSize:d,color:i}},null)])}}),O="",w=e.defineComponent({name:"DCarousel",props:s,emits:["update:activeIndex"],setup(t,{emit:d}){const{arrowTrigger:i,autoplay:g,autoplaySpeed:I,dotTrigger:M,activeIndex:T,activeIndexChange:C}=t,S=500,o=e.ref(0),y=e.ref(!1),u=e.ref(0),f=e.ref(null),r=e.ref(null),c=e.ref(null);e.watch(()=>i,()=>{y.value=i==="always"},{immediate:!0}),e.watch(()=>T,()=>{u.value=T},{immediate:!0});const m=n=>{r.value&&(r.value.style.left=`${-n*100}%`)},N=n=>{setTimeout(()=>{r.value&&(r.value.style.transition=""),n.style.transform="",m(u.value)},S)},h=(n,l)=>{if(f.value){const v=f.value.getBoundingClientRect();n.style.transform=`translateX(${(l?-o.value:o.value)*v.width}px)`}},p=n=>{if(n===u.value||!f.value||!r.value)return;r.value.style.transition=`left ${S}ms ease`;let l=u.value;if(n<0&&u.value===0){l=o.value-1;const v=r.value.children[l];h(v,!0),m(-1),N(v)}else if(n>=o.value&&u.value===o.value-1){l=0;const v=r.value.children[l];h(v,!1),m(o.value),N(v)}else l=n<0?0:n>o.value-1?o.value-1:n,m(l);u.value=l,d("update:activeIndex",l),C==null||C(l),P()},j=()=>{p(u.value-1)},x=()=>{p(u.value+1)},A=n=>{i==="hover"&&(y.value=n==="enter")},B=(n,l)=>{l===M&&p(n)},D=()=>{c.value&&(clearTimeout(c.value),c.value=null)},P=()=>{D(),g&&I&&(c.value=setTimeout(()=>{x()},I))},F=n=>{o.value=n,P()};return e.onMounted(()=>{r.value&&(r.value.style.transition=`left ${S}ms ease`,r.value.style.left="0%"),P()}),e.onBeforeUnmount(()=>{D()}),{wrapperRef:f,containerRef:r,showArrow:y,currentIndex:u,itemCount:o,changeItemCount:F,goto:p,prev:j,next:x,arrowMouseEvent:A,switchStep:B}},render(){var m,N;const{showArrow:t,currentIndex:d,itemCount:i,arrowTrigger:g,height:I,showDots:M,dotPosition:T,prev:C,next:S,arrowMouseEvent:o,switchStep:y,changeItemCount:u,$slots:f}=this,r=(N=(m=f.default)==null?void 0:m.call(f))!=null?N:[];let c=r;return c.length===1&&c[0].type===e.Fragment&&(c=(c[0].children||[]).filter(h=>(h==null?void 0:h.type)!==e.Comment)),c.length!==i&&u(c.length),e.createVNode("div",{class:"devui-carousel-container",style:{height:I},onMouseenter:()=>o("enter"),onMouseleave:()=>o("leave")},[g!=="never"&&t?e.createVNode("div",{class:"devui-carousel-arrow"},[e.createVNode("button",{class:"arrow-left",onClick:()=>C()},[e.createVNode(b,{name:"arrow-left"},null)]),e.createVNode("button",{class:"arrow-right",onClick:()=>S()},[e.createVNode(b,{name:"arrow-right"},null)])]):null,e.createVNode("div",{class:"devui-carousel-item-wrapper",ref:"wrapperRef"},[e.createVNode("div",{class:"devui-carousel-item-container",style:{width:`${i*100}%`},ref:"containerRef"},[r])]),i>0&&M?e.createVNode("ul",{class:["devui-carousel-dots",T]},[c.map((h,p)=>e.createVNode("li",{class:{"dot-item":!0,active:d===p},onClick:()=>y(p,"click"),onMouseenter:()=>y(p,"hover")},null))]):null])}}),V=e.defineComponent({name:"DCarouselItem",render(){var i;const{$slots:t}=this,d=(i=t.default)==null?void 0:i.call(t);return e.createVNode("div",{class:"d-carousel-item "},[d])}});w.install=function(t){t.component(w.name,w)},V.install=function(t){t.component(V.name,V)};var E={title:"Carousel \u8D70\u9A6C\u706F",category:"\u6570\u636E\u5C55\u793A",status:"80%",install(t){t.use(w),t.use(V)}};a.Carousel=w,a.default=E,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
|
package/carousel/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.devui-carousel-container{display:block;position:relative}.devui-carousel-container .devui-carousel-arrow{position:absolute;width:100%;top:50%}.devui-carousel-container .devui-carousel-arrow .arrow-left{position:absolute;top:-18px;z-index:2;cursor:pointer;width:36px;height:36px;border-radius:18px;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-hover, 0 4px 16px 0) var(--devui-light-shadow, rgba(0, 0, 0, .1));display:inline-flex;align-items:center;justify-content:center;left:10px}.devui-carousel-container .devui-carousel-arrow .arrow-left:hover{background:var(--devui-area, #f8f8f8)}.devui-carousel-container .devui-carousel-arrow .arrow-left svg polygon{fill:var(--devui-text, #252b3a)}.devui-carousel-container .devui-carousel-arrow .arrow-right{position:absolute;top:-18px;z-index:2;cursor:pointer;width:36px;height:36px;border-radius:18px;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-hover, 0 4px 16px 0) var(--devui-light-shadow, rgba(0, 0, 0, .1));display:inline-flex;align-items:center;justify-content:center;right:10px}.devui-carousel-container .devui-carousel-arrow .arrow-right:hover{background:var(--devui-area, #f8f8f8)}.devui-carousel-container .devui-carousel-arrow .arrow-right svg polygon{fill:var(--devui-text, #252b3a)}.devui-carousel-container .devui-carousel-item-wrapper{position:relative;overflow:hidden;height:100%}.devui-carousel-container .devui-carousel-item-wrapper .devui-carousel-item-container{display:flex;height:100%;position:relative}.devui-carousel-container .devui-carousel-item-wrapper .devui-carousel-item-container .d-carousel-item{flex:1;position:relative;height:100%}.devui-carousel-container .devui-carousel-dots{position:absolute;display:flex;justify-content:center;width:100%;list-style:none}.devui-carousel-container .devui-carousel-dots.bottom{bottom:8px}.devui-carousel-container .devui-carousel-dots.top{top:8px}.devui-carousel-container .devui-carousel-dots .dot-item{width:6px;height:6px;border-radius:3px;margin-right:8px;background:var(--devui-icon-fill, #d3d5d9)}.devui-carousel-container .devui-carousel-dots .dot-item:hover{cursor:pointer;background:var(--devui-list-item-hover-bg, #f2f5fc)}.devui-carousel-container .devui-carousel-dots .dot-item.active{width:24px;background:var(--devui-list-item-active-bg, #5e7ce0);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-carousel-container .devui-carousel-arrow .arrow-left,.devui-carousel-container .devui-carousel-arrow .arrow-right{transition:background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1))}
|
package/cascader/index.es.js
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { computed, ref, watch, reactive, createVNode, resolveComponent, defineComponent, mergeProps, Fragment } from "vue";
|
|
2
|
-
var cascader = "";
|
|
3
|
-
const cascaderProps = {
|
|
4
|
-
trigger: {
|
|
5
|
-
type: String,
|
|
6
|
-
default: "hover"
|
|
7
|
-
},
|
|
8
|
-
options: {
|
|
9
|
-
type: Array,
|
|
10
|
-
default: [],
|
|
11
|
-
required: true
|
|
12
|
-
},
|
|
13
|
-
disabled: {
|
|
14
|
-
type: Boolean,
|
|
15
|
-
default: false
|
|
16
|
-
},
|
|
17
|
-
placeholder: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ""
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const getRootClass$2 = (props, menuShow) => {
|
|
23
|
-
return computed(() => ({
|
|
24
|
-
"devui-cascader devui-dropdown devui-dropdown-animation": true,
|
|
25
|
-
"devui-dropdown__open": menuShow.value,
|
|
26
|
-
"devui-cascader__disbaled": props.disabled
|
|
27
|
-
}));
|
|
28
|
-
};
|
|
29
|
-
const popupHandles = () => {
|
|
30
|
-
const menuShow = ref(false);
|
|
31
|
-
const menuOpenClass = ref("");
|
|
32
|
-
const openPopup = () => {
|
|
33
|
-
menuShow.value = !menuShow.value;
|
|
34
|
-
};
|
|
35
|
-
watch(menuShow, (status) => {
|
|
36
|
-
menuOpenClass.value = status ? "devui-drop-menu-wrapper" : "";
|
|
37
|
-
});
|
|
38
|
-
return {
|
|
39
|
-
menuShow,
|
|
40
|
-
menuOpenClass,
|
|
41
|
-
openPopup
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
const getRootClass$1 = () => {
|
|
45
|
-
return computed(() => ({
|
|
46
|
-
"devui-cascader-ul": true
|
|
47
|
-
}));
|
|
48
|
-
};
|
|
49
|
-
var index$2 = "";
|
|
50
|
-
const cascaderulProps = {
|
|
51
|
-
cascaderlis: {
|
|
52
|
-
type: Array,
|
|
53
|
-
default: []
|
|
54
|
-
},
|
|
55
|
-
ulIndex: {
|
|
56
|
-
type: Number,
|
|
57
|
-
default: 0
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
const getRootClass = () => {
|
|
61
|
-
return computed(() => ({
|
|
62
|
-
"devui-cascader-li devui-dropdown-item": true
|
|
63
|
-
}));
|
|
64
|
-
};
|
|
65
|
-
let cascaderOptions;
|
|
66
|
-
const optionsHandles = (options) => {
|
|
67
|
-
if (options) {
|
|
68
|
-
cascaderOptions = reactive([options]);
|
|
69
|
-
}
|
|
70
|
-
const changeCascaderIndexs = (optionItem, ulIndex) => {
|
|
71
|
-
var _a;
|
|
72
|
-
if (!cascaderOptions)
|
|
73
|
-
return;
|
|
74
|
-
if (((_a = optionItem == null ? void 0 : optionItem.children) == null ? void 0 : _a.length) > 0) {
|
|
75
|
-
cascaderOptions[ulIndex + 1] = optionItem.children;
|
|
76
|
-
} else {
|
|
77
|
-
cascaderOptions.splice(ulIndex + 1, cascaderOptions.length - 1 - ulIndex);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
return {
|
|
81
|
-
cascaderOptions,
|
|
82
|
-
changeCascaderIndexs
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
var index$1 = "";
|
|
86
|
-
const DCascaderItem = (props) => {
|
|
87
|
-
var _a;
|
|
88
|
-
const {
|
|
89
|
-
cascaderli,
|
|
90
|
-
ulIndex
|
|
91
|
-
} = props;
|
|
92
|
-
const {
|
|
93
|
-
changeCascaderIndexs
|
|
94
|
-
} = optionsHandles();
|
|
95
|
-
const rootClasses = getRootClass();
|
|
96
|
-
const mouseHover = () => {
|
|
97
|
-
changeCascaderIndexs(cascaderli, ulIndex);
|
|
98
|
-
};
|
|
99
|
-
return createVNode("li", {
|
|
100
|
-
"class": rootClasses.value,
|
|
101
|
-
"onMouseover": mouseHover
|
|
102
|
-
}, [createVNode("div", {
|
|
103
|
-
"class": "dropdown-item-label"
|
|
104
|
-
}, [createVNode("span", null, [cascaderli.label])]), ((_a = cascaderli == null ? void 0 : cascaderli.children) == null ? void 0 : _a.length) > 0 && createVNode(resolveComponent("d-icon"), {
|
|
105
|
-
"name": "chevron-right",
|
|
106
|
-
"size": "16px",
|
|
107
|
-
"color": "inherit"
|
|
108
|
-
}, null)]);
|
|
109
|
-
};
|
|
110
|
-
var DCascaderList = defineComponent({
|
|
111
|
-
name: "DCascaderList",
|
|
112
|
-
props: cascaderulProps,
|
|
113
|
-
setup(props) {
|
|
114
|
-
const rootClasses = getRootClass$1();
|
|
115
|
-
return () => createVNode("ul", {
|
|
116
|
-
"class": rootClasses.value
|
|
117
|
-
}, [props.cascaderlis.map((item, index2) => {
|
|
118
|
-
return createVNode(DCascaderItem, mergeProps({
|
|
119
|
-
"cascaderli": item,
|
|
120
|
-
"liIndex": index2
|
|
121
|
-
}, props), null);
|
|
122
|
-
})]);
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
var Cascader = defineComponent({
|
|
126
|
-
name: "DCascader",
|
|
127
|
-
props: cascaderProps,
|
|
128
|
-
setup(props, ctx) {
|
|
129
|
-
const origin = ref(null);
|
|
130
|
-
const position = reactive({
|
|
131
|
-
originX: "left",
|
|
132
|
-
originY: "bottom",
|
|
133
|
-
overlayX: "left",
|
|
134
|
-
overlayY: "top"
|
|
135
|
-
});
|
|
136
|
-
const {
|
|
137
|
-
menuShow,
|
|
138
|
-
menuOpenClass,
|
|
139
|
-
openPopup
|
|
140
|
-
} = popupHandles();
|
|
141
|
-
const rootClasses = getRootClass$2(props, menuShow);
|
|
142
|
-
const {
|
|
143
|
-
cascaderOptions: cascaderOptions2
|
|
144
|
-
} = optionsHandles(props.options);
|
|
145
|
-
return () => createVNode(Fragment, null, [createVNode("div", mergeProps({
|
|
146
|
-
"class": rootClasses.value,
|
|
147
|
-
"onClick": openPopup,
|
|
148
|
-
"ref": origin
|
|
149
|
-
}, ctx.attrs), [createVNode(resolveComponent("d-input"), {
|
|
150
|
-
"disabled": props.disabled,
|
|
151
|
-
"placeholder": props.placeholder
|
|
152
|
-
}, null), createVNode("div", {
|
|
153
|
-
"class": "devui-cascader__icon devui-drop-icon-animation"
|
|
154
|
-
}, [createVNode(resolveComponent("d-icon"), {
|
|
155
|
-
"name": "select-arrow",
|
|
156
|
-
"size": "12px"
|
|
157
|
-
}, null)])]), createVNode(resolveComponent("d-flexible-overlay"), {
|
|
158
|
-
"origin": origin,
|
|
159
|
-
"visible": menuShow.value,
|
|
160
|
-
"onUpdate:visible": ($event) => menuShow.value = $event,
|
|
161
|
-
"position": position
|
|
162
|
-
}, {
|
|
163
|
-
default: () => [createVNode("div", {
|
|
164
|
-
"class": "devui-drop-menu-animation"
|
|
165
|
-
}, [createVNode("div", {
|
|
166
|
-
"class": `${menuOpenClass.value} devui-dropdown-menu`
|
|
167
|
-
}, [cascaderOptions2.map((item, index2) => {
|
|
168
|
-
return createVNode(DCascaderList, {
|
|
169
|
-
"cascaderlis": item,
|
|
170
|
-
"ul-index": index2
|
|
171
|
-
}, null);
|
|
172
|
-
})])])]
|
|
173
|
-
})]);
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
Cascader.install = function(app) {
|
|
177
|
-
app.component(Cascader.name, Cascader);
|
|
178
|
-
};
|
|
179
|
-
var index = {
|
|
180
|
-
title: "Cascader \u7EA7\u8054\u83DC\u5355",
|
|
181
|
-
category: "\u6570\u636E\u5F55\u5165",
|
|
182
|
-
status: "10%",
|
|
183
|
-
install(app) {
|
|
184
|
-
app.use(Cascader);
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
export { Cascader, index as default };
|
package/cascader/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(t,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,e(t.index={},t.Vue))})(this,function(t,e){"use strict";var _="";const f={trigger:{type:String,default:"hover"},options:{type:Array,default:[],required:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""}},m=(a,n)=>e.computed(()=>({"devui-cascader devui-dropdown devui-dropdown-animation":!0,"devui-dropdown__open":n.value,"devui-cascader__disbaled":a.disabled})),C=()=>{const a=e.ref(!1),n=e.ref(""),o=()=>{a.value=!a.value};return e.watch(a,r=>{n.value=r?"devui-drop-menu-wrapper":""}),{menuShow:a,menuOpenClass:n,openPopup:o}},g=()=>e.computed(()=>({"devui-cascader-ul":!0}));var P="";const h={cascaderlis:{type:Array,default:[]},ulIndex:{type:Number,default:0}},v=()=>e.computed(()=>({"devui-cascader-li devui-dropdown-item":!0}));let d;const p=a=>(a&&(d=e.reactive([a])),{cascaderOptions:d,changeCascaderIndexs:(o,r)=>{var s;!d||(((s=o==null?void 0:o.children)==null?void 0:s.length)>0?d[r+1]=o.children:d.splice(r+1,d.length-1-r))}});var S="";const y=a=>{var c;const{cascaderli:n,ulIndex:o}=a,{changeCascaderIndexs:r}=p(),s=v(),i=()=>{r(n,o)};return e.createVNode("li",{class:s.value,onMouseover:i},[e.createVNode("div",{class:"dropdown-item-label"},[e.createVNode("span",null,[n.label])]),((c=n==null?void 0:n.children)==null?void 0:c.length)>0&&e.createVNode(e.resolveComponent("d-icon"),{name:"chevron-right",size:"16px",color:"inherit"},null)])};var N=e.defineComponent({name:"DCascaderList",props:h,setup(a){const n=g();return()=>e.createVNode("ul",{class:n.value},[a.cascaderlis.map((o,r)=>e.createVNode(y,e.mergeProps({cascaderli:o,liIndex:r},a),null))])}}),l=e.defineComponent({name:"DCascader",props:f,setup(a,n){const o=e.ref(null),r=e.reactive({originX:"left",originY:"bottom",overlayX:"left",overlayY:"top"}),{menuShow:s,menuOpenClass:i,openPopup:c}=C(),b=m(a,s),{cascaderOptions:x}=p(a.options);return()=>e.createVNode(e.Fragment,null,[e.createVNode("div",e.mergeProps({class:b.value,onClick:c,ref:o},n.attrs),[e.createVNode(e.resolveComponent("d-input"),{disabled:a.disabled,placeholder:a.placeholder},null),e.createVNode("div",{class:"devui-cascader__icon devui-drop-icon-animation"},[e.createVNode(e.resolveComponent("d-icon"),{name:"select-arrow",size:"12px"},null)])]),e.createVNode(e.resolveComponent("d-flexible-overlay"),{origin:o,visible:s.value,"onUpdate:visible":u=>s.value=u,position:r},{default:()=>[e.createVNode("div",{class:"devui-drop-menu-animation"},[e.createVNode("div",{class:`${i.value} devui-dropdown-menu`},[x.map((u,w)=>e.createVNode(N,{cascaderlis:u,"ul-index":w},null))])])]})])}});l.install=function(a){a.component(l.name,l)};var V={title:"Cascader \u7EA7\u8054\u83DC\u5355",category:"\u6570\u636E\u5F55\u5165",status:"10%",install(a){a.use(l)}};t.Cascader=l,t.default=V,Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"});
|
package/cascader/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.devui-cascader{display:flex;justify-content:flex-start;align-items:center;position:relative}.devui-cascader>div:nth-child(1){width:100%}.devui-cascader__icon{position:absolute;right:5px;top:0;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.devui-cascader__icon .icon{margin:0}.devui-cascader input{width:100%;padding-right:16px}.devui-cascader .devui-drop-menu-wrapper{display:block;margin:4px 0;font-size:0;white-space:nowrap;padding:0}.devui-drop-icon-animation{transition:transform .2s linear}.devui-drop-menu-animation{transition:opacity .2s ease-in-out,transform .2s ease-in-out;z-index:1000;margin-top:1px}.devui-drop-menu-animation .devui-dropdown-menu{width:auto;padding-bottom:0;display:flex;justify-content:"flex-start";align-items:center}.devui-dropdown__open .devui-cascader__icon{transform:rotate(180deg)}.devui-dropdown__open .devui-drop-menu-animation{transform-origin:0 0%;transform:scaleY(.9999) translateY(0);opacity:1}.devui-cascader-ul{width:200px;height:180px;background:var(--devui-connected-overlay-bg, #ffffff);display:block;list-style:none;margin:0;padding:0;overflow-y:auto;border-left:1px solid var(--devui-dividing-line, #dfe1e6)}.devui-cascader-li.devui-dropdown-item{height:32px;padding:8px 12px;color:var(--devui-text, #252b3a);cursor:pointer;display:flex;justify-content:flex-start;align-items:center}.devui-cascader-li .dropdown-item-label{display:inline-block;flex:1;width:0;overflow:hidden;text-overflow:ellipsis;font-size:var(--devui-font-size, 12px)}
|