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/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,136 +1,152 @@
|
|
|
1
|
-
import { defineComponent, ref,
|
|
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.value) {
|
|
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
|
-
});
|
|
147
|
+
const slotElement = ref();
|
|
148
|
+
useFullscreen(props, slotElement, ctx);
|
|
149
|
+
useKeydown(props, ctx);
|
|
134
150
|
return () => {
|
|
135
151
|
const defaultSlot = renderSlot(useSlots(), "default");
|
|
136
152
|
return createVNode("div", {
|
|
@@ -139,15 +155,12 @@ var Fullscreen = defineComponent({
|
|
|
139
155
|
};
|
|
140
156
|
}
|
|
141
157
|
});
|
|
142
|
-
Fullscreen.install = function(app) {
|
|
143
|
-
app.component(Fullscreen.name, Fullscreen);
|
|
144
|
-
};
|
|
145
158
|
var index = {
|
|
146
159
|
title: "Fullscreen \u5168\u5C4F",
|
|
147
160
|
category: "\u901A\u7528",
|
|
148
|
-
status: "
|
|
161
|
+
status: "100%",
|
|
149
162
|
install(app) {
|
|
150
|
-
app.
|
|
163
|
+
app.component(Fullscreen.name, Fullscreen);
|
|
151
164
|
}
|
|
152
165
|
};
|
|
153
|
-
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.d.ts
ADDED
package/grid/index.es.js
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, onUnmounted, provide, createVNode, inject } from "vue";
|
|
2
|
+
const rowProps = {
|
|
3
|
+
align: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: "top"
|
|
6
|
+
},
|
|
7
|
+
gutter: {
|
|
8
|
+
type: [Number, Object, Array],
|
|
9
|
+
default: 0
|
|
10
|
+
},
|
|
11
|
+
justify: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "start"
|
|
14
|
+
},
|
|
15
|
+
wrap: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const numberProp = Number;
|
|
21
|
+
const colPropsBaseStyle = {
|
|
22
|
+
flex: [String, Number],
|
|
23
|
+
order: numberProp
|
|
24
|
+
};
|
|
25
|
+
const colPropsBaseClass = {
|
|
26
|
+
offset: numberProp,
|
|
27
|
+
pull: numberProp,
|
|
28
|
+
push: numberProp,
|
|
29
|
+
span: numberProp
|
|
30
|
+
};
|
|
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 };
|
|
41
|
+
const RESULT_SCREEN = ["xxl", "xl", "lg", "md", "sm", "xs"];
|
|
42
|
+
const screenMedias = {
|
|
43
|
+
xs: "screen and (max-width: 575px)",
|
|
44
|
+
sm: "screen and (min-width: 576px)",
|
|
45
|
+
md: "screen and (min-width: 768px)",
|
|
46
|
+
lg: "screen and (min-width: 992px)",
|
|
47
|
+
xl: "screen and (min-width: 1200px)",
|
|
48
|
+
xxl: "screen and (min-width: 1600px)"
|
|
49
|
+
};
|
|
50
|
+
const subscribers = /* @__PURE__ */ new Map();
|
|
51
|
+
let subUid = -1;
|
|
52
|
+
const screen = {};
|
|
53
|
+
const results = {};
|
|
54
|
+
function dispatch() {
|
|
55
|
+
subscribers.forEach((value) => {
|
|
56
|
+
value({ ...screen });
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function register() {
|
|
60
|
+
Object.keys(screenMedias).forEach((key) => {
|
|
61
|
+
const result = window.matchMedia(screenMedias[key]);
|
|
62
|
+
if (result.matches) {
|
|
63
|
+
screen[key] = true;
|
|
64
|
+
dispatch();
|
|
65
|
+
}
|
|
66
|
+
const listener = (e) => {
|
|
67
|
+
screen[key] = e.matches;
|
|
68
|
+
dispatch();
|
|
69
|
+
};
|
|
70
|
+
result.addEventListener("change", listener);
|
|
71
|
+
results[key] = {
|
|
72
|
+
res: result,
|
|
73
|
+
listener
|
|
74
|
+
};
|
|
75
|
+
});
|
|
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
|
+
}
|
|
86
|
+
function unRegister() {
|
|
87
|
+
Object.keys(screenMedias).forEach((key) => {
|
|
88
|
+
const handler = results[key];
|
|
89
|
+
handler.res.removeEventListener("change", handler.listener);
|
|
90
|
+
});
|
|
91
|
+
subscribers.clear();
|
|
92
|
+
}
|
|
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
|
+
};
|
|
121
|
+
}
|
|
122
|
+
var row = "";
|
|
123
|
+
var Row = defineComponent({
|
|
124
|
+
name: "DRow",
|
|
125
|
+
props: rowProps,
|
|
126
|
+
emits: [],
|
|
127
|
+
setup(props, {
|
|
128
|
+
slots
|
|
129
|
+
}) {
|
|
130
|
+
const gutterScreenSize = ref({});
|
|
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
|
+
}));
|
|
137
|
+
let token;
|
|
138
|
+
onMounted(() => {
|
|
139
|
+
token = responesScreen((screen2) => {
|
|
140
|
+
gutterScreenSize.value = screen2;
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
onUnmounted(() => {
|
|
144
|
+
removeSubscribeCb(token);
|
|
145
|
+
});
|
|
146
|
+
const gutterStyle = computed(() => {
|
|
147
|
+
if (!props.gutter) {
|
|
148
|
+
return {};
|
|
149
|
+
}
|
|
150
|
+
let currentGutter = [0, 0];
|
|
151
|
+
if (Array.isArray(props.gutter)) {
|
|
152
|
+
currentGutter = props.gutter;
|
|
153
|
+
} else if (typeof props.gutter === "number") {
|
|
154
|
+
currentGutter = [props.gutter, 0];
|
|
155
|
+
} else {
|
|
156
|
+
RESULT_SCREEN.some((size) => {
|
|
157
|
+
const gzs = props.gutter[size];
|
|
158
|
+
if (gutterScreenSize.value[size] && gzs) {
|
|
159
|
+
if (typeof gzs === "number") {
|
|
160
|
+
currentGutter = [gzs, 0];
|
|
161
|
+
} else {
|
|
162
|
+
currentGutter = gzs;
|
|
163
|
+
}
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
const paddingLeft = `${(currentGutter[0] || 0) / 2}px`;
|
|
170
|
+
const paddingRight = `${(currentGutter[0] || 0) / 2}px`;
|
|
171
|
+
const paddingTop = `${(currentGutter[1] || 0) / 2}px`;
|
|
172
|
+
const paddingBottom = `${(currentGutter[1] || 0) / 2}px`;
|
|
173
|
+
return {
|
|
174
|
+
paddingLeft,
|
|
175
|
+
paddingRight,
|
|
176
|
+
paddingTop,
|
|
177
|
+
paddingBottom
|
|
178
|
+
};
|
|
179
|
+
});
|
|
180
|
+
provide("gutterStyle", gutterStyle);
|
|
181
|
+
return () => {
|
|
182
|
+
var _a;
|
|
183
|
+
return createVNode("div", {
|
|
184
|
+
"class": [ns.b(), rowClass.value]
|
|
185
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
186
|
+
};
|
|
187
|
+
}
|
|
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
|
+
}
|
|
226
|
+
var col = "";
|
|
227
|
+
var Col = defineComponent({
|
|
228
|
+
name: "DCol",
|
|
229
|
+
props: colProps,
|
|
230
|
+
setup(props, {
|
|
231
|
+
slots
|
|
232
|
+
}) {
|
|
233
|
+
const ns = useNamespace("col");
|
|
234
|
+
const formatFlex = (flex) => {
|
|
235
|
+
if (typeof flex === "number") {
|
|
236
|
+
return `${flex} ${flex} auto`;
|
|
237
|
+
}
|
|
238
|
+
if (/^\d+(\.\d+)?(px|rem|em|%)$/.test(flex)) {
|
|
239
|
+
return `0 0 ${flex}`;
|
|
240
|
+
}
|
|
241
|
+
return flex;
|
|
242
|
+
};
|
|
243
|
+
const colClassNames = useColClassNames(props);
|
|
244
|
+
const sizeClassNames = useSize(props);
|
|
245
|
+
const colStyle = computed(() => ({
|
|
246
|
+
flex: formatFlex(props.flex),
|
|
247
|
+
order: props.order
|
|
248
|
+
}));
|
|
249
|
+
const gutterStyle = inject("gutterStyle");
|
|
250
|
+
return () => {
|
|
251
|
+
var _a;
|
|
252
|
+
return createVNode("div", {
|
|
253
|
+
"class": [ns.b(), colClassNames.value, sizeClassNames.value],
|
|
254
|
+
"style": {
|
|
255
|
+
...colStyle.value,
|
|
256
|
+
...gutterStyle == null ? void 0 : gutterStyle.value
|
|
257
|
+
}
|
|
258
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
var index = {
|
|
263
|
+
title: "Grid \u6805\u683C",
|
|
264
|
+
category: "\u5E03\u5C40",
|
|
265
|
+
status: "100%",
|
|
266
|
+
install(app) {
|
|
267
|
+
app.component(Row.name, Row);
|
|
268
|
+
app.component(Col.name, Col);
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
export { Col, Row, colProps, colPropsBaseClass, colPropsBaseStyle, index as default, rowProps, screenSizes };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(o,c){typeof exports=="object"&&typeof module!="undefined"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(o=typeof globalThis!="undefined"?globalThis:o||self,c(o.index={},o.Vue))})(this,function(o,c){"use strict";const P={align:{type:String,default:"top"},gutter:{type:[Number,Object,Array],default:0},justify:{type:String,default:"start"},wrap:{type:Boolean,default:!1}},p=Number,E={flex:[String,Number],order:p},S={offset:p,pull:p,push:p,span:p},a=[Number,Object],$={xs:a,sm:a,md:a,lg:a,xl:a,xxl:a},B={...E,...S,...$},T=["xxl","xl","lg","md","sm","xs"],w={xs:"screen and (max-width: 575px)",sm:"screen and (min-width: 576px)",md:"screen and (min-width: 768px)",lg:"screen and (min-width: 992px)",xl:"screen and (min-width: 1200px)",xxl:"screen and (min-width: 1600px)"},l=new Map;let x=-1;const g={},O={};function R(){l.forEach(e=>{e({...g})})}function _(){Object.keys(w).forEach(e=>{const s=window.matchMedia(w[e]);s.matches&&(g[e]=!0,R());const n=r=>{g[e]=r.matches,R()};s.addEventListener("change",n),O[e]={res:s,listener:n}})}function L(e){return l.size||_(),x+=1,l.set(x,e),e({...g}),x}function A(){Object.keys(w).forEach(e=>{const s=O[e];s.res.removeEventListener("change",s.listener)}),l.clear()}function U(e){l.delete(e),l.size===0&&A()}function b(e,s,n){let r=e;return s&&(r+=`__${s}`),n&&(r+=`--${n}`),r}function C(e,s=!1){const n=s?`.devui-${e}`:`devui-${e}`;return{b:()=>b(n),e:t=>t?b(n,t):"",m:t=>t?b(n,"",t):"",em:(t,u)=>t&&u?b(n,t,u):""}}var q="",j=c.defineComponent({name:"DRow",props:P,emits:[],setup(e,{slots:s}){const n=c.ref({}),r=C("row"),i=c.computed(()=>({[r.em("align",e.align)]:!0,[r.em("justify",e.justify)]:!0,[r.e("wrap")]:e.wrap}));let f;c.onMounted(()=>{f=L(t=>{n.value=t})}),c.onUnmounted(()=>{U(f)});const m=c.computed(()=>{if(!e.gutter)return{};let t=[0,0];Array.isArray(e.gutter)?t=e.gutter:typeof e.gutter=="number"?t=[e.gutter,0]:T.some(M=>{const h=e.gutter[M];return n.value[M]&&h?(typeof h=="number"?t=[h,0]:t=h,!0):!1});const u=`${(t[0]||0)/2}px`,z=`${(t[0]||0)/2}px`,y=`${(t[1]||0)/2}px`,K=`${(t[1]||0)/2}px`;return{paddingLeft:u,paddingRight:z,paddingTop:y,paddingBottom:K}});return c.provide("gutterStyle",m),()=>{var t;return c.createVNode("div",{class:[r.b(),i.value]},[(t=s.default)==null?void 0:t.call(s)])}}});const d=C("col");function V(e){return c.computed(()=>({[d.em("span",e.span?String(e.span):"")]:!0,[d.em("offset",e.offset?String(e.offset):"")]:!0,[d.em("pull",e.pull?String(e.pull):"")]:!0,[d.em("push",e.push?String(e.push):"")]:!0}))}function v(e){return` ${e.trim()}${e&&" "}`}function D(e){const s=Object.keys(e).filter(n=>n in $);return c.computed(()=>s.reduce((n,r)=>{const i=typeof e[r];if(i==="number")n=`${v(n)}${d.em(r,`span-${e[r]}`)}`;else if(i==="object"){const m=Object.keys(e[r]).filter(t=>t in S).reduce((t,u)=>{const y=e[r][u];return typeof y!="number"?"":(t=`${v(t)}${d.em(r,`${u}-${y}`)}`,t)},"");n=`${v(n)}${m}`}return n},""))}var F="",N=c.defineComponent({name:"DCol",props:B,setup(e,{slots:s}){const n=C("col"),r=u=>typeof u=="number"?`${u} ${u} auto`:/^\d+(\.\d+)?(px|rem|em|%)$/.test(u)?`0 0 ${u}`:u,i=V(e),f=D(e),m=c.computed(()=>({flex:r(e.flex),order:e.order})),t=c.inject("gutterStyle");return()=>{var u;return c.createVNode("div",{class:[n.b(),i.value,f.value],style:{...m.value,...t==null?void 0:t.value}},[(u=s.default)==null?void 0:u.call(s)])}}}),G={title:"Grid \u6805\u683C",category:"\u5E03\u5C40",status:"100%",install(e){e.component(j.name,j),e.component(N.name,N)}};o.Col=N,o.Row=j,o.colProps=B,o.colPropsBaseClass=S,o.colPropsBaseStyle=E,o.default=G,o.rowProps=P,o.screenSizes=$,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|