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/layout/index.es.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from "vue";
|
|
2
|
+
function createBem(namespace, element, modifier) {
|
|
3
|
+
let cls = namespace;
|
|
4
|
+
if (element) {
|
|
5
|
+
cls += `__${element}`;
|
|
6
|
+
}
|
|
7
|
+
if (modifier) {
|
|
8
|
+
cls += `--${modifier}`;
|
|
9
|
+
}
|
|
10
|
+
return cls;
|
|
11
|
+
}
|
|
12
|
+
function useNamespace(block, needDot = false) {
|
|
13
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
14
|
+
const b = () => createBem(namespace);
|
|
15
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
16
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
17
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
18
|
+
return {
|
|
19
|
+
b,
|
|
20
|
+
e,
|
|
21
|
+
m,
|
|
22
|
+
em
|
|
23
|
+
};
|
|
24
|
+
}
|
|
2
25
|
var layout = "";
|
|
3
26
|
var Layout = defineComponent({
|
|
4
27
|
name: "DLayout",
|
|
@@ -6,11 +29,12 @@ var Layout = defineComponent({
|
|
|
6
29
|
setup(props, {
|
|
7
30
|
slots
|
|
8
31
|
}) {
|
|
32
|
+
const ns = useNamespace("layout");
|
|
9
33
|
return () => {
|
|
10
34
|
var _a;
|
|
11
35
|
const slotDefault = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
12
36
|
const isAside = slotDefault.some((item) => item.type.name === "DAside");
|
|
13
|
-
const classNames = `${isAside ? "
|
|
37
|
+
const classNames = `${isAside ? ns.e("aside") : ""} ${ns.b()}`;
|
|
14
38
|
return createVNode("div", {
|
|
15
39
|
"class": classNames
|
|
16
40
|
}, [slotDefault]);
|
|
@@ -23,10 +47,11 @@ var Content = defineComponent({
|
|
|
23
47
|
setup(props, {
|
|
24
48
|
slots
|
|
25
49
|
}) {
|
|
50
|
+
const ns = useNamespace("layout");
|
|
26
51
|
return () => {
|
|
27
52
|
var _a;
|
|
28
53
|
return createVNode("div", {
|
|
29
|
-
"class": "
|
|
54
|
+
"class": ns.e("content")
|
|
30
55
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
31
56
|
};
|
|
32
57
|
}
|
|
@@ -37,10 +62,11 @@ var Header = defineComponent({
|
|
|
37
62
|
setup(props, {
|
|
38
63
|
slots
|
|
39
64
|
}) {
|
|
65
|
+
const ns = useNamespace("layout");
|
|
40
66
|
return () => {
|
|
41
67
|
var _a;
|
|
42
68
|
return createVNode("div", {
|
|
43
|
-
"class": "
|
|
69
|
+
"class": ns.e("header")
|
|
44
70
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
45
71
|
};
|
|
46
72
|
}
|
|
@@ -51,10 +77,11 @@ var Footer = defineComponent({
|
|
|
51
77
|
setup(props, {
|
|
52
78
|
slots
|
|
53
79
|
}) {
|
|
80
|
+
const ns = useNamespace("layout");
|
|
54
81
|
return () => {
|
|
55
82
|
var _a;
|
|
56
83
|
return createVNode("div", {
|
|
57
|
-
"class": "
|
|
84
|
+
"class": ns.e("footer")
|
|
58
85
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
59
86
|
};
|
|
60
87
|
}
|
|
@@ -64,37 +91,25 @@ var Aside = defineComponent({
|
|
|
64
91
|
setup(props, {
|
|
65
92
|
slots
|
|
66
93
|
}) {
|
|
94
|
+
const ns = useNamespace("layout");
|
|
67
95
|
return () => {
|
|
68
96
|
var _a;
|
|
69
|
-
return createVNode("div",
|
|
97
|
+
return createVNode("div", {
|
|
98
|
+
"class": ns.em("aside", "inner")
|
|
99
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
70
100
|
};
|
|
71
101
|
}
|
|
72
102
|
});
|
|
73
|
-
Layout.install = function(app) {
|
|
74
|
-
app.component(Layout.name, Layout);
|
|
75
|
-
};
|
|
76
|
-
Content.install = function(app) {
|
|
77
|
-
app.component(Content.name, Content);
|
|
78
|
-
};
|
|
79
|
-
Header.install = function(app) {
|
|
80
|
-
app.component(Header.name, Header);
|
|
81
|
-
};
|
|
82
|
-
Footer.install = function(app) {
|
|
83
|
-
app.component(Footer.name, Footer);
|
|
84
|
-
};
|
|
85
|
-
Aside.install = function(app) {
|
|
86
|
-
app.component(Aside.name, Aside);
|
|
87
|
-
};
|
|
88
103
|
var index = {
|
|
89
104
|
title: "Layout \u5E03\u5C40",
|
|
90
105
|
category: "\u5E03\u5C40",
|
|
91
|
-
status: "
|
|
106
|
+
status: "100%",
|
|
92
107
|
install(app) {
|
|
93
|
-
app.
|
|
94
|
-
app.
|
|
95
|
-
app.
|
|
96
|
-
app.
|
|
97
|
-
app.
|
|
108
|
+
app.component(Layout.name, Layout);
|
|
109
|
+
app.component(Content.name, Content);
|
|
110
|
+
app.component(Header.name, Header);
|
|
111
|
+
app.component(Footer.name, Footer);
|
|
112
|
+
app.component(Aside.name, Aside);
|
|
98
113
|
}
|
|
99
114
|
};
|
|
100
115
|
export { Aside, Content, Footer, Header, Layout, index as default };
|
package/layout/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(r,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(r=typeof globalThis!="undefined"?globalThis:r||self,o(r.index={},r.Vue))})(this,function(r,o){"use strict";function i(a,e,t){let n=a;return e&&(n+=`__${e}`),t&&(n+=`--${t}`),n}function u(a,e=!1){const t=e?`.devui-${a}`:`devui-${a}`;return{b:()=>i(t),e:d=>d?i(t,d):"",m:d=>d?i(t,"",d):"",em:(d,C)=>d&&C?i(t,d,C):""}}var N="",c=o.defineComponent({name:"DLayout",emits:[],setup(a,{slots:e}){const t=u("layout");return()=>{var y;const n=(y=e.default)==null?void 0:y.call(e),v=`${n.some(d=>d.type.name==="DAside")?t.e("aside"):""} ${t.b()}`;return o.createVNode("div",{class:v},[n])}}}),A="",m=o.defineComponent({name:"DContent",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("content")},[(n=e.default)==null?void 0:n.call(e)])}}}),V="",f=o.defineComponent({name:"DHeader",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("header")},[(n=e.default)==null?void 0:n.call(e)])}}}),$="",s=o.defineComponent({name:"DFooter",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("footer")},[(n=e.default)==null?void 0:n.call(e)])}}}),p=o.defineComponent({name:"DAside",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.em("aside","inner")},[(n=e.default)==null?void 0:n.call(e)])}}}),l={title:"Layout \u5E03\u5C40",category:"\u5E03\u5C40",status:"100%",install(a){a.component(c.name,c),a.component(m.name,m),a.component(f.name,f),a.component(s.name,s),a.component(p.name,p)}};r.Aside=p,r.Content=m,r.Footer=s,r.Header=f,r.Layout=c,r.default=l,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/layout/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-layout{display:flex;flex-direction:column;flex:auto}.devui-
|
|
1
|
+
.devui-layout{display:flex;flex-direction:column;flex:auto}.devui-layout__aside{flex-direction:row}.devui-layout__content{flex:auto;min-height:0}.devui-layout__header{min-height:40px;flex:auto}.devui-layout__footer{text-align:center;line-height:1.5}
|
package/loading/index.es.js
CHANGED
|
@@ -1,34 +1,11 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __publicField = (obj, key, value) => {
|
|
21
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
-
return value;
|
|
23
|
-
};
|
|
24
1
|
import { defineComponent, ref, createVNode, h, render } from "vue";
|
|
25
2
|
class View {
|
|
26
3
|
constructor() {
|
|
27
|
-
|
|
28
|
-
|
|
4
|
+
this.top = "50%";
|
|
5
|
+
this.left = "50%";
|
|
29
6
|
}
|
|
30
7
|
}
|
|
31
|
-
const
|
|
8
|
+
const loadingProps = {
|
|
32
9
|
message: String,
|
|
33
10
|
backdrop: Boolean,
|
|
34
11
|
view: {
|
|
@@ -41,22 +18,41 @@ const componentProps = {
|
|
|
41
18
|
default: false
|
|
42
19
|
}
|
|
43
20
|
};
|
|
44
|
-
class
|
|
21
|
+
class LoadingOptions {
|
|
45
22
|
constructor() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
__publicField(this, "backdrop", true);
|
|
50
|
-
__publicField(this, "positionType", "relative");
|
|
51
|
-
__publicField(this, "view", new View());
|
|
52
|
-
__publicField(this, "zIndex");
|
|
23
|
+
this.backdrop = true;
|
|
24
|
+
this.positionType = "relative";
|
|
25
|
+
this.view = new View();
|
|
53
26
|
}
|
|
54
27
|
}
|
|
28
|
+
function createBem(namespace, element, modifier) {
|
|
29
|
+
let cls = namespace;
|
|
30
|
+
if (element) {
|
|
31
|
+
cls += `__${element}`;
|
|
32
|
+
}
|
|
33
|
+
if (modifier) {
|
|
34
|
+
cls += `--${modifier}`;
|
|
35
|
+
}
|
|
36
|
+
return cls;
|
|
37
|
+
}
|
|
38
|
+
function useNamespace(block, needDot = false) {
|
|
39
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
40
|
+
const b = () => createBem(namespace);
|
|
41
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
42
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
43
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
44
|
+
return {
|
|
45
|
+
b,
|
|
46
|
+
e,
|
|
47
|
+
m,
|
|
48
|
+
em
|
|
49
|
+
};
|
|
50
|
+
}
|
|
55
51
|
var loading$1 = "";
|
|
56
52
|
var Loading = defineComponent({
|
|
57
53
|
name: "DLoading",
|
|
58
54
|
inheritAttrs: false,
|
|
59
|
-
props:
|
|
55
|
+
props: loadingProps,
|
|
60
56
|
setup(props) {
|
|
61
57
|
const style = {
|
|
62
58
|
top: props.view.top,
|
|
@@ -90,33 +86,34 @@ var Loading = defineComponent({
|
|
|
90
86
|
message,
|
|
91
87
|
$slots
|
|
92
88
|
} = this;
|
|
89
|
+
const ns = useNamespace("loading");
|
|
93
90
|
return isShow && createVNode("div", {
|
|
94
|
-
"class": [
|
|
91
|
+
"class": [ns.b(), isFull ? ns.m("full") : ""]
|
|
95
92
|
}, [((_a = $slots.default) == null ? void 0 : _a.call($slots)) || createVNode("div", {
|
|
96
|
-
"class": "
|
|
93
|
+
"class": ns.e("wrapper")
|
|
97
94
|
}, [backdrop ? createVNode("div", {
|
|
98
|
-
"class": "
|
|
95
|
+
"class": ns.e("mask")
|
|
99
96
|
}, null) : null, createVNode("div", {
|
|
100
97
|
"style": style,
|
|
101
|
-
"class": "
|
|
98
|
+
"class": ns.e("area")
|
|
102
99
|
}, [createVNode("div", {
|
|
103
|
-
"class": "
|
|
100
|
+
"class": ns.e("busy-default-spinner")
|
|
104
101
|
}, [createVNode("div", {
|
|
105
|
-
"class": "
|
|
102
|
+
"class": ns.e("bar1")
|
|
106
103
|
}, null), createVNode("div", {
|
|
107
|
-
"class": "
|
|
104
|
+
"class": ns.e("bar2")
|
|
108
105
|
}, null), createVNode("div", {
|
|
109
|
-
"class": "
|
|
106
|
+
"class": ns.e("bar3")
|
|
110
107
|
}, null), createVNode("div", {
|
|
111
|
-
"class": "
|
|
108
|
+
"class": ns.e("bar4")
|
|
112
109
|
}, null)]), message ? createVNode("span", {
|
|
113
|
-
"class": "
|
|
110
|
+
"class": ns.e("text")
|
|
114
111
|
}, [message]) : null])])]);
|
|
115
112
|
}
|
|
116
113
|
});
|
|
117
114
|
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
118
|
-
function createComponent(
|
|
119
|
-
const vnode = h(
|
|
115
|
+
function createComponent(component, props, children = null) {
|
|
116
|
+
const vnode = h(component, { ...props }, children);
|
|
120
117
|
const container = document.createElement("div");
|
|
121
118
|
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
122
119
|
render(vnode, container);
|
|
@@ -126,16 +123,20 @@ function unmountComponent(ComponnetInstance) {
|
|
|
126
123
|
render(null, ComponnetInstance == null ? void 0 : ComponnetInstance.vnode[COMPONENT_CONTAINER_SYMBOL]);
|
|
127
124
|
}
|
|
128
125
|
const loadingConstructor$1 = defineComponent(Loading);
|
|
129
|
-
const cacheInstance = new WeakSet();
|
|
126
|
+
const cacheInstance = /* @__PURE__ */ new WeakSet();
|
|
130
127
|
const isEmpty = (val) => {
|
|
131
|
-
if (!val)
|
|
128
|
+
if (!val) {
|
|
132
129
|
return true;
|
|
133
|
-
|
|
130
|
+
}
|
|
131
|
+
if (Array.isArray(val)) {
|
|
134
132
|
return val.length === 0;
|
|
135
|
-
|
|
133
|
+
}
|
|
134
|
+
if (val instanceof Set || val instanceof Map) {
|
|
136
135
|
return val.size === 0;
|
|
137
|
-
|
|
136
|
+
}
|
|
137
|
+
if (val instanceof Promise) {
|
|
138
138
|
return false;
|
|
139
|
+
}
|
|
139
140
|
if (typeof val === "object") {
|
|
140
141
|
try {
|
|
141
142
|
return Object.keys(val).length === 0;
|
|
@@ -169,11 +170,13 @@ const unmount = (el) => {
|
|
|
169
170
|
unmountComponent(el.instance);
|
|
170
171
|
};
|
|
171
172
|
const toggleLoading = (el, binding) => {
|
|
173
|
+
var _a, _b, _c;
|
|
172
174
|
if (binding.value) {
|
|
173
175
|
const vals = isPromise(binding.value);
|
|
174
|
-
if (vals === "error")
|
|
176
|
+
if (vals === "error") {
|
|
175
177
|
return;
|
|
176
|
-
|
|
178
|
+
}
|
|
179
|
+
(_c = (_b = (_a = el == null ? void 0 : el.instance) == null ? void 0 : _a.proxy) == null ? void 0 : _b.open) == null ? void 0 : _c.call(_b);
|
|
177
180
|
el.appendChild(el.mask);
|
|
178
181
|
cacheInstance.add(el);
|
|
179
182
|
if (vals) {
|
|
@@ -196,13 +199,17 @@ const removeAttribute = (el) => {
|
|
|
196
199
|
el.removeAttribute("loadingtemplateref");
|
|
197
200
|
};
|
|
198
201
|
const handleProps = (el, vprops) => {
|
|
199
|
-
|
|
202
|
+
var _a;
|
|
203
|
+
const props = {
|
|
204
|
+
...new LoadingOptions(),
|
|
205
|
+
...vprops
|
|
206
|
+
};
|
|
200
207
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
201
|
-
const loadingInstance = createComponent(loadingConstructor$1,
|
|
208
|
+
const loadingInstance = createComponent(loadingConstructor$1, { ...props }, loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
202
209
|
el.style.position = props.positionType;
|
|
203
210
|
el.options = props;
|
|
204
211
|
el.instance = loadingInstance;
|
|
205
|
-
el.mask = loadingInstance.proxy.$el;
|
|
212
|
+
el.mask = (_a = loadingInstance == null ? void 0 : loadingInstance.proxy) == null ? void 0 : _a.$el;
|
|
206
213
|
};
|
|
207
214
|
const loadingDirective = {
|
|
208
215
|
mounted: function(el, binding, vnode) {
|
|
@@ -211,46 +218,55 @@ const loadingDirective = {
|
|
|
211
218
|
!isEmpty(binding.value) && toggleLoading(el, binding);
|
|
212
219
|
},
|
|
213
220
|
updated: function(el, binding, vnode) {
|
|
214
|
-
if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el))
|
|
221
|
+
if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el)) {
|
|
215
222
|
return;
|
|
223
|
+
}
|
|
216
224
|
!cacheInstance.has(el) && handleProps(el, vnode.props);
|
|
217
225
|
removeAttribute(el);
|
|
218
226
|
toggleLoading(el, binding);
|
|
219
227
|
}
|
|
220
228
|
};
|
|
221
229
|
const loadingConstructor = defineComponent(Loading);
|
|
222
|
-
const cacheTarget = new WeakMap();
|
|
230
|
+
const cacheTarget = /* @__PURE__ */ new WeakMap();
|
|
223
231
|
const loading = {
|
|
224
232
|
open(options = {}) {
|
|
233
|
+
var _a, _b, _c;
|
|
225
234
|
const parent = options.target || document.body;
|
|
226
235
|
if (cacheTarget.has(parent)) {
|
|
227
236
|
return cacheTarget.get(parent);
|
|
228
237
|
}
|
|
229
|
-
parent.style
|
|
238
|
+
if (parent.style) {
|
|
239
|
+
parent.style.position = options.positionType;
|
|
240
|
+
}
|
|
230
241
|
const isFull = document.body === parent;
|
|
231
|
-
options =
|
|
232
|
-
const instance = createComponent(loadingConstructor,
|
|
242
|
+
options = { ...new LoadingOptions(), ...options };
|
|
243
|
+
const instance = createComponent(loadingConstructor, {
|
|
244
|
+
...options,
|
|
233
245
|
isFull
|
|
234
|
-
}
|
|
246
|
+
}, options.loadingTemplateRef ? () => options.loadingTemplateRef : null);
|
|
235
247
|
cacheTarget.set(parent, instance);
|
|
236
|
-
instance.proxy.open();
|
|
237
|
-
parent.appendChild(instance.proxy.$el);
|
|
238
|
-
const close = instance.proxy.close;
|
|
239
|
-
instance
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
248
|
+
(_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.open();
|
|
249
|
+
parent.appendChild((_b = instance == null ? void 0 : instance.proxy) == null ? void 0 : _b.$el);
|
|
250
|
+
const close = (_c = instance == null ? void 0 : instance.proxy) == null ? void 0 : _c.close;
|
|
251
|
+
if (instance) {
|
|
252
|
+
instance.loadingInstance = instance == null ? void 0 : instance.proxy;
|
|
253
|
+
if (instance.loadingInstance) {
|
|
254
|
+
instance.loadingInstance.close = (...args) => {
|
|
255
|
+
cacheTarget.delete(parent);
|
|
256
|
+
close == null ? void 0 : close(...args);
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
}
|
|
244
260
|
return instance;
|
|
245
261
|
}
|
|
246
262
|
};
|
|
247
263
|
var index = {
|
|
248
264
|
title: "Loading \u52A0\u8F7D\u63D0\u793A",
|
|
249
265
|
category: "\u53CD\u9988",
|
|
250
|
-
status: "
|
|
266
|
+
status: "100%",
|
|
251
267
|
install(app) {
|
|
252
268
|
app.directive("dLoading", loadingDirective);
|
|
253
269
|
app.config.globalProperties.$loadingService = loading;
|
|
254
270
|
}
|
|
255
271
|
};
|
|
256
|
-
export { loadingDirective as Loading, loading as LoadingService, index as default };
|
|
272
|
+
export { loadingDirective as Loading, LoadingOptions, loading as LoadingService, index as default, loadingProps };
|
package/loading/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(d,r){typeof exports=="object"&&typeof module!="undefined"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(d=typeof globalThis!="undefined"?globalThis:d||self,r(d.index={},d.Vue))})(this,function(d,r){"use strict";class y{constructor(){this.top="50%",this.left="50%"}}const h={message:String,backdrop:Boolean,view:{type:Object,default:()=>new y},zIndex:Number,isFull:{type:Boolean,default:!1}};class m{constructor(){this.backdrop=!0,this.positionType="relative",this.view=new y}}function u(e,o,n){let t=e;return o&&(t+=`__${o}`),n&&(t+=`--${n}`),t}function P(e,o=!1){const n=o?`.devui-${e}`:`devui-${e}`;return{b:()=>u(n),e:c=>c?u(n,c):"",m:c=>c?u(n,"",c):"",em:(c,f)=>c&&f?u(n,c,f):""}}var j="",b=r.defineComponent({name:"DLoading",inheritAttrs:!1,props:h,setup(e){const o={top:e.view.top,left:e.view.left,zIndex:e.zIndex};e.message||(o.background="none");const n=r.ref(!1);return{style:o,isShow:n,open:()=>{n.value=!0},close:()=>{n.value=!1}}},render(){var c;const{isShow:e,isFull:o,backdrop:n,style:t,message:s,$slots:a}=this,i=P("loading");return e&&r.createVNode("div",{class:[i.b(),o?i.m("full"):""]},[((c=a.default)==null?void 0:c.call(a))||r.createVNode("div",{class:i.e("wrapper")},[n?r.createVNode("div",{class:i.e("mask")},null):null,r.createVNode("div",{style:t,class:i.e("area")},[r.createVNode("div",{class:i.e("busy-default-spinner")},[r.createVNode("div",{class:i.e("bar1")},null),r.createVNode("div",{class:i.e("bar2")},null),r.createVNode("div",{class:i.e("bar3")},null),r.createVNode("div",{class:i.e("bar4")},null)]),s?r.createVNode("span",{class:i.e("text")},[s]):null])])])}});const v=Symbol("dev_component_container");function w(e,o,n=null){const t=r.h(e,{...o},n),s=document.createElement("div");return t[v]=s,r.render(t,s),t.component}function k(e){r.render(null,e==null?void 0:e.vnode[v])}const O=r.defineComponent(b),l=new WeakSet,g=e=>{if(!e)return!0;if(Array.isArray(e))return e.length===0;if(e instanceof Set||e instanceof Map)return e.size===0;if(e instanceof Promise)return!1;if(typeof e=="object")try{return Object.keys(e).length===0}catch{return!1}return!1},N=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),C=e=>{switch(N(e)){case"promise":return[e];case"array":return e.some(n=>N(n)!=="promise")?(console.error(new TypeError("Binding values should all be of type Promise")),"error"):e;default:return!1}},T=e=>{l.delete(e),e.instance.proxy.close(),k(e.instance)},A=(e,o)=>{var n,t,s;if(o.value){const a=C(o.value);if(a==="error")return;(s=(t=(n=e==null?void 0:e.instance)==null?void 0:n.proxy)==null?void 0:t.open)==null||s.call(t),e.appendChild(e.mask),l.add(e),a&&Promise.all(a).catch(i=>{console.error(new Error("Promise handling errors"),i)}).finally(()=>{T(e)})}else T(e)},x=e=>{e.removeAttribute("zindex"),e.removeAttribute("positiontype"),e.removeAttribute("backdrop"),e.removeAttribute("message"),e.removeAttribute("view"),e.removeAttribute("loadingtemplateref")},S=(e,o)=>{var a;const n={...new m,...o},t=n.loadingTemplateRef,s=w(O,{...n},t?()=>t:null);e.style.position=n.positionType,e.options=n,e.instance=s,e.mask=(a=s==null?void 0:s.proxy)==null?void 0:a.$el},V={mounted:function(e,o,n){S(e,n.props),x(e),!g(o.value)&&A(e,o)},updated:function(e,o,n){!g(o.value)&&l.has(e)||g(o.value)&&!l.has(e)||(!l.has(e)&&S(e,n.props),x(e),A(e,o))}},_=r.defineComponent(b),p=new WeakMap,L={open(e={}){var a,i,c;const o=e.target||document.body;if(p.has(o))return p.get(o);o.style&&(o.style.position=e.positionType);const n=document.body===o;e={...new m,...e};const t=w(_,{...e,isFull:n},e.loadingTemplateRef?()=>e.loadingTemplateRef:null);p.set(o,t),(a=t==null?void 0:t.proxy)==null||a.open(),o.appendChild((i=t==null?void 0:t.proxy)==null?void 0:i.$el);const s=(c=t==null?void 0:t.proxy)==null?void 0:c.close;return t&&(t.loadingInstance=t==null?void 0:t.proxy,t.loadingInstance&&(t.loadingInstance.close=(...f)=>{p.delete(o),s==null||s(...f)})),t}};var $={title:"Loading \u52A0\u8F7D\u63D0\u793A",category:"\u53CD\u9988",status:"100%",install(e){e.directive("dLoading",V),e.config.globalProperties.$loadingService=L}};d.Loading=V,d.LoadingOptions=m,d.LoadingService=L,d.default=$,d.loadingProps=h,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/loading/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(
|
|
1
|
+
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{z-index:var(--devui-z-index-full-page-overlay, 1080);position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #d7d8da);opacity:.3}.devui-loading__wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:var(--devui-z-index-full-page-overlay, 1080)}.devui-loading--hidden{overflow:hidden}.devui-loading__text{margin-left:10px}.devui-loading__area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-loading__busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-loading__busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-loading__busy-default-spinner .devui-loading__bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-loading__busy-default-spinner .devui-loading__bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}
|