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/skeleton/index.es.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { toRefs, inject, computed, createVNode, defineComponent, provide } from "vue";
|
|
2
|
+
const skeletonItemProps = {
|
|
3
|
+
variant: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: "square"
|
|
6
|
+
},
|
|
7
|
+
size: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "md"
|
|
10
|
+
}
|
|
11
|
+
};
|
|
3
12
|
const skeletonProps = {
|
|
4
|
-
|
|
13
|
+
rows: {
|
|
5
14
|
type: Number,
|
|
6
|
-
default:
|
|
7
|
-
},
|
|
8
|
-
animate: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: true
|
|
15
|
+
default: 3
|
|
11
16
|
},
|
|
12
17
|
round: {
|
|
13
18
|
type: Boolean,
|
|
@@ -17,159 +22,124 @@ const skeletonProps = {
|
|
|
17
22
|
type: Boolean,
|
|
18
23
|
default: true
|
|
19
24
|
},
|
|
20
|
-
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: false
|
|
23
|
-
},
|
|
24
|
-
title: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: true
|
|
27
|
-
},
|
|
28
|
-
paragraph: {
|
|
25
|
+
showAnimation: {
|
|
29
26
|
type: Boolean,
|
|
30
27
|
default: true
|
|
31
|
-
},
|
|
32
|
-
avatarSize: {
|
|
33
|
-
type: [String, Number],
|
|
34
|
-
default: "40px"
|
|
35
|
-
},
|
|
36
|
-
avatarShape: {
|
|
37
|
-
value: String,
|
|
38
|
-
default: "round"
|
|
39
|
-
},
|
|
40
|
-
titleWidth: {
|
|
41
|
-
type: [String, Number],
|
|
42
|
-
default: "40%"
|
|
43
|
-
},
|
|
44
|
-
rowWidth: {
|
|
45
|
-
type: [Number, String, Array],
|
|
46
|
-
default: ["100%"]
|
|
47
28
|
}
|
|
48
29
|
};
|
|
30
|
+
const roundInjectionKey = Symbol("round");
|
|
31
|
+
const animationInjectionKey = Symbol("showAnimation");
|
|
32
|
+
function createBem(namespace, element, modifier) {
|
|
33
|
+
let cls = namespace;
|
|
34
|
+
if (element) {
|
|
35
|
+
cls += `__${element}`;
|
|
36
|
+
}
|
|
37
|
+
if (modifier) {
|
|
38
|
+
cls += `--${modifier}`;
|
|
39
|
+
}
|
|
40
|
+
return cls;
|
|
41
|
+
}
|
|
42
|
+
function useNamespace(block, needDot = false) {
|
|
43
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
44
|
+
const b = () => createBem(namespace);
|
|
45
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
46
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
47
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
48
|
+
return {
|
|
49
|
+
b,
|
|
50
|
+
e,
|
|
51
|
+
m,
|
|
52
|
+
em
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function useSkeletonItem(props) {
|
|
56
|
+
const ns = useNamespace("skeleton-item");
|
|
57
|
+
const { variant, size } = toRefs(props);
|
|
58
|
+
const round = inject(roundInjectionKey, void 0);
|
|
59
|
+
const showAnimation = inject(animationInjectionKey, void 0);
|
|
60
|
+
const classes = computed(() => ({
|
|
61
|
+
[ns.b()]: true,
|
|
62
|
+
[ns.m(variant.value)]: true,
|
|
63
|
+
[ns.m(size.value)]: variant.value !== "square",
|
|
64
|
+
[ns.m("round")]: variant.value !== "circle" && Boolean(round == null ? void 0 : round.value),
|
|
65
|
+
[ns.m("animation")]: Boolean(showAnimation == null ? void 0 : showAnimation.value)
|
|
66
|
+
}));
|
|
67
|
+
return { classes };
|
|
68
|
+
}
|
|
69
|
+
function ImageIcon() {
|
|
70
|
+
return createVNode("svg", {
|
|
71
|
+
"width": "24px",
|
|
72
|
+
"height": "24px",
|
|
73
|
+
"viewBox": "0 0 24 24",
|
|
74
|
+
"version": "1.1",
|
|
75
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
76
|
+
}, [createVNode("g", {
|
|
77
|
+
"stroke": "none",
|
|
78
|
+
"stroke-width": "1",
|
|
79
|
+
"fill": "none",
|
|
80
|
+
"fill-rule": "evenodd"
|
|
81
|
+
}, [createVNode("g", null, [createVNode("rect", {
|
|
82
|
+
"fill": "#d8d8d8",
|
|
83
|
+
"opacity": "0",
|
|
84
|
+
"x": "0",
|
|
85
|
+
"y": "0",
|
|
86
|
+
"width": "24",
|
|
87
|
+
"height": "24"
|
|
88
|
+
}, null), createVNode("path", {
|
|
89
|
+
"d": "M17.9783341,3.022 C19.5705758,3.022 20.8816065,4.27616494 20.9732206,5.84628917 L20.9783341,6.022 L20.9783341,15.4777069 L20.9783775,15.4946187 C20.9778434,15.509964 20.9768409,15.525296 20.9753698,15.5405914 L20.9783341,15.4777069 C20.9783341,15.8919205 20.6425477,16.2277069 20.2283341,16.2277069 C19.9841207,16.2277069 19.7671693,16.1109847 19.630224,15.9302845 L16.3835041,12.6846982 C15.9279377,12.2291319 15.2084078,12.1987608 14.7176463,12.593585 L14.6161642,12.6846982 L9.05907272,18.2417898 C8.76083183,18.5400306 8.28304152,18.5577535 7.96352506,18.2824274 C7.67269311,18.0318186 7.64008582,17.5928941 7.89069464,17.3020621 L7.9253008,17.2647549 L7.9253008,17.2647549 L13.5555041,11.6240381 C14.5846517,10.5948904 16.2263561,10.5520093 17.3065502,11.4953946 L17.4441642,11.6240381 L19.4783341,13.658 L19.4783341,6.022 C19.4783341,5.24761276 18.8784495,4.6021759 18.1219124,4.52892169 L17.9783341,4.522 L6.02133414,4.522 C5.24694691,4.522 4.60151004,5.12188468 4.52825583,5.87842174 L4.52133414,6.022 L4.52133414,17.978 C4.52133414,18.7529555 5.12086774,19.397891 5.87769393,19.4710842 L6.02133414,19.478 L17.9783341,19.478 C18.7530944,19.478 19.3982021,18.8786501 19.4714163,18.1216726 L19.4783341,17.978 C19.4783341,17.5637864 19.8141206,17.208 20.2283341,17.228 C20.6425477,17.228 20.9783341,17.5637864 20.9783341,17.978 C20.9783341,19.5709231 19.724442,20.881321 18.1540742,20.9728891 L17.9783341,20.978 L6.02133414,20.978 C4.42880954,20.978 3.11804157,19.7244922 3.02644657,18.1537812 L3.02133414,17.978 L3.02133414,6.022 C3.02133414,4.42975835 4.27549908,3.11872764 5.84562331,3.02711351 L6.02133414,3.022 L17.9783341,3.022 Z M8.99983414,7.7505 C9.6900477,7.7505 10.2498341,8.31028644 10.2498341,9.0005 C10.2498341,9.69071356 9.6900477,10.2505 8.99983414,10.3505 C8.30962058,10.2505 7.74983414,9.69071356 7.74983414,9.0005 C7.74983414,8.31028644 8.30962058,7.7505 8.99983414,7.7505 Z",
|
|
90
|
+
"fill": "#bfbfbf"
|
|
91
|
+
}, null)])])]);
|
|
92
|
+
}
|
|
93
|
+
var skeletonItem = "";
|
|
94
|
+
var SkeletonItem = defineComponent({
|
|
95
|
+
name: "DSkeletonItem",
|
|
96
|
+
props: skeletonItemProps,
|
|
97
|
+
setup(props) {
|
|
98
|
+
const {
|
|
99
|
+
variant
|
|
100
|
+
} = toRefs(props);
|
|
101
|
+
const {
|
|
102
|
+
classes
|
|
103
|
+
} = useSkeletonItem(props);
|
|
104
|
+
return () => createVNode("div", {
|
|
105
|
+
"class": classes.value
|
|
106
|
+
}, [variant.value === "image" && createVNode(ImageIcon, null, null)]);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
var skeleton = "";
|
|
49
110
|
var Skeleton = defineComponent({
|
|
50
111
|
name: "DSkeleton",
|
|
51
112
|
props: skeletonProps,
|
|
52
113
|
setup(props, ctx) {
|
|
114
|
+
const ns = useNamespace("skeleton");
|
|
53
115
|
const {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
function renderParagraph(isShown, rowNum, rowWidth, round) {
|
|
63
|
-
const arr = [];
|
|
64
|
-
function pushIntoArray(type) {
|
|
65
|
-
for (let index2 = 0; index2 < rowNum; index2++) {
|
|
66
|
-
arr.push({
|
|
67
|
-
width: type
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
(function handleRowWidth() {
|
|
72
|
-
if (rowWidth instanceof Array) {
|
|
73
|
-
for (let index2 = 0; index2 < rowNum; index2++) {
|
|
74
|
-
if (rowWidth[index2]) {
|
|
75
|
-
switch (typeof rowWidth[index2]) {
|
|
76
|
-
case "string":
|
|
77
|
-
arr.push({
|
|
78
|
-
width: rowWidth[index2]
|
|
79
|
-
});
|
|
80
|
-
break;
|
|
81
|
-
case "number":
|
|
82
|
-
arr.push({
|
|
83
|
-
width: `${rowWidth[index2]}px`
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
arr.push({
|
|
88
|
-
width: 1
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
93
|
-
switch (typeof rowWidth) {
|
|
94
|
-
case "string":
|
|
95
|
-
pushIntoArray(rowWidth);
|
|
96
|
-
break;
|
|
97
|
-
case "number":
|
|
98
|
-
pushIntoArray(`${rowWidth}px`);
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
})();
|
|
103
|
-
return withDirectives(createVNode("div", {
|
|
104
|
-
"class": "devui-skeleton__paragraph"
|
|
105
|
-
}, [arr.map((item) => {
|
|
106
|
-
return createVNode("div", {
|
|
107
|
-
"class": "devui-skeleton__item",
|
|
108
|
-
"style": round ? "border-radius: 1em;" : `width: ${item.width}`
|
|
109
|
-
}, null);
|
|
110
|
-
})]), [[vShow, isShown]]);
|
|
111
|
-
}
|
|
112
|
-
function renderAvatarStyle(avatarSize, avatarShape) {
|
|
113
|
-
function renderAvatarSize(avatarSize2) {
|
|
114
|
-
switch (typeof avatarSize2) {
|
|
115
|
-
case "string":
|
|
116
|
-
return `width:${avatarSize2};height:${avatarSize2};`;
|
|
117
|
-
case "number":
|
|
118
|
-
return `width:${avatarSize2}px;height:${avatarSize2}px;`;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function renderAvatarShape(avatarShape2) {
|
|
122
|
-
return avatarShape2 === "square" ? "" : "border-radius:50%;";
|
|
123
|
-
}
|
|
124
|
-
return renderAvatarSize(avatarSize) + renderAvatarShape(avatarShape);
|
|
125
|
-
}
|
|
126
|
-
function renderTitle(isVisible, titleWidth, isRound) {
|
|
127
|
-
function renderTitleWidth(titleWidth2) {
|
|
128
|
-
switch (typeof titleWidth2) {
|
|
129
|
-
case "string":
|
|
130
|
-
return `width: ${titleWidth2};`;
|
|
131
|
-
case "number":
|
|
132
|
-
return `width: ${titleWidth2}px;`;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
function renderTitleVisibility(isVisible2) {
|
|
136
|
-
return isVisible2 ? null : "visibility: hidden;";
|
|
137
|
-
}
|
|
138
|
-
return renderTitleWidth(titleWidth) + renderBorderRadius(isRound) + renderTitleVisibility(isVisible);
|
|
139
|
-
}
|
|
140
|
-
function renderSkeleton(isLoading) {
|
|
141
|
-
var _a;
|
|
142
|
-
if (isLoading) {
|
|
143
|
-
return createVNode(Fragment, null, [withDirectives(createVNode("div", {
|
|
144
|
-
"class": "devui-skeleton__avatar"
|
|
145
|
-
}, [createVNode("div", {
|
|
146
|
-
"class": "avatar",
|
|
147
|
-
"style": renderAvatarStyle(props.avatarSize, props.avatarShape)
|
|
148
|
-
}, null)]), [[vShow, props.avatar]]), createVNode("div", {
|
|
149
|
-
"class": "devui-skeleton__item__group"
|
|
150
|
-
}, [createVNode("div", {
|
|
151
|
-
"class": "devui-skeleton__title",
|
|
152
|
-
"style": renderTitle(props.title, props.titleWidth, props.round)
|
|
153
|
-
}, null), renderParagraph(props.paragraph, props.row, props.rowWidth, props.round)])]);
|
|
154
|
-
}
|
|
155
|
-
return createVNode(Fragment, null, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
156
|
-
}
|
|
116
|
+
loading,
|
|
117
|
+
rows,
|
|
118
|
+
showAnimation,
|
|
119
|
+
round
|
|
120
|
+
} = toRefs(props);
|
|
121
|
+
const paragraphs = computed(() => new Array(rows.value).fill(""));
|
|
122
|
+
provide(animationInjectionKey, showAnimation);
|
|
123
|
+
provide(roundInjectionKey, round);
|
|
157
124
|
return () => {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
125
|
+
var _a, _b;
|
|
126
|
+
return loading.value ? ctx.slots.placeholder ? ctx.slots.placeholder() : createVNode("div", {
|
|
127
|
+
"class": ns.b()
|
|
128
|
+
}, [createVNode(SkeletonItem, {
|
|
129
|
+
"class": ns.e("title")
|
|
130
|
+
}, null), paragraphs.value.map(() => createVNode(SkeletonItem, {
|
|
131
|
+
"class": ns.e("paragraph")
|
|
132
|
+
}, null))]) : (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a);
|
|
161
133
|
};
|
|
162
134
|
}
|
|
163
135
|
});
|
|
164
|
-
Skeleton.install = function(app) {
|
|
165
|
-
app.component(Skeleton.name, Skeleton);
|
|
166
|
-
};
|
|
167
136
|
var index = {
|
|
168
137
|
title: "Skeleton \u9AA8\u67B6\u5C4F",
|
|
169
138
|
category: "\u6570\u636E\u5C55\u793A",
|
|
170
|
-
status: "
|
|
139
|
+
status: "100%",
|
|
171
140
|
install(app) {
|
|
172
|
-
app.
|
|
141
|
+
app.component(Skeleton.name, Skeleton);
|
|
142
|
+
app.component(SkeletonItem.name, SkeletonItem);
|
|
173
143
|
}
|
|
174
144
|
};
|
|
175
|
-
export { Skeleton, index as default };
|
|
145
|
+
export { Skeleton, SkeletonItem, animationInjectionKey, index as default, roundInjectionKey, skeletonItemProps, skeletonProps };
|
package/skeleton/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(l,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(l=typeof globalThis!="undefined"?globalThis:l||self,e(l.index={},l.Vue))})(this,function(l,e){"use strict";const C={variant:{type:String,default:"square"},size:{type:String,default:"md"}},y={rows:{type:Number,default:3},round:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},showAnimation:{type:Boolean,default:!0}},m=Symbol("round"),f=Symbol("showAnimation");function d(o,n,t){let s=o;return n&&(s+=`__${n}`),t&&(s+=`--${t}`),s}function h(o,n=!1){const t=n?`.devui-${o}`:`devui-${o}`;return{b:()=>d(t),e:a=>a?d(t,a):"",m:a=>a?d(t,"",a):"",em:(a,u)=>a&&u?d(t,a,u):""}}function k(o){const n=h("skeleton-item"),{variant:t,size:s}=e.toRefs(o),i=e.inject(m,void 0),r=e.inject(f,void 0);return{classes:e.computed(()=>({[n.b()]:!0,[n.m(t.value)]:!0,[n.m(s.value)]:t.value!=="square",[n.m("round")]:t.value!=="circle"&&Boolean(i==null?void 0:i.value),[n.m("animation")]:Boolean(r==null?void 0:r.value)}))}}function v(){return e.createVNode("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",null,[e.createVNode("rect",{fill:"#d8d8d8",opacity:"0",x:"0",y:"0",width:"24",height:"24"},null),e.createVNode("path",{d:"M17.9783341,3.022 C19.5705758,3.022 20.8816065,4.27616494 20.9732206,5.84628917 L20.9783341,6.022 L20.9783341,15.4777069 L20.9783775,15.4946187 C20.9778434,15.509964 20.9768409,15.525296 20.9753698,15.5405914 L20.9783341,15.4777069 C20.9783341,15.8919205 20.6425477,16.2277069 20.2283341,16.2277069 C19.9841207,16.2277069 19.7671693,16.1109847 19.630224,15.9302845 L16.3835041,12.6846982 C15.9279377,12.2291319 15.2084078,12.1987608 14.7176463,12.593585 L14.6161642,12.6846982 L9.05907272,18.2417898 C8.76083183,18.5400306 8.28304152,18.5577535 7.96352506,18.2824274 C7.67269311,18.0318186 7.64008582,17.5928941 7.89069464,17.3020621 L7.9253008,17.2647549 L7.9253008,17.2647549 L13.5555041,11.6240381 C14.5846517,10.5948904 16.2263561,10.5520093 17.3065502,11.4953946 L17.4441642,11.6240381 L19.4783341,13.658 L19.4783341,6.022 C19.4783341,5.24761276 18.8784495,4.6021759 18.1219124,4.52892169 L17.9783341,4.522 L6.02133414,4.522 C5.24694691,4.522 4.60151004,5.12188468 4.52825583,5.87842174 L4.52133414,6.022 L4.52133414,17.978 C4.52133414,18.7529555 5.12086774,19.397891 5.87769393,19.4710842 L6.02133414,19.478 L17.9783341,19.478 C18.7530944,19.478 19.3982021,18.8786501 19.4714163,18.1216726 L19.4783341,17.978 C19.4783341,17.5637864 19.8141206,17.208 20.2283341,17.228 C20.6425477,17.228 20.9783341,17.5637864 20.9783341,17.978 C20.9783341,19.5709231 19.724442,20.881321 18.1540742,20.9728891 L17.9783341,20.978 L6.02133414,20.978 C4.42880954,20.978 3.11804157,19.7244922 3.02644657,18.1537812 L3.02133414,17.978 L3.02133414,6.022 C3.02133414,4.42975835 4.27549908,3.11872764 5.84562331,3.02711351 L6.02133414,3.022 L17.9783341,3.022 Z M8.99983414,7.7505 C9.6900477,7.7505 10.2498341,8.31028644 10.2498341,9.0005 C10.2498341,9.69071356 9.6900477,10.2505 8.99983414,10.3505 C8.30962058,10.2505 7.74983414,9.69071356 7.74983414,9.0005 C7.74983414,8.31028644 8.30962058,7.7505 8.99983414,7.7505 Z",fill:"#bfbfbf"},null)])])])}var w="",c=e.defineComponent({name:"DSkeletonItem",props:C,setup(o){const{variant:n}=e.toRefs(o),{classes:t}=k(o);return()=>e.createVNode("div",{class:t.value},[n.value==="image"&&e.createVNode(v,null,null)])}}),I="",p=e.defineComponent({name:"DSkeleton",props:y,setup(o,n){const t=h("skeleton"),{loading:s,rows:i,showAnimation:r,round:L}=e.toRefs(o),a=e.computed(()=>new Array(i.value).fill(""));return e.provide(f,r),e.provide(m,L),()=>{var u,g;return s.value?n.slots.placeholder?n.slots.placeholder():e.createVNode("div",{class:t.b()},[e.createVNode(c,{class:t.e("title")},null),a.value.map(()=>e.createVNode(c,{class:t.e("paragraph")},null))]):(g=(u=n.slots).default)==null?void 0:g.call(u)}}}),S={title:"Skeleton \u9AA8\u67B6\u5C4F",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(o){o.component(p.name,p),o.component(c.name,c)}};l.Skeleton=p,l.SkeletonItem=c,l.animationInjectionKey=f,l.default=S,l.roundInjectionKey=m,l.skeletonItemProps=C,l.skeletonProps=y,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/skeleton/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-skeleton{
|
|
1
|
+
.devui-skeleton-item{background-color:var(--devui-list-item-hover-bg, #f2f2f3)}.devui-skeleton-item--round{border-radius:var(--devui-border-radius, 4px)}.devui-skeleton-item--square{width:100%;height:16px}.devui-skeleton-item--circle{border-radius:50%}.devui-skeleton-item--circle.devui-skeleton-item--sm{width:20px;height:20px}.devui-skeleton-item--circle.devui-skeleton-item--md{width:40px;height:40px}.devui-skeleton-item--circle.devui-skeleton-item--lg{width:60px;height:60px}.devui-skeleton-item--image{display:flex;justify-content:center;align-items:center}.devui-skeleton-item--image svg{width:40%;height:40%}.devui-skeleton-item--image.devui-skeleton-item--sm{width:50px;height:50px}.devui-skeleton-item--image.devui-skeleton-item--md{width:100px;height:100px}.devui-skeleton-item--image.devui-skeleton-item--lg{width:200px;height:200px}.devui-skeleton-item--animation.devui-skeleton-item{background:linear-gradient(100deg,rgba(255,255,255,0) 40%,rgba(255,255,255,.5) 50%,rgba(255,255,255,0) 60%) var(--devui-list-item-hover-bg, #f2f2f3);background-size:200% 100%;background-position-x:180%;animation:2s skeletonLoading ease-in-out infinite}@keyframes skeletonLoading{to{background-position-x:-20%}}.devui-skeleton{width:100%}.devui-skeleton__paragraph{margin-bottom:12px}.devui-skeleton__paragraph:last-child{width:60%;margin-bottom:0}.devui-skeleton-item.devui-skeleton__title{width:40%;margin-bottom:16px}
|