vue-devui 1.0.0-beta.18 → 1.0.0-beta.20220808
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 +94 -118
- package/alert/index.es.js +74 -45
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +8395 -463
- package/auto-complete/index.umd.js +40 -1
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +153 -146
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.es.js +45 -20
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5751 -156
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.es.js +63 -35
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +8110 -278
- package/checkbox/index.umd.js +38 -1
- package/checkbox/style.css +1 -1
- package/{accordion → collapse}/index.d.ts +0 -0
- package/collapse/index.es.js +195 -0
- package/collapse/index.umd.js +1 -0
- package/{back-top → collapse}/package.json +1 -1
- package/collapse/style.css +1 -0
- package/countdown/index.es.js +60 -19
- package/countdown/index.umd.js +1 -1
- package/{anchor → date-picker-pro}/index.d.ts +0 -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.es.js +191 -5756
- package/drawer/index.umd.js +1 -27
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +616 -415
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +779 -211
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +2405 -2125
- package/form/index.umd.js +28 -17
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +137 -134
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.es.js +105 -103
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +199 -56
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +67 -54
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +8268 -144
- package/input/index.umd.js +38 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +260 -192
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +40 -25
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.es.js +86 -70
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/{back-top → mention}/index.d.ts +0 -0
- package/{color-picker → mention}/index.es.js +3036 -2898
- package/mention/index.umd.js +47 -0
- package/{anchor → mention}/package.json +1 -1
- package/mention/style.css +1 -0
- package/{breadcrumb → menu}/index.d.ts +0 -0
- package/menu/index.es.js +891 -0
- package/menu/index.umd.js +1 -0
- package/{toast → menu}/package.json +1 -1
- package/menu/style.css +1 -0
- package/{carousel → message}/index.d.ts +0 -0
- package/message/index.es.js +533 -0
- package/message/index.umd.js +1 -0
- package/{comment → message}/package.json +1 -1
- package/message/style.css +1 -0
- package/modal/index.es.js +602 -1061
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/{cascader → notification}/index.d.ts +0 -0
- package/notification/index.es.js +528 -0
- package/notification/index.umd.js +1 -0
- package/{accordion → notification}/package.json +1 -1
- package/notification/style.css +1 -0
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/DRangeDatePickerPro.js +3 -0
- package/nuxt/components/DatePickerPro.js +3 -0
- package/nuxt/components/DropdownMenu.js +3 -0
- package/nuxt/components/DropdownPropsKey.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/IFileOptions.js +3 -0
- package/nuxt/components/IUploadOptions.js +3 -0
- package/nuxt/components/Icon.js +1 -0
- package/nuxt/components/IconGroup.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/LoadingOptions.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/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/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/RadioButton.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/TABLE_TOKEN.js +3 -0
- package/nuxt/components/Tab.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/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/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/overlay/index.es.js +239 -314
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +44 -87
- package/pagination/index.es.js +331 -153
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/panel/style.css +1 -1
- package/popover/index.es.js +6034 -215
- package/popover/index.umd.js +27 -1
- package/popover/style.css +1 -1
- package/progress/index.es.js +110 -56
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +8013 -180
- package/radio/index.umd.js +38 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +77 -55
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +186 -57
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/ripple/index.es.js +52 -60
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +3885 -1152
- package/search/index.umd.js +29 -18
- package/search/style.css +1 -1
- package/select/index.es.js +9235 -516
- package/select/index.umd.js +38 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +113 -265
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +144 -137
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +6219 -232
- package/splitter/index.umd.js +27 -1
- package/splitter/style.css +1 -1
- package/statistic/index.es.js +41 -55
- package/statistic/index.umd.js +1 -1
- package/statistic/style.css +1 -1
- package/status/index.es.js +27 -6
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/{color-picker → steps}/index.d.ts +0 -0
- package/steps/index.es.js +386 -0
- package/steps/index.umd.js +1 -0
- package/{gantt → steps}/package.json +1 -1
- package/steps/style.css +1 -0
- package/style.css +1 -1
- package/switch/index.es.js +7818 -64
- package/switch/index.umd.js +38 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +11109 -1451
- package/table/index.umd.js +38 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +356 -144
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +49 -24
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +7940 -83
- package/textarea/index.umd.js +46 -1
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +8953 -632
- package/time-picker/index.umd.js +38 -1
- package/time-picker/style.css +1 -1
- package/{comment → time-select}/index.d.ts +0 -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/{date-picker → timeline}/index.d.ts +0 -0
- package/timeline/index.es.js +427 -0
- package/timeline/index.umd.js +1 -0
- package/{carousel → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +5871 -96
- package/tooltip/index.umd.js +27 -1
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +7601 -2508
- package/tree/index.umd.js +29 -18
- package/tree/style.css +1 -1
- package/upload/index.es.js +849 -6143
- package/upload/index.umd.js +1 -27
- package/upload/style.css +1 -1
- package/vue-devui.es.js +20537 -19051
- package/vue-devui.umd.js +41 -19
- package/accordion/index.es.js +0 -508
- 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/back-top/index.es.js +0 -128
- package/back-top/index.umd.js +0 -1
- package/back-top/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 -329
- package/carousel/index.umd.js +0 -1
- package/carousel/style.css +0 -1
- package/cascader/index.es.js +0 -5963
- package/cascader/index.umd.js +0 -27
- package/cascader/package.json +0 -7
- package/cascader/style.css +0 -1
- package/color-picker/index.umd.js +0 -27
- package/color-picker/package.json +0 -7
- package/color-picker/style.css +0 -1
- package/comment/index.es.js +0 -86
- package/comment/index.umd.js +0 -1
- package/comment/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/dragdrop/index.d.ts +0 -7
- package/dragdrop/index.es.js +0 -157
- package/dragdrop/index.umd.js +0 -1
- package/dragdrop/package.json +0 -7
- package/gantt/index.d.ts +0 -7
- package/gantt/index.es.js +0 -523
- package/gantt/index.umd.js +0 -1
- package/gantt/style.css +0 -1
- package/input-icon/index.d.ts +0 -7
- package/input-icon/index.es.js +0 -331
- package/input-icon/index.umd.js +0 -1
- package/input-icon/package.json +0 -7
- package/input-icon/style.css +0 -1
- package/nav-sprite/index.d.ts +0 -7
- package/nav-sprite/index.es.js +0 -68
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/nuxt/components/Accordion.js +0 -3
- package/nuxt/components/Anchor.js +0 -3
- package/nuxt/components/BackTop.js +0 -3
- package/nuxt/components/Breadcrumb.js +0 -3
- package/nuxt/components/Carousel.js +0 -3
- package/nuxt/components/CarouselItem.js +0 -3
- package/nuxt/components/Cascader.js +0 -3
- package/nuxt/components/ColorPicker.js +0 -3
- package/nuxt/components/Comment.js +0 -3
- package/nuxt/components/DatePicker.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/NavSprite.js +0 -2
- package/nuxt/components/QuadrantDiagram.js +0 -3
- package/nuxt/components/ReadTip.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/StickSlider.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/TagInput.js +0 -3
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/Toast.js +0 -3
- package/nuxt/components/ToastService.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/quadrant-diagram/index.d.ts +0 -7
- package/quadrant-diagram/index.es.js +0 -5728
- package/quadrant-diagram/index.umd.js +0 -27
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/read-tip/index.d.ts +0 -7
- package/read-tip/index.es.js +0 -258
- package/read-tip/index.umd.js +0 -1
- package/read-tip/package.json +0 -7
- package/read-tip/style.css +0 -1
- package/steps-guide/index.d.ts +0 -7
- package/steps-guide/index.es.js +0 -239
- 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.d.ts +0 -7
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/sticky/package.json +0 -7
- package/tag-input/index.d.ts +0 -7
- package/tag-input/index.es.js +0 -329
- 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.d.ts +0 -7
- package/time-axis/index.es.js +0 -299
- 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.d.ts +0 -7
- package/toast/index.es.js +0 -5918
- package/toast/index.umd.js +0 -27
- package/toast/style.css +0 -1
- package/transfer/index.d.ts +0 -7
- package/transfer/index.es.js +0 -7340
- package/transfer/index.umd.js +0 -27
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree-select/index.d.ts +0 -7
- package/tree-select/index.es.js +0 -623
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/form/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 4px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}.devui-popover__icon-wrap{width:16px;height:16px;margin-right:8px}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>path{fill:var(--devui-success, #50d4ab)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>circle,.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>path{fill:var(--devui-warning, #fac20a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>g{fill:var(--devui-info, #5e7ce0)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>path{fill:var(--devui-danger, #f66f6a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__content.devui-flexible-overlay{display:flex;flex-wrap:wrap;align-items:center;white-space:nowrap;padding:4px 12px;line-height:1.5;border-radius:var(--devui-border-radius-feedback, 4px);color:var(--devui-feedback-overlay-text, #dfe1e6);background-color:var(--devui-feedback-overlay-bg, #464d6e);font-size:var(--devui-font-size-sm, 12px)}.devui-popover__content.devui-flexible-overlay.is-icon{flex-wrap:nowrap}.devui-popover--fade-bottom-enter-from,.devui-popover--fade-bottom-leave-to,.devui-popover--fade-top-enter-from,.devui-popover--fade-top-leave-to{opacity:.8;transform:scaleY(.8)}.devui-popover--fade-bottom-enter-to,.devui-popover--fade-bottom-leave-from,.devui-popover--fade-top-enter-to,.devui-popover--fade-top-leave-from{opacity:1;transform:scaleY(1)}.devui-popover--fade-bottom-enter-active,.devui-popover--fade-top-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-bottom-leave-active,.devui-popover--fade-top-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-popover--fade-left-enter-from,.devui-popover--fade-left-leave-to,.devui-popover--fade-right-enter-from,.devui-popover--fade-right-leave-to{opacity:.8;transform:scaleX(.8)}.devui-popover--fade-left-enter-to,.devui-popover--fade-left-leave-from,.devui-popover--fade-right-enter-to,.devui-popover--fade-right-leave-from{opacity:1;transform:scaleX(1)}.devui-popover--fade-left-enter-active,.devui-popover--fade-right-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-left-leave-active,.devui-popover--fade-right-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-form__label{align-self:flex-start}.devui-form__label--vertical{padding-bottom:8px}.devui-form__label--sm{flex:0 0 80px}.devui-form__label--md{flex:0 0 100px}.devui-form__label--lg{flex:0 0 150px}.devui-form__label--start{text-align:left}.devui-form__label--center{text-align:center}.devui-form__label--end{text-align:end}.devui-form__label-span{display:inline-block;vertical-align:middle;color:var(--devui-text, #252b3a)}.devui-form__label--required:before{content:"*";color:red;display:inline-block;margin-right:8px;margin-left:-12px}.devui-form__label-help{position:relative;top:-.1em;display:inline-block;vertical-align:middle;margin-left:4px;cursor:pointer}.devui-form__control{flex:1 1 auto;position:relative;width:100%}.devui-form__control--horizontal{margin-left:16px}.devui-form__control .devui-star{color:red}.devui-form__control .devui-form__control-container{position:relative}.devui-form__control .devui-form__control-container--horizontal{display:flex;width:100%}.devui-form__control .devui-form__control-container--horizontal .devui-validate-tip{margin:0}.devui-form__control .devui-form__control-container .devui-form__feedback-icon{position:absolute;top:50%;right:0;z-index:1;width:32px;height:16px;text-align:center;visibility:visible;pointer-events:none;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg circle{fill:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg circle{fill:var(--devui-success, #50d4ab)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg{animation:loading-keyframes 1s infinite linear}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg path{fill:var(--devui-brand, #5e7ce0)}.devui-form__control .devui-form__control-content{width:100%}.devui-form__control .devui-form__control-container--has-feedback{display:flex;align-items:center}.devui-form__control .devui-form__control-container--has-feedback input{padding-right:28px}.devui-form__control .devui-form__control-container--feedback-error{border:1px solid #f66f6a;border-radius:2px}.devui-form__control .devui-form__control-container--feedback-error input{background-color:#ffeeed;border-color:transparent}.devui-form__control .devui-form__control-container--feedback-error input:hover{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error input:focus{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error .devui-select-arrow{right:24px!important}.devui-form__control .devui-form__control-info{line-height:1}.devui-form__control .devui-form__control-info .error-message{display:inline-block;min-height:20px;line-height:1.5;font-size:var(--devui-font-size, 14px);color:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-info .devui-form__control-extra{font-size:var(--devui-font-size, 14px);color:var(--devui-aide-text, #71757f);min-height:20px;line-height:1.5;text-align:justify}@keyframes loading-keyframes{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.devui-form__item--horizontal{display:flex;align-items:center;margin-bottom:20px}.devui-form__item--vertical{display:flex;flex-direction:column;margin-bottom:20px}.devui-form__item--error{margin-bottom:0}.devui-form-operation .star{color:red}
|
package/fullscreen/index.es.js
CHANGED
|
@@ -1,146 +1,152 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var fullscreen = "";
|
|
1
|
+
import { toRefs, onMounted, onUnmounted, watch, defineComponent, ref, renderSlot, useSlots, createVNode } from "vue";
|
|
3
2
|
const fullscreenProps = {
|
|
4
|
-
|
|
5
|
-
type:
|
|
6
|
-
default:
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: Boolean,
|
|
5
|
+
default: false
|
|
7
6
|
},
|
|
8
7
|
mode: {
|
|
9
8
|
type: String,
|
|
10
|
-
default: "
|
|
9
|
+
default: "normal"
|
|
11
10
|
},
|
|
12
11
|
zIndex: {
|
|
13
12
|
type: Number,
|
|
14
13
|
default: 10
|
|
15
14
|
}
|
|
16
15
|
};
|
|
16
|
+
const ESC_KEY_CODE = 27;
|
|
17
|
+
function useKeydown(props, ctx) {
|
|
18
|
+
const { modelValue } = toRefs(props);
|
|
19
|
+
const handleKeydown = (event) => {
|
|
20
|
+
if (event.keyCode === ESC_KEY_CODE && modelValue) {
|
|
21
|
+
ctx.emit("update:modelValue", false);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
document.addEventListener("keydown", handleKeydown);
|
|
26
|
+
});
|
|
27
|
+
onUnmounted(() => {
|
|
28
|
+
document.removeEventListener("keydown", handleKeydown);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function createBem(namespace, element, modifier) {
|
|
32
|
+
let cls = namespace;
|
|
33
|
+
if (element) {
|
|
34
|
+
cls += `__${element}`;
|
|
35
|
+
}
|
|
36
|
+
if (modifier) {
|
|
37
|
+
cls += `--${modifier}`;
|
|
38
|
+
}
|
|
39
|
+
return cls;
|
|
40
|
+
}
|
|
41
|
+
function useNamespace(block, needDot = false) {
|
|
42
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
43
|
+
const b = () => createBem(namespace);
|
|
44
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
45
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
46
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
47
|
+
return {
|
|
48
|
+
b,
|
|
49
|
+
e,
|
|
50
|
+
m,
|
|
51
|
+
em
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const ns = useNamespace("fullscreen");
|
|
55
|
+
const launchNormalFullscreen = (targetElement, props) => {
|
|
56
|
+
targetElement.classList.add(ns.b());
|
|
57
|
+
if (props.zIndex) {
|
|
58
|
+
targetElement.setAttribute("style", `z-index: ${props.zIndex}`);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const exitNormalFullscreen = (targetElement) => {
|
|
62
|
+
targetElement.classList.remove(ns.b());
|
|
63
|
+
targetElement.style.zIndex = "";
|
|
64
|
+
};
|
|
65
|
+
const launchImmersiveFullScreen = async (docElement) => {
|
|
66
|
+
let fullscreenLaunch = null;
|
|
67
|
+
if (docElement.requestFullscreen) {
|
|
68
|
+
fullscreenLaunch = docElement.requestFullscreen();
|
|
69
|
+
} else if (docElement.mozRequestFullScreen) {
|
|
70
|
+
fullscreenLaunch = docElement.mozRequestFullScreen();
|
|
71
|
+
} else if (docElement.webkitRequestFullScreen) {
|
|
72
|
+
fullscreenLaunch = Promise.resolve(docElement.webkitRequestFullScreen());
|
|
73
|
+
} else if (docElement.msRequestFullscreen) {
|
|
74
|
+
fullscreenLaunch = Promise.resolve(docElement.msRequestFullscreen());
|
|
75
|
+
}
|
|
76
|
+
return await (fullscreenLaunch == null ? void 0 : fullscreenLaunch.then(() => !!document.fullscreenElement));
|
|
77
|
+
};
|
|
78
|
+
const exitImmersiveFullScreen = async (doc) => {
|
|
79
|
+
let fullscreenExit = null;
|
|
80
|
+
if (doc.exitFullscreen) {
|
|
81
|
+
fullscreenExit = doc.exitFullscreen();
|
|
82
|
+
} else if (doc.mozCancelFullScreen) {
|
|
83
|
+
fullscreenExit = doc.mozCancelFullScreen();
|
|
84
|
+
} else if (doc.webkitCancelFullScreen) {
|
|
85
|
+
fullscreenExit = Promise.resolve(doc.webkitCancelFullScreen());
|
|
86
|
+
} else if (doc.msExitFullscreen) {
|
|
87
|
+
fullscreenExit = Promise.resolve(doc.msExitFullscreen());
|
|
88
|
+
}
|
|
89
|
+
return await (fullscreenExit == null ? void 0 : fullscreenExit.then(() => !!document.fullscreenElement));
|
|
90
|
+
};
|
|
91
|
+
const addFullScreenStyle = () => {
|
|
92
|
+
document.getElementsByTagName("html")[0].classList.add(ns.e("html"));
|
|
93
|
+
};
|
|
94
|
+
const removeFullScreenStyle = () => {
|
|
95
|
+
document.getElementsByTagName("html")[0].classList.remove(ns.e("html"));
|
|
96
|
+
};
|
|
97
|
+
function useFullscreen(props, slotElement, ctx) {
|
|
98
|
+
const { modelValue, mode } = toRefs(props);
|
|
99
|
+
let exitByKeydown = false;
|
|
100
|
+
const handleNormalFullscreen = (isOpen) => {
|
|
101
|
+
if (isOpen) {
|
|
102
|
+
launchNormalFullscreen(slotElement.value, props);
|
|
103
|
+
addFullScreenStyle();
|
|
104
|
+
} else {
|
|
105
|
+
exitNormalFullscreen(slotElement.value);
|
|
106
|
+
removeFullScreenStyle();
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const handleImmersiveFullscreen = (isOpen) => {
|
|
110
|
+
if (isOpen) {
|
|
111
|
+
launchImmersiveFullScreen(slotElement.value);
|
|
112
|
+
} else {
|
|
113
|
+
if (!exitByKeydown) {
|
|
114
|
+
exitImmersiveFullScreen(document);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
watch(modelValue, (newVal) => {
|
|
119
|
+
if (mode.value === "normal") {
|
|
120
|
+
handleNormalFullscreen(newVal);
|
|
121
|
+
}
|
|
122
|
+
if (mode.value === "immersive") {
|
|
123
|
+
handleImmersiveFullscreen(newVal);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
const handleFullscreenChange = () => {
|
|
127
|
+
if (!document.fullscreenElement) {
|
|
128
|
+
ctx.emit("update:modelValue");
|
|
129
|
+
exitByKeydown = true;
|
|
130
|
+
} else {
|
|
131
|
+
exitByKeydown = false;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
onMounted(() => {
|
|
135
|
+
document.addEventListener("fullscreenchange", handleFullscreenChange);
|
|
136
|
+
});
|
|
137
|
+
onUnmounted(() => {
|
|
138
|
+
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
var fullscreen = "";
|
|
17
142
|
var Fullscreen = defineComponent({
|
|
18
143
|
name: "DFullscreen",
|
|
19
144
|
props: fullscreenProps,
|
|
20
|
-
emits: ["
|
|
145
|
+
emits: ["update:modelValue"],
|
|
21
146
|
setup(props, ctx) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const onFullScreenChange = () => {
|
|
26
|
-
if (currentTarget) {
|
|
27
|
-
const targetElement = currentTarget;
|
|
28
|
-
if (document.fullscreenElement) {
|
|
29
|
-
addFullScreenStyle();
|
|
30
|
-
launchNormalFullscreen(targetElement);
|
|
31
|
-
} else {
|
|
32
|
-
removeFullScreenStyle();
|
|
33
|
-
currentTarget = null;
|
|
34
|
-
exitNormalFullscreen(targetElement);
|
|
35
|
-
}
|
|
36
|
-
isFullscreen.value = !!document.fullscreenElement;
|
|
37
|
-
ctx.emit("fullscreenLaunch", isFullscreen.value);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
const launchNormalFullscreen = (targetElement) => {
|
|
41
|
-
targetElement.classList.add("fullscreen");
|
|
42
|
-
if (props.zIndex) {
|
|
43
|
-
targetElement.setAttribute("style", `z-index: ${props.zIndex}`);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const exitNormalFullscreen = (targetElement) => {
|
|
47
|
-
targetElement.classList.remove("fullscreen");
|
|
48
|
-
targetElement.style.zIndex = null;
|
|
49
|
-
};
|
|
50
|
-
const handleFullscreen = async () => {
|
|
51
|
-
const targetElement = slotElement.value.querySelector("[fullscreen-target]");
|
|
52
|
-
let isFull = false;
|
|
53
|
-
if (props.mode === "normal") {
|
|
54
|
-
const fullscreen2 = targetElement.classList.contains("fullscreen");
|
|
55
|
-
if (!fullscreen2) {
|
|
56
|
-
addFullScreenStyle();
|
|
57
|
-
launchNormalFullscreen(targetElement);
|
|
58
|
-
isFull = true;
|
|
59
|
-
} else {
|
|
60
|
-
removeFullScreenStyle();
|
|
61
|
-
exitNormalFullscreen(targetElement);
|
|
62
|
-
isFull = false;
|
|
63
|
-
}
|
|
64
|
-
} else {
|
|
65
|
-
currentTarget = targetElement;
|
|
66
|
-
if (document.fullscreenElement || document.msFullscreenElement || document.webkitFullscreenElement) {
|
|
67
|
-
isFull = await exitImmersiveFullScreen(document);
|
|
68
|
-
} else {
|
|
69
|
-
isFull = await launchImmersiveFullScreen(currentTarget);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
isFullscreen.value = isFull;
|
|
73
|
-
ctx.emit("fullscreenLaunch", isFullscreen.value);
|
|
74
|
-
};
|
|
75
|
-
const addFullScreenStyle = () => {
|
|
76
|
-
document.getElementsByTagName("html")[0].classList.add("devui-fullscreen");
|
|
77
|
-
};
|
|
78
|
-
const removeFullScreenStyle = () => {
|
|
79
|
-
document.getElementsByTagName("html")[0].classList.remove("devui-fullscreen");
|
|
80
|
-
};
|
|
81
|
-
const exitImmersiveFullScreen = async (doc) => {
|
|
82
|
-
let fullscreenExit = null;
|
|
83
|
-
if (doc.exitFullscreen) {
|
|
84
|
-
fullscreenExit = doc.exitFullscreen();
|
|
85
|
-
} else if (doc.mozCancelFullScreen) {
|
|
86
|
-
fullscreenExit = doc.mozCancelFullScreen();
|
|
87
|
-
} else if (doc.webkitCancelFullScreen) {
|
|
88
|
-
fullscreenExit = Promise.resolve(doc.webkitCancelFullScreen());
|
|
89
|
-
} else if (doc.msExitFullscreen) {
|
|
90
|
-
fullscreenExit = Promise.resolve(doc.msExitFullscreen());
|
|
91
|
-
}
|
|
92
|
-
return await fullscreenExit.then(() => !!document.fullscreenElement);
|
|
93
|
-
};
|
|
94
|
-
const launchImmersiveFullScreen = async (docElement) => {
|
|
95
|
-
let fullscreenLaunch = null;
|
|
96
|
-
if (docElement.requestFullscreen) {
|
|
97
|
-
fullscreenLaunch = docElement.requestFullscreen();
|
|
98
|
-
} else if (docElement.mozRequestFullScreen) {
|
|
99
|
-
fullscreenLaunch = docElement.mozRequestFullScreen();
|
|
100
|
-
} else if (docElement.webkitRequestFullScreen) {
|
|
101
|
-
fullscreenLaunch = Promise.resolve(docElement.webkitRequestFullScreen());
|
|
102
|
-
} else if (docElement.msRequestFullscreen) {
|
|
103
|
-
fullscreenLaunch = Promise.resolve(docElement.msRequestFullscreen());
|
|
104
|
-
}
|
|
105
|
-
return await fullscreenLaunch.then(() => !!document.fullscreenElement);
|
|
106
|
-
};
|
|
107
|
-
const handleKeyDown = (event) => {
|
|
108
|
-
if (event.keyCode === 27) {
|
|
109
|
-
if (isFullscreen.value) {
|
|
110
|
-
const targetElement = slotElement.value.querySelector("[fullscreen-target]");
|
|
111
|
-
if (props.mode === "normal") {
|
|
112
|
-
removeFullScreenStyle();
|
|
113
|
-
exitNormalFullscreen(targetElement);
|
|
114
|
-
} else {
|
|
115
|
-
if (document.fullscreenElement) {
|
|
116
|
-
exitImmersiveFullScreen(document);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
isFullscreen.value = false;
|
|
120
|
-
ctx.emit("fullscreenLaunch", isFullscreen.value);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
onMounted(() => {
|
|
125
|
-
const btnLaunch = slotElement.value.querySelector("[fullscreen-launch]");
|
|
126
|
-
if (btnLaunch) {
|
|
127
|
-
btnLaunch.addEventListener("click", handleFullscreen);
|
|
128
|
-
}
|
|
129
|
-
document.addEventListener("fullscreenchange", onFullScreenChange);
|
|
130
|
-
document.addEventListener("MSFullscreenChange", onFullScreenChange);
|
|
131
|
-
document.addEventListener("webkitfullscreenchange", onFullScreenChange);
|
|
132
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
133
|
-
});
|
|
134
|
-
onBeforeUnmount(() => {
|
|
135
|
-
const btnLaunch = slotElement.value.querySelector("[fullscreen-launch]");
|
|
136
|
-
if (btnLaunch) {
|
|
137
|
-
btnLaunch.removeEventListener("click", handleFullscreen);
|
|
138
|
-
}
|
|
139
|
-
document.removeEventListener("fullscreenchange", onFullScreenChange);
|
|
140
|
-
document.removeEventListener("MSFullscreenChange", onFullScreenChange);
|
|
141
|
-
document.removeEventListener("webkitfullscreenchange", onFullScreenChange);
|
|
142
|
-
document.removeEventListener("keydown", handleKeyDown);
|
|
143
|
-
});
|
|
147
|
+
const slotElement = ref();
|
|
148
|
+
useFullscreen(props, slotElement, ctx);
|
|
149
|
+
useKeydown(props, ctx);
|
|
144
150
|
return () => {
|
|
145
151
|
const defaultSlot = renderSlot(useSlots(), "default");
|
|
146
152
|
return createVNode("div", {
|
|
@@ -149,15 +155,12 @@ var Fullscreen = defineComponent({
|
|
|
149
155
|
};
|
|
150
156
|
}
|
|
151
157
|
});
|
|
152
|
-
Fullscreen.install = function(app) {
|
|
153
|
-
app.component(Fullscreen.name, Fullscreen);
|
|
154
|
-
};
|
|
155
158
|
var index = {
|
|
156
159
|
title: "Fullscreen \u5168\u5C4F",
|
|
157
160
|
category: "\u901A\u7528",
|
|
158
161
|
status: "100%",
|
|
159
162
|
install(app) {
|
|
160
|
-
app.
|
|
163
|
+
app.component(Fullscreen.name, Fullscreen);
|
|
161
164
|
}
|
|
162
165
|
};
|
|
163
|
-
export { Fullscreen, index as default };
|
|
166
|
+
export { Fullscreen, index as default, fullscreenProps };
|
package/fullscreen/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(r,n){typeof exports=="object"&&typeof module!="undefined"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(r=typeof globalThis!="undefined"?globalThis:r||self,n(r.index={},r.Vue))})(this,function(r,n){"use strict";const F={modelValue:{type:Boolean,default:!1},mode:{type:String,default:"normal"},zIndex:{type:Number,default:10}},v=27;function S(e,l){const{modelValue:t}=n.toRefs(e),s=c=>{c.keyCode===v&&t&&l.emit("update:modelValue",!1)};n.onMounted(()=>{document.addEventListener("keydown",s)}),n.onUnmounted(()=>{document.removeEventListener("keydown",s)})}function i(e,l,t){let s=e;return l&&(s+=`__${l}`),t&&(s+=`--${t}`),s}function h(e,l=!1){const t=l?`.devui-${e}`:`devui-${e}`;return{b:()=>i(t),e:u=>u?i(t,u):"",m:u=>u?i(t,"",u):"",em:(u,a)=>u&&a?i(t,u,a):""}}const m=h("fullscreen"),p=(e,l)=>{e.classList.add(m.b()),l.zIndex&&e.setAttribute("style",`z-index: ${l.zIndex}`)},x=e=>{e.classList.remove(m.b()),e.style.zIndex=""},b=async e=>{let l=null;return e.requestFullscreen?l=e.requestFullscreen():e.mozRequestFullScreen?l=e.mozRequestFullScreen():e.webkitRequestFullScreen?l=Promise.resolve(e.webkitRequestFullScreen()):e.msRequestFullscreen&&(l=Promise.resolve(e.msRequestFullscreen())),await(l==null?void 0:l.then(()=>!!document.fullscreenElement))},w=async e=>{let l=null;return e.exitFullscreen?l=e.exitFullscreen():e.mozCancelFullScreen?l=e.mozCancelFullScreen():e.webkitCancelFullScreen?l=Promise.resolve(e.webkitCancelFullScreen()):e.msExitFullscreen&&(l=Promise.resolve(e.msExitFullscreen())),await(l==null?void 0:l.then(()=>!!document.fullscreenElement))},C=()=>{document.getElementsByTagName("html")[0].classList.add(m.e("html"))},q=()=>{document.getElementsByTagName("html")[0].classList.remove(m.e("html"))};function z(e,l,t){const{modelValue:s,mode:c}=n.toRefs(e);let d=!1;const y=o=>{o?(p(l.value,e),C()):(x(l.value),q())},u=o=>{o?b(l.value):d||w(document)};n.watch(s,o=>{c.value==="normal"&&y(o),c.value==="immersive"&&u(o)});const a=()=>{document.fullscreenElement?d=!1:(t.emit("update:modelValue"),d=!0)};n.onMounted(()=>{document.addEventListener("fullscreenchange",a)}),n.onUnmounted(()=>{document.removeEventListener("fullscreenchange",a)})}var N="",f=n.defineComponent({name:"DFullscreen",props:F,emits:["update:modelValue"],setup(e,l){const t=n.ref();return z(e,t,l),S(e,l),()=>{const s=n.renderSlot(n.useSlots(),"default");return n.createVNode("div",{ref:t},[s])}}}),g={title:"Fullscreen \u5168\u5C4F",category:"\u901A\u7528",status:"100%",install(e){e.component(f.name,f)}};r.Fullscreen=f,r.default=g,r.fullscreenProps=F,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/fullscreen/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.fullscreen{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10;overflow:auto;background-color:var(--devui-base-bg, #ffffff)}.devui-
|
|
1
|
+
.devui-fullscreen{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10;overflow:auto;background-color:var(--devui-base-bg, #ffffff)}.devui-fullscreen__html{overflow:hidden}:not(:root):fullscreen::backdrop{background:var(--devui-base-bg, #ffffff)}
|
package/grid/index.es.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
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 { computed, defineComponent, ref, onMounted, onUnmounted, provide, createVNode, inject } from "vue";
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, onUnmounted, provide, createVNode, inject } from "vue";
|
|
18
2
|
const rowProps = {
|
|
19
3
|
align: {
|
|
20
4
|
type: String,
|
|
@@ -33,15 +17,6 @@ const rowProps = {
|
|
|
33
17
|
default: false
|
|
34
18
|
}
|
|
35
19
|
};
|
|
36
|
-
const screenSizesProp = [Number, Object];
|
|
37
|
-
const screenSizes = {
|
|
38
|
-
xs: screenSizesProp,
|
|
39
|
-
sm: screenSizesProp,
|
|
40
|
-
md: screenSizesProp,
|
|
41
|
-
lg: screenSizesProp,
|
|
42
|
-
xl: screenSizesProp,
|
|
43
|
-
xxl: screenSizesProp
|
|
44
|
-
};
|
|
45
20
|
const numberProp = Number;
|
|
46
21
|
const colPropsBaseStyle = {
|
|
47
22
|
flex: [String, Number],
|
|
@@ -53,46 +28,16 @@ const colPropsBaseClass = {
|
|
|
53
28
|
push: numberProp,
|
|
54
29
|
span: numberProp
|
|
55
30
|
};
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const pushClass = formatClass(`${CLASS_PREFIX$1}-push`, props.push);
|
|
67
|
-
return `${spanClass}${offsetClass}${pullClass}${pushClass}`;
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function setSpace(val) {
|
|
71
|
-
return ` ${val.trim()}${val && " "}`;
|
|
72
|
-
}
|
|
73
|
-
function useSize(colSizes) {
|
|
74
|
-
const keys = Object.keys(colSizes).filter((key) => key in screenSizes);
|
|
75
|
-
return computed(() => {
|
|
76
|
-
return keys.reduce((total, key) => {
|
|
77
|
-
const valueType = typeof colSizes[key];
|
|
78
|
-
if (valueType === "number") {
|
|
79
|
-
total = `${setSpace(total)}${CLASS_PREFIX$1}-${key}-span-${colSizes[key]}`;
|
|
80
|
-
} else if (valueType === "object") {
|
|
81
|
-
const colSizesKeys = Object.keys(colSizes[key]);
|
|
82
|
-
const sum = colSizesKeys.filter((item) => item in colPropsBaseClass).reduce((tot, k) => {
|
|
83
|
-
if (typeof colSizes[key][k] !== "number") {
|
|
84
|
-
return "";
|
|
85
|
-
} else {
|
|
86
|
-
tot = `${setSpace(tot)}${CLASS_PREFIX$1}-${key}-${k}-${colSizes[key][k]}`;
|
|
87
|
-
}
|
|
88
|
-
return tot;
|
|
89
|
-
}, "");
|
|
90
|
-
total = `${setSpace(total)}${sum}`;
|
|
91
|
-
}
|
|
92
|
-
return total;
|
|
93
|
-
}, "");
|
|
94
|
-
});
|
|
95
|
-
}
|
|
31
|
+
const screenSizesProp = [Number, Object];
|
|
32
|
+
const screenSizes = {
|
|
33
|
+
xs: screenSizesProp,
|
|
34
|
+
sm: screenSizesProp,
|
|
35
|
+
md: screenSizesProp,
|
|
36
|
+
lg: screenSizesProp,
|
|
37
|
+
xl: screenSizesProp,
|
|
38
|
+
xxl: screenSizesProp
|
|
39
|
+
};
|
|
40
|
+
const colProps = { ...colPropsBaseStyle, ...colPropsBaseClass, ...screenSizes };
|
|
96
41
|
const RESULT_SCREEN = ["xxl", "xl", "lg", "md", "sm", "xs"];
|
|
97
42
|
const screenMedias = {
|
|
98
43
|
xs: "screen and (max-width: 575px)",
|
|
@@ -106,20 +51,10 @@ const subscribers = /* @__PURE__ */ new Map();
|
|
|
106
51
|
let subUid = -1;
|
|
107
52
|
const screen = {};
|
|
108
53
|
const results = {};
|
|
109
|
-
function
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
subUid += 1;
|
|
114
|
-
subscribers.set(subUid, func);
|
|
115
|
-
func(__spreadValues({}, screen));
|
|
116
|
-
return subUid;
|
|
117
|
-
}
|
|
118
|
-
function removeSubscribeCb(id) {
|
|
119
|
-
subscribers.delete(id);
|
|
120
|
-
if (subscribers.size === 0) {
|
|
121
|
-
unRegister();
|
|
122
|
-
}
|
|
54
|
+
function dispatch() {
|
|
55
|
+
subscribers.forEach((value) => {
|
|
56
|
+
value({ ...screen });
|
|
57
|
+
});
|
|
123
58
|
}
|
|
124
59
|
function register() {
|
|
125
60
|
Object.keys(screenMedias).forEach((key) => {
|
|
@@ -139,6 +74,15 @@ function register() {
|
|
|
139
74
|
};
|
|
140
75
|
});
|
|
141
76
|
}
|
|
77
|
+
function responesScreen(func) {
|
|
78
|
+
if (!subscribers.size) {
|
|
79
|
+
register();
|
|
80
|
+
}
|
|
81
|
+
subUid += 1;
|
|
82
|
+
subscribers.set(subUid, func);
|
|
83
|
+
func({ ...screen });
|
|
84
|
+
return subUid;
|
|
85
|
+
}
|
|
142
86
|
function unRegister() {
|
|
143
87
|
Object.keys(screenMedias).forEach((key) => {
|
|
144
88
|
const handler = results[key];
|
|
@@ -146,13 +90,36 @@ function unRegister() {
|
|
|
146
90
|
});
|
|
147
91
|
subscribers.clear();
|
|
148
92
|
}
|
|
149
|
-
function
|
|
150
|
-
subscribers.
|
|
151
|
-
|
|
152
|
-
|
|
93
|
+
function removeSubscribeCb(id) {
|
|
94
|
+
subscribers.delete(id);
|
|
95
|
+
if (subscribers.size === 0) {
|
|
96
|
+
unRegister();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function createBem(namespace, element, modifier) {
|
|
100
|
+
let cls = namespace;
|
|
101
|
+
if (element) {
|
|
102
|
+
cls += `__${element}`;
|
|
103
|
+
}
|
|
104
|
+
if (modifier) {
|
|
105
|
+
cls += `--${modifier}`;
|
|
106
|
+
}
|
|
107
|
+
return cls;
|
|
108
|
+
}
|
|
109
|
+
function useNamespace(block, needDot = false) {
|
|
110
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
111
|
+
const b = () => createBem(namespace);
|
|
112
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
113
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
114
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
115
|
+
return {
|
|
116
|
+
b,
|
|
117
|
+
e,
|
|
118
|
+
m,
|
|
119
|
+
em
|
|
120
|
+
};
|
|
153
121
|
}
|
|
154
122
|
var row = "";
|
|
155
|
-
const CLASS_PREFIX = "devui-row";
|
|
156
123
|
var Row = defineComponent({
|
|
157
124
|
name: "DRow",
|
|
158
125
|
props: rowProps,
|
|
@@ -161,12 +128,12 @@ var Row = defineComponent({
|
|
|
161
128
|
slots
|
|
162
129
|
}) {
|
|
163
130
|
const gutterScreenSize = ref({});
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
});
|
|
131
|
+
const ns = useNamespace("row");
|
|
132
|
+
const rowClass = computed(() => ({
|
|
133
|
+
[ns.em("align", props.align)]: true,
|
|
134
|
+
[ns.em("justify", props.justify)]: true,
|
|
135
|
+
[ns.e("wrap")]: props.wrap
|
|
136
|
+
}));
|
|
170
137
|
let token;
|
|
171
138
|
onMounted(() => {
|
|
172
139
|
token = responesScreen((screen2) => {
|
|
@@ -214,11 +181,48 @@ var Row = defineComponent({
|
|
|
214
181
|
return () => {
|
|
215
182
|
var _a;
|
|
216
183
|
return createVNode("div", {
|
|
217
|
-
"class":
|
|
184
|
+
"class": [ns.b(), rowClass.value]
|
|
218
185
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
219
186
|
};
|
|
220
187
|
}
|
|
221
188
|
});
|
|
189
|
+
const colNs = useNamespace("col");
|
|
190
|
+
function useColClassNames(props) {
|
|
191
|
+
return computed(() => ({
|
|
192
|
+
[colNs.em("span", props.span ? String(props.span) : "")]: true,
|
|
193
|
+
[colNs.em("offset", props.offset ? String(props.offset) : "")]: true,
|
|
194
|
+
[colNs.em("pull", props.pull ? String(props.pull) : "")]: true,
|
|
195
|
+
[colNs.em("push", props.push ? String(props.push) : "")]: true
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
function setSpace(val) {
|
|
199
|
+
return ` ${val.trim()}${val && " "}`;
|
|
200
|
+
}
|
|
201
|
+
function useSize(colSizes) {
|
|
202
|
+
const keys = Object.keys(colSizes).filter((key) => key in screenSizes);
|
|
203
|
+
return computed(() => {
|
|
204
|
+
return keys.reduce((total, key) => {
|
|
205
|
+
const valueType = typeof colSizes[key];
|
|
206
|
+
if (valueType === "number") {
|
|
207
|
+
total = `${setSpace(total)}${colNs.em(key, `span-${colSizes[key]}`)}`;
|
|
208
|
+
} else if (valueType === "object") {
|
|
209
|
+
const colSizesKeys = Object.keys(colSizes[key]);
|
|
210
|
+
const sum = colSizesKeys.filter((item) => item in colPropsBaseClass).reduce((tot, k) => {
|
|
211
|
+
const baseClass = colSizes[key];
|
|
212
|
+
const _class = baseClass[k];
|
|
213
|
+
if (typeof _class !== "number") {
|
|
214
|
+
return "";
|
|
215
|
+
} else {
|
|
216
|
+
tot = `${setSpace(tot)}${colNs.em(key, `${k}-${_class}`)}`;
|
|
217
|
+
}
|
|
218
|
+
return tot;
|
|
219
|
+
}, "");
|
|
220
|
+
total = `${setSpace(total)}${sum}`;
|
|
221
|
+
}
|
|
222
|
+
return total;
|
|
223
|
+
}, "");
|
|
224
|
+
});
|
|
225
|
+
}
|
|
222
226
|
var col = "";
|
|
223
227
|
var Col = defineComponent({
|
|
224
228
|
name: "DCol",
|
|
@@ -226,6 +230,7 @@ var Col = defineComponent({
|
|
|
226
230
|
setup(props, {
|
|
227
231
|
slots
|
|
228
232
|
}) {
|
|
233
|
+
const ns = useNamespace("col");
|
|
229
234
|
const formatFlex = (flex) => {
|
|
230
235
|
if (typeof flex === "number") {
|
|
231
236
|
return `${flex} ${flex} auto`;
|
|
@@ -245,25 +250,22 @@ var Col = defineComponent({
|
|
|
245
250
|
return () => {
|
|
246
251
|
var _a;
|
|
247
252
|
return createVNode("div", {
|
|
248
|
-
"class":
|
|
249
|
-
"style":
|
|
253
|
+
"class": [ns.b(), colClassNames.value, sizeClassNames.value],
|
|
254
|
+
"style": {
|
|
255
|
+
...colStyle.value,
|
|
256
|
+
...gutterStyle == null ? void 0 : gutterStyle.value
|
|
257
|
+
}
|
|
250
258
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
251
259
|
};
|
|
252
260
|
}
|
|
253
261
|
});
|
|
254
|
-
Row.install = function(app) {
|
|
255
|
-
app.component(Row.name, Row);
|
|
256
|
-
};
|
|
257
|
-
Col.install = function(app) {
|
|
258
|
-
app.component(Col.name, Col);
|
|
259
|
-
};
|
|
260
262
|
var index = {
|
|
261
263
|
title: "Grid \u6805\u683C",
|
|
262
264
|
category: "\u5E03\u5C40",
|
|
263
265
|
status: "100%",
|
|
264
266
|
install(app) {
|
|
265
|
-
app.
|
|
266
|
-
app.
|
|
267
|
+
app.component(Row.name, Row);
|
|
268
|
+
app.component(Col.name, Col);
|
|
267
269
|
}
|
|
268
270
|
};
|
|
269
|
-
export { Col, Row, index as default };
|
|
271
|
+
export { Col, Row, colProps, colPropsBaseClass, colPropsBaseStyle, index as default, rowProps, screenSizes };
|