vue-devui 1.0.0-beta.2 → 1.0.0-beta.220801
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 +9044 -0
- package/auto-complete/index.umd.js +29 -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 +5927 -131
- 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 +8082 -232
- package/checkbox/index.umd.js +27 -1
- package/checkbox/style.css +1 -1
- package/collapse/index.d.ts +7 -0
- package/collapse/index.es.js +213 -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 +12018 -0
- package/date-picker-pro/index.umd.js +27 -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 +203 -139
- 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 +754 -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 +912 -442
- 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 +2415 -1985
- package/form/index.umd.js +18 -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 +284 -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 +142 -39
- 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 +8255 -145
- package/input/index.umd.js +27 -1
- package/input/style.css +1 -1
- package/input-number/index.d.ts +7 -0
- package/input-number/index.es.js +270 -186
- 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 +77 -38
- 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 +8310 -0
- package/mention/index.umd.js +36 -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 +870 -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 +538 -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 +607 -841
- 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 +545 -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 +7976 -159
- package/radio/index.umd.js +27 -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 +51 -43
- package/ripple/index.umd.js +1 -1
- package/search/index.d.ts +7 -0
- package/search/index.es.js +8411 -450
- package/search/index.umd.js +27 -1
- package/search/style.css +1 -1
- package/select/index.d.ts +7 -0
- package/select/index.es.js +9295 -561
- package/select/index.umd.js +27 -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 +6301 -167
- 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 +274 -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 +7805 -65
- package/switch/index.umd.js +27 -1
- package/switch/style.css +1 -1
- package/table/index.d.ts +7 -0
- package/table/index.es.js +11423 -207
- package/table/index.umd.js +27 -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 +7973 -0
- package/textarea/index.umd.js +35 -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 +9101 -581
- package/time-picker/index.umd.js +27 -1
- package/time-picker/style.css +1 -1
- package/time-select/index.d.ts +7 -0
- package/time-select/index.es.js +9585 -0
- package/time-select/index.umd.js +27 -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 +11438 -654
- package/tree/index.umd.js +27 -1
- package/tree/style.css +1 -1
- package/upload/index.d.ts +7 -0
- package/upload/index.es.js +981 -2719
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +22794 -16605
- package/vue-devui.umd.js +31 -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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.devui-statistic{box-sizing:border-box;margin:0;padding:0;font-size:14px;line-height:1.5715;list-style:none}.devui-statistic__title{margin-bottom:4px;font-size:14px}.devui-statistic__content{font-size:24px;display:flex;align-items:center}.devui-statistic__prefix{margin-right:6px;display:flex;align-items:center}.devui-statistic__suffix{margin-left:6px;display:flex;align-items:center}.devui-statistic__value{display:inline-block}
|
package/status/index.es.js
CHANGED
|
@@ -1,22 +1,46 @@
|
|
|
1
1
|
import { defineComponent, computed, 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 status = "";
|
|
3
26
|
var Status = defineComponent({
|
|
4
27
|
name: "DStatus",
|
|
5
28
|
props: {
|
|
6
29
|
type: {
|
|
7
|
-
default: "
|
|
30
|
+
default: "invalid",
|
|
8
31
|
type: String
|
|
9
32
|
}
|
|
10
33
|
},
|
|
11
34
|
setup(props, ctx) {
|
|
35
|
+
const ns = useNamespace("status");
|
|
12
36
|
const typeClass = computed(() => {
|
|
13
37
|
const {
|
|
14
38
|
type
|
|
15
39
|
} = props;
|
|
16
40
|
const typeStatus = ["success", "error", "initial", "warning", "waiting", "running", "invalid"];
|
|
17
|
-
let typeClassStr =
|
|
41
|
+
let typeClassStr = `${ns.b()} ${ns.em("bg", "invalid")}`;
|
|
18
42
|
if (typeStatus.includes(type)) {
|
|
19
|
-
typeClassStr =
|
|
43
|
+
typeClassStr = `${ns.b()} ${ns.em("bg", type)}`;
|
|
20
44
|
}
|
|
21
45
|
return typeClassStr;
|
|
22
46
|
});
|
|
@@ -28,15 +52,12 @@ var Status = defineComponent({
|
|
|
28
52
|
};
|
|
29
53
|
}
|
|
30
54
|
});
|
|
31
|
-
Status.install = function(app) {
|
|
32
|
-
app.component(Status.name, Status);
|
|
33
|
-
};
|
|
34
55
|
var index = {
|
|
35
56
|
title: "Status \u72B6\u6001",
|
|
36
57
|
category: "\u901A\u7528",
|
|
37
|
-
status: "
|
|
58
|
+
status: "100%",
|
|
38
59
|
install(app) {
|
|
39
|
-
app.
|
|
60
|
+
app.component(Status.name, Status);
|
|
40
61
|
}
|
|
41
62
|
};
|
|
42
63
|
export { Status, index as default };
|
package/status/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,
|
|
1
|
+
(function(t,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(t=typeof globalThis!="undefined"?globalThis:t||self,u(t.index={},t.Vue))})(this,function(t,u){"use strict";function r(n,a,e){let i=n;return a&&(i+=`__${a}`),e&&(i+=`--${e}`),i}function f(n,a=!1){const e=a?`.devui-${n}`:`devui-${n}`;return{b:()=>r(e),e:s=>s?r(e,s):"",m:s=>s?r(e,"",s):"",em:(s,p)=>s&&p?r(e,s,p):""}}var y="",d=u.defineComponent({name:"DStatus",props:{type:{default:"invalid",type:String}},setup(n,a){const e=f("status"),i=u.computed(()=>{const{type:o}=n,c=["success","error","initial","warning","waiting","running","invalid"];let l=`${e.b()} ${e.em("bg","invalid")}`;return c.includes(o)&&(l=`${e.b()} ${e.em("bg",o)}`),l});return()=>{var o,c;return u.createVNode("span",{class:i.value},[(c=(o=a.slots).default)==null?void 0:c.call(o)])}}}),m={title:"Status \u72B6\u6001",category:"\u901A\u7528",status:"100%",install(n){n.component(d.name,d)}};t.Status=d,t.default=m,Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"});
|
package/status/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-
|
|
1
|
+
.devui-status{line-height:20px;height:20px;display:flex;align-items:center}.devui-status:before{display:inline-block;content:"";width:10px;height:10px;margin-right:5px;border-radius:100%}.devui-status.devui-status__bg--success:before{background-color:var(--devui-success, #50d4ab)}.devui-status.devui-status__bg--error:before{background-color:var(--devui-danger, #f66f6a)}.devui-status.devui-status__bg--warning:before{background-color:var(--devui-warning, #fac20a)}.devui-status.devui-status__bg--initial:before{background-color:var(--devui-initial, #e9edfa)}.devui-status.devui-status__bg--waiting:before{background-color:var(--devui-waiting, #9faad7)}.devui-status.devui-status__bg--running:before{background-color:var(--devui-info, #5e7ce0)}.devui-status.devui-status__bg--invalid:before{background-color:var(--devui-dividing-line, #f2f2f3)}
|
package/steps/index.d.ts
ADDED
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { defineComponent, toRefs, ref, provide, watch, computed, createVNode, resolveDynamicComponent, mergeProps, getCurrentInstance, inject, Fragment } from "vue";
|
|
2
|
+
const stepsProps = {
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: Number,
|
|
5
|
+
default: 0
|
|
6
|
+
},
|
|
7
|
+
space: {
|
|
8
|
+
type: Number
|
|
9
|
+
},
|
|
10
|
+
alignCenter: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
direction: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "horizontal"
|
|
17
|
+
},
|
|
18
|
+
simple: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function createBem(namespace, element, modifier) {
|
|
24
|
+
let cls = namespace;
|
|
25
|
+
if (element) {
|
|
26
|
+
cls += `__${element}`;
|
|
27
|
+
}
|
|
28
|
+
if (modifier) {
|
|
29
|
+
cls += `--${modifier}`;
|
|
30
|
+
}
|
|
31
|
+
return cls;
|
|
32
|
+
}
|
|
33
|
+
function useNamespace(block, needDot = false) {
|
|
34
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
35
|
+
const b = () => createBem(namespace);
|
|
36
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
37
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
38
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
39
|
+
return {
|
|
40
|
+
b,
|
|
41
|
+
e,
|
|
42
|
+
m,
|
|
43
|
+
em
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var steps = "";
|
|
47
|
+
const ACTIVE_STEP = "active-step";
|
|
48
|
+
const STEPS = "steps";
|
|
49
|
+
const STEPS_PROPS = "steps-props";
|
|
50
|
+
var Steps = defineComponent({
|
|
51
|
+
name: "DSteps",
|
|
52
|
+
props: stepsProps,
|
|
53
|
+
emits: ["update:modelValue"],
|
|
54
|
+
setup(props, {
|
|
55
|
+
slots
|
|
56
|
+
}) {
|
|
57
|
+
const {
|
|
58
|
+
modelValue,
|
|
59
|
+
direction,
|
|
60
|
+
simple
|
|
61
|
+
} = toRefs(props);
|
|
62
|
+
const ns = useNamespace("steps");
|
|
63
|
+
const activeStep = ref(modelValue.value);
|
|
64
|
+
provide(ACTIVE_STEP, activeStep);
|
|
65
|
+
provide(STEPS_PROPS, props);
|
|
66
|
+
const steps2 = ref([]);
|
|
67
|
+
provide(STEPS, steps2);
|
|
68
|
+
watch(modelValue, (newVal) => {
|
|
69
|
+
activeStep.value = newVal;
|
|
70
|
+
});
|
|
71
|
+
const stepsClass = computed(() => {
|
|
72
|
+
const directionClass = direction.value === "vertical" ? " vertical" : "";
|
|
73
|
+
const simpleClass = simple.value ? " simple" : "";
|
|
74
|
+
return `${ns.b()}${directionClass}${simpleClass}`;
|
|
75
|
+
});
|
|
76
|
+
return () => {
|
|
77
|
+
var _a;
|
|
78
|
+
return createVNode("div", {
|
|
79
|
+
"class": stepsClass.value
|
|
80
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const stepProps = {
|
|
85
|
+
title: {
|
|
86
|
+
type: String,
|
|
87
|
+
required: true
|
|
88
|
+
},
|
|
89
|
+
description: {
|
|
90
|
+
type: String
|
|
91
|
+
},
|
|
92
|
+
icon: {
|
|
93
|
+
type: String
|
|
94
|
+
},
|
|
95
|
+
status: {
|
|
96
|
+
type: String
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const DEFAULT_PREFIX = "icon";
|
|
100
|
+
const iconProps = {
|
|
101
|
+
name: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: "",
|
|
104
|
+
required: true
|
|
105
|
+
},
|
|
106
|
+
size: {
|
|
107
|
+
type: [Number, String],
|
|
108
|
+
default: "inherit"
|
|
109
|
+
},
|
|
110
|
+
color: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: "inherit"
|
|
113
|
+
},
|
|
114
|
+
component: {
|
|
115
|
+
type: Object,
|
|
116
|
+
default: null
|
|
117
|
+
},
|
|
118
|
+
classPrefix: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: DEFAULT_PREFIX
|
|
121
|
+
},
|
|
122
|
+
operable: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: false
|
|
125
|
+
},
|
|
126
|
+
disabled: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: false
|
|
129
|
+
},
|
|
130
|
+
rotate: {
|
|
131
|
+
type: [Number, String]
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const svgIconProps = {
|
|
135
|
+
name: {
|
|
136
|
+
type: String,
|
|
137
|
+
default: "",
|
|
138
|
+
required: true
|
|
139
|
+
},
|
|
140
|
+
color: {
|
|
141
|
+
type: String,
|
|
142
|
+
default: "inherit"
|
|
143
|
+
},
|
|
144
|
+
size: {
|
|
145
|
+
type: [Number, String],
|
|
146
|
+
default: "inherit"
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
var icon = "";
|
|
150
|
+
var svgIcon = defineComponent({
|
|
151
|
+
name: "DSvgIcon",
|
|
152
|
+
props: svgIconProps,
|
|
153
|
+
setup(props) {
|
|
154
|
+
const {
|
|
155
|
+
name,
|
|
156
|
+
color,
|
|
157
|
+
size
|
|
158
|
+
} = toRefs(props);
|
|
159
|
+
const ns = useNamespace("svg-icon");
|
|
160
|
+
const iconName = computed(() => `#icon-${name.value}`);
|
|
161
|
+
const iconSize = computed(() => {
|
|
162
|
+
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
163
|
+
});
|
|
164
|
+
const styles = {
|
|
165
|
+
width: iconSize.value,
|
|
166
|
+
height: iconSize.value
|
|
167
|
+
};
|
|
168
|
+
return () => {
|
|
169
|
+
return createVNode("svg", {
|
|
170
|
+
"class": ns.b(),
|
|
171
|
+
"style": styles
|
|
172
|
+
}, [createVNode("use", {
|
|
173
|
+
"xlink:href": iconName.value,
|
|
174
|
+
"fill": color.value
|
|
175
|
+
}, null)]);
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
function isUrl(value) {
|
|
180
|
+
return /^((http|https):)?\/\//.test(value);
|
|
181
|
+
}
|
|
182
|
+
function useIconDom(props, ctx) {
|
|
183
|
+
const {
|
|
184
|
+
component,
|
|
185
|
+
name,
|
|
186
|
+
size,
|
|
187
|
+
color,
|
|
188
|
+
classPrefix,
|
|
189
|
+
rotate
|
|
190
|
+
} = toRefs(props);
|
|
191
|
+
const ns = useNamespace("icon");
|
|
192
|
+
const iconSize = computed(() => {
|
|
193
|
+
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
194
|
+
});
|
|
195
|
+
const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
|
|
196
|
+
const imgIconDom = () => {
|
|
197
|
+
return createVNode("img", mergeProps({
|
|
198
|
+
"src": name.value,
|
|
199
|
+
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
200
|
+
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
201
|
+
"style": {
|
|
202
|
+
width: iconSize.value || "",
|
|
203
|
+
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
|
|
204
|
+
verticalAlign: "middle"
|
|
205
|
+
}
|
|
206
|
+
}, ctx.attrs), null);
|
|
207
|
+
};
|
|
208
|
+
const svgIconDom = () => {
|
|
209
|
+
return createVNode(IconComponent, mergeProps({
|
|
210
|
+
"name": name.value,
|
|
211
|
+
"color": color.value,
|
|
212
|
+
"size": iconSize.value,
|
|
213
|
+
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
214
|
+
"style": {
|
|
215
|
+
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
|
|
216
|
+
}
|
|
217
|
+
}, ctx.attrs), null);
|
|
218
|
+
};
|
|
219
|
+
const fontIconDom = () => {
|
|
220
|
+
const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
|
|
221
|
+
return createVNode("i", mergeProps({
|
|
222
|
+
"class": [classPrefix.value, fontIconClass, (rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
223
|
+
"style": {
|
|
224
|
+
fontSize: iconSize.value,
|
|
225
|
+
color: color.value,
|
|
226
|
+
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
|
|
227
|
+
}
|
|
228
|
+
}, ctx.attrs), null);
|
|
229
|
+
};
|
|
230
|
+
const iconDom = () => {
|
|
231
|
+
return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
|
|
232
|
+
};
|
|
233
|
+
return {
|
|
234
|
+
iconDom
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
var Icon = defineComponent({
|
|
238
|
+
name: "DIcon",
|
|
239
|
+
props: iconProps,
|
|
240
|
+
emits: ["click"],
|
|
241
|
+
setup(props, ctx) {
|
|
242
|
+
const {
|
|
243
|
+
disabled,
|
|
244
|
+
operable
|
|
245
|
+
} = toRefs(props);
|
|
246
|
+
const {
|
|
247
|
+
iconDom
|
|
248
|
+
} = useIconDom(props, ctx);
|
|
249
|
+
const ns = useNamespace("icon");
|
|
250
|
+
const wrapClassed = computed(() => ({
|
|
251
|
+
[ns.e("container")]: true,
|
|
252
|
+
[ns.m("disabled")]: disabled.value,
|
|
253
|
+
[ns.m("operable")]: operable.value
|
|
254
|
+
}));
|
|
255
|
+
const onClick = (e) => {
|
|
256
|
+
if (disabled.value) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
ctx.emit("click", e);
|
|
260
|
+
};
|
|
261
|
+
return () => {
|
|
262
|
+
var _a, _b, _c, _d;
|
|
263
|
+
return createVNode("div", {
|
|
264
|
+
"class": wrapClassed.value,
|
|
265
|
+
"onClick": onClick
|
|
266
|
+
}, [(_b = (_a = ctx.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx.slots).suffix) == null ? void 0 : _d.call(_c)]);
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
var iconGroup = "";
|
|
271
|
+
defineComponent({
|
|
272
|
+
name: "DIconGroup",
|
|
273
|
+
setup(_, ctx) {
|
|
274
|
+
const ns = useNamespace("icon-group");
|
|
275
|
+
return () => {
|
|
276
|
+
var _a, _b;
|
|
277
|
+
return createVNode("div", {
|
|
278
|
+
"class": ns.b()
|
|
279
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
var step = "";
|
|
284
|
+
var Step = defineComponent({
|
|
285
|
+
name: "DStep",
|
|
286
|
+
props: stepProps,
|
|
287
|
+
setup(props, {
|
|
288
|
+
slots
|
|
289
|
+
}) {
|
|
290
|
+
const {
|
|
291
|
+
title,
|
|
292
|
+
description,
|
|
293
|
+
icon: icon2,
|
|
294
|
+
status
|
|
295
|
+
} = toRefs(props);
|
|
296
|
+
const ns = useNamespace("step");
|
|
297
|
+
const instance = getCurrentInstance();
|
|
298
|
+
const activeStep = inject(ACTIVE_STEP);
|
|
299
|
+
const steps2 = inject(STEPS);
|
|
300
|
+
steps2.value.push(instance);
|
|
301
|
+
const stepsProps2 = inject(STEPS_PROPS);
|
|
302
|
+
const currentStepIndex = steps2.value.indexOf(instance);
|
|
303
|
+
const stepClass = computed(() => {
|
|
304
|
+
const activeClass = activeStep.value === currentStepIndex ? " active" : "";
|
|
305
|
+
const finishedClass = activeStep.value > currentStepIndex ? " finished" : "";
|
|
306
|
+
const centerClass = stepsProps2.alignCenter ? " center" : "";
|
|
307
|
+
const statusClass = (status == null ? void 0 : status.value) ? ` ${status == null ? void 0 : status.value}` : "";
|
|
308
|
+
const simpleClass = stepsProps2.simple ? ` ${ns.m("simple")}` : "";
|
|
309
|
+
return `${ns.b()}${activeClass}${finishedClass}${centerClass}${statusClass}${simpleClass}`;
|
|
310
|
+
});
|
|
311
|
+
const stepStyle = computed(() => {
|
|
312
|
+
const styleObj = {};
|
|
313
|
+
if (stepsProps2.space) {
|
|
314
|
+
styleObj.width = `${stepsProps2.space}px`;
|
|
315
|
+
} else {
|
|
316
|
+
styleObj.flexBasis = stepsProps2.alignCenter || stepsProps2.simple ? `${100 / steps2.value.length}%` : `${100 / (steps2.value.length - 1)}%`;
|
|
317
|
+
}
|
|
318
|
+
return styleObj;
|
|
319
|
+
});
|
|
320
|
+
const iconColor = computed(() => {
|
|
321
|
+
const isActive = activeStep.value === currentStepIndex;
|
|
322
|
+
const isFinished = activeStep.value > currentStepIndex;
|
|
323
|
+
return isActive ? "var(--devui-brand)" : isFinished ? "var(--devui-success)" : "var(--devui-placeholder)";
|
|
324
|
+
});
|
|
325
|
+
const statusMap = {
|
|
326
|
+
finish: createVNode(Icon, {
|
|
327
|
+
"name": "right-o",
|
|
328
|
+
"color": "var(--devui-success)",
|
|
329
|
+
"size": "24px"
|
|
330
|
+
}, null),
|
|
331
|
+
success: createVNode(Icon, {
|
|
332
|
+
"name": "right-o",
|
|
333
|
+
"color": "var(--devui-success)",
|
|
334
|
+
"size": "24px"
|
|
335
|
+
}, null),
|
|
336
|
+
error: createVNode(Icon, {
|
|
337
|
+
"name": "error-o",
|
|
338
|
+
"color": "var(--devui-danger)",
|
|
339
|
+
"size": "24px"
|
|
340
|
+
}, null)
|
|
341
|
+
};
|
|
342
|
+
const renderDot = () => {
|
|
343
|
+
var _a;
|
|
344
|
+
return slots.icon ? (_a = slots.icon) == null ? void 0 : _a.call(slots, iconColor.value) : icon2.value ? createVNode(Icon, {
|
|
345
|
+
"name": icon2.value,
|
|
346
|
+
"color": iconColor.value,
|
|
347
|
+
"size": "24px"
|
|
348
|
+
}, null) : status.value && statusMap[status.value] ? statusMap[status.value] : activeStep.value > steps2.value.indexOf(instance) ? createVNode(Icon, {
|
|
349
|
+
"name": "right-o",
|
|
350
|
+
"color": "var(--devui-success)",
|
|
351
|
+
"size": "24px"
|
|
352
|
+
}, null) : createVNode("span", {
|
|
353
|
+
"class": ns.e("dot")
|
|
354
|
+
}, [currentStepIndex + 1]);
|
|
355
|
+
};
|
|
356
|
+
return () => {
|
|
357
|
+
return createVNode(Fragment, null, [stepsProps2.simple ? createVNode("div", {
|
|
358
|
+
"class": stepClass.value,
|
|
359
|
+
"style": stepStyle.value
|
|
360
|
+
}, [title.value]) : createVNode("div", {
|
|
361
|
+
"class": stepClass.value,
|
|
362
|
+
"style": stepStyle.value
|
|
363
|
+
}, [createVNode("div", {
|
|
364
|
+
"class": ns.e("dot-container")
|
|
365
|
+
}, [renderDot(), createVNode("div", {
|
|
366
|
+
"class": ns.e("line")
|
|
367
|
+
}, null)]), createVNode("div", {
|
|
368
|
+
"class": ns.e("content")
|
|
369
|
+
}, [createVNode("span", {
|
|
370
|
+
"class": ns.e("title")
|
|
371
|
+
}, [title.value]), description.value && createVNode("span", {
|
|
372
|
+
"class": ns.e("description")
|
|
373
|
+
}, [description.value])])])]);
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
var index = {
|
|
378
|
+
title: "Steps \u6B65\u9AA4\u6761",
|
|
379
|
+
category: "\u6570\u636E\u5C55\u793A",
|
|
380
|
+
status: "100%",
|
|
381
|
+
install(app) {
|
|
382
|
+
app.component(Steps.name, Steps);
|
|
383
|
+
app.component(Step.name, Step);
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
export { Step, Steps, index as default, stepProps, stepsProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(d,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(d=typeof globalThis!="undefined"?globalThis:d||self,e(d.index={},d.Vue))})(this,function(d,e){"use strict";const P={modelValue:{type:Number,default:0},space:{type:Number},alignCenter:{type:Boolean,default:!1},direction:{type:String,default:"horizontal"},simple:{type:Boolean,default:!1}};function y(a,s,o){let n=a;return s&&(n+=`__${s}`),o&&(n+=`--${o}`),n}function v(a,s=!1){const o=s?`.devui-${a}`:`devui-${a}`;return{b:()=>y(o),e:t=>t?y(o,t):"",m:t=>t?y(o,"",t):"",em:(t,r)=>t&&r?y(o,t,r):""}}var k="";const D="active-step",I="steps",z="steps-props";var C=e.defineComponent({name:"DSteps",props:P,emits:["update:modelValue"],setup(a,{slots:s}){const{modelValue:o,direction:n,simple:u}=e.toRefs(a),l=v("steps"),c=e.ref(o.value);e.provide(D,c),e.provide(z,a);const t=e.ref([]);e.provide(I,t),e.watch(o,i=>{c.value=i});const r=e.computed(()=>{const i=n.value==="vertical"?" vertical":"",p=u.value?" simple":"";return`${l.b()}${i}${p}`});return()=>{var i;return e.createVNode("div",{class:r.value},[(i=s.default)==null?void 0:i.call(s)])}}});const x={title:{type:String,required:!0},description:{type:String},icon:{type:String},status:{type:String}},E={name:{type:String,default:"",required:!0},size:{type:[Number,String],default:"inherit"},color:{type:String,default:"inherit"},component:{type:Object,default:null},classPrefix:{type:String,default:"icon"},operable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rotate:{type:[Number,String]}},T={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};var M="",_=e.defineComponent({name:"DSvgIcon",props:T,setup(a){const{name:s,color:o,size:n}=e.toRefs(a),u=v("svg-icon"),l=e.computed(()=>`#icon-${s.value}`),c=e.computed(()=>typeof n.value=="number"?`${n.value}px`:n.value),t={width:c.value,height:c.value};return()=>e.createVNode("svg",{class:u.b(),style:t},[e.createVNode("use",{"xlink:href":l.value,fill:o.value},null)])}});function A(a){return/^((http|https):)?\/\//.test(a)}function R(a,s){const{component:o,name:n,size:u,color:l,classPrefix:c,rotate:t}=e.toRefs(a),r=v("icon"),i=e.computed(()=>typeof u.value=="number"?`${u.value}px`:u.value),p=o.value?e.resolveDynamicComponent(o.value):e.resolveDynamicComponent(_),m=()=>e.createVNode("img",e.mergeProps({src:n.value,alt:n.value.split("/")[n.value.split("/").length-1],class:[(t==null?void 0:t.value)==="infinite"&&r.m("spin")],style:{width:i.value||"",transform:`rotate(${t==null?void 0:t.value}deg)`,verticalAlign:"middle"}},s.attrs),null),S=()=>e.createVNode(p,e.mergeProps({name:n.value,color:l.value,size:i.value,class:[(t==null?void 0:t.value)==="infinite"&&r.m("spin")],style:{transform:`rotate(${t==null?void 0:t.value}deg)`}},s.attrs),null),h=()=>{const N=/^icon-/.test(n.value)?n.value:`${c.value}-${n.value}`;return e.createVNode("i",e.mergeProps({class:[c.value,N,(t==null?void 0:t.value)==="infinite"&&r.m("spin")],style:{fontSize:i.value,color:l.value,transform:`rotate(${t==null?void 0:t.value}deg)`}},s.attrs),null)};return{iconDom:()=>o.value?S():A(n.value)?m():h()}}var g=e.defineComponent({name:"DIcon",props:E,emits:["click"],setup(a,s){const{disabled:o,operable:n}=e.toRefs(a),{iconDom:u}=R(a,s),l=v("icon"),c=e.computed(()=>({[l.e("container")]:!0,[l.m("disabled")]:o.value,[l.m("operable")]:n.value})),t=r=>{o.value||s.emit("click",r)};return()=>{var r,i,p,m;return e.createVNode("div",{class:c.value,onClick:t},[(i=(r=s.slots).prefix)==null?void 0:i.call(r),u(),(m=(p=s.slots).suffix)==null?void 0:m.call(p)])}}}),U="";e.defineComponent({name:"DIconGroup",setup(a,s){const o=v("icon-group");return()=>{var n,u;return e.createVNode("div",{class:o.b()},[(u=(n=s.slots).default)==null?void 0:u.call(n)])}}});var G="",V=e.defineComponent({name:"DStep",props:x,setup(a,{slots:s}){const{title:o,description:n,icon:u,status:l}=e.toRefs(a),c=v("step"),t=e.getCurrentInstance(),r=e.inject(D),i=e.inject(I);i.value.push(t);const p=e.inject(z),m=i.value.indexOf(t),S=e.computed(()=>{const f=r.value===m?" active":"",b=r.value>m?" finished":"",F=p.alignCenter?" center":"",O=(l==null?void 0:l.value)?` ${l==null?void 0:l.value}`:"",w=p.simple?` ${c.m("simple")}`:"";return`${c.b()}${f}${b}${F}${O}${w}`}),h=e.computed(()=>{const f={};return p.space?f.width=`${p.space}px`:f.flexBasis=p.alignCenter||p.simple?`${100/i.value.length}%`:`${100/(i.value.length-1)}%`,f}),$=e.computed(()=>{const f=r.value===m,b=r.value>m;return f?"var(--devui-brand)":b?"var(--devui-success)":"var(--devui-placeholder)"}),N={finish:e.createVNode(g,{name:"right-o",color:"var(--devui-success)",size:"24px"},null),success:e.createVNode(g,{name:"right-o",color:"var(--devui-success)",size:"24px"},null),error:e.createVNode(g,{name:"error-o",color:"var(--devui-danger)",size:"24px"},null)},B=()=>{var f;return s.icon?(f=s.icon)==null?void 0:f.call(s,$.value):u.value?e.createVNode(g,{name:u.value,color:$.value,size:"24px"},null):l.value&&N[l.value]?N[l.value]:r.value>i.value.indexOf(t)?e.createVNode(g,{name:"right-o",color:"var(--devui-success)",size:"24px"},null):e.createVNode("span",{class:c.e("dot")},[m+1])};return()=>e.createVNode(e.Fragment,null,[p.simple?e.createVNode("div",{class:S.value,style:h.value},[o.value]):e.createVNode("div",{class:S.value,style:h.value},[e.createVNode("div",{class:c.e("dot-container")},[B(),e.createVNode("div",{class:c.e("line")},null)]),e.createVNode("div",{class:c.e("content")},[e.createVNode("span",{class:c.e("title")},[o.value]),n.value&&e.createVNode("span",{class:c.e("description")},[n.value])])])])}}),j={title:"Steps \u6B65\u9AA4\u6761",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(a){a.component(C.name,C),a.component(V.name,V)}};d.Step=V,d.Steps=C,d.default=j,d.stepProps=x,d.stepsProps=P,Object.defineProperty(d,"__esModule",{value:!0}),d[Symbol.toStringTag]="Module"});
|
package/steps/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.devui-steps{display:flex}.devui-steps.vertical{flex-direction:column;height:100%}.devui-steps.vertical .devui-step{flex-direction:row}.devui-steps.vertical .devui-step__line{width:1px;height:100%;left:12px;top:24px}.devui-steps.vertical .devui-step__content{margin-left:8px;padding-top:2px}.devui-steps.simple .devui-step{position:relative;height:36px;line-height:36px;text-align:center;background-color:var(--devui-brand-foil, #f2f2f3);color:var(--devui-text, #252b3a)}.devui-steps.simple .devui-step:not(:first-child){margin-left:18px}.devui-steps.simple .devui-step:not(:last-child){margin-right:18px}.devui-steps.simple .devui-step:not(:first-child):before{content:"";width:0;height:0;position:absolute;left:-28px;top:0;border:solid 18px transparent;border-top-color:var(--devui-brand-foil, #f2f2f3);border-right-color:var(--devui-brand-foil, #f2f2f3);border-bottom-color:var(--devui-brand-foil, #f2f2f3)}.devui-steps.simple .devui-step:after{content:"";width:0;height:0;position:absolute;right:-36px;top:0;border:solid 18px transparent;border-left-color:var(--devui-brand-foil, #f2f2f3)}.devui-steps.simple .devui-step.active{background-color:var(--devui-brand, #5e7ce0);color:var(--devui-light-text, #ffffff)}.devui-steps.simple .devui-step.active:before{border-top-color:var(--devui-brand, #5e7ce0);border-right-color:var(--devui-brand, #5e7ce0);border-bottom-color:var(--devui-brand, #5e7ce0)}.devui-steps.simple .devui-step.active:after{border-left-color:var(--devui-brand, #5e7ce0)}.devui-steps.simple .devui-step.finished{background-color:var(--devui-success, #50d4ab);color:var(--devui-light-text, #ffffff)}.devui-steps.simple .devui-step.finished:before{border-top-color:var(--devui-success, #50d4ab);border-right-color:var(--devui-success, #50d4ab);border-bottom-color:var(--devui-success, #50d4ab)}.devui-steps.simple .devui-step.finished:after{border-left-color:var(--devui-success, #50d4ab)}.devui-icon__container{display:inline-block;color:var(--devui-icon-fill, #71757f)}.devui-icon__container>*:not(:last-child){vertical-align:middle;margin-right:8px}.devui-icon__container i{vertical-align:middle;transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--disabled{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-icon--disabled i{color:var(--devui-disabled-text, #adb0b8)}.devui-icon--operable:not(.devui-icon--disabled){cursor:pointer;transition:color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--operable:not(.devui-icon--disabled) i{cursor:pointer}.devui-icon--operable:hover:not(.devui-icon--disabled){color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:hover:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-hover, var(--devui-list-item-hover-bg, #f2f2f3))}.devui-icon--operable:hover:not(.devui-icon--disabled) i{color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:active:not(.devui-icon--disabled){color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable:active:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-active, var(--devui-list-item-active-bg, #f2f5fc))}.devui-icon--operable:active:not(.devui-icon--disabled) i{color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable.devui-icon__container{height:32px;line-height:32px;padding:0 8px;margin-left:-8px;border-radius:var(--devui-border-radius, 4px);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--spin{animation:iconSpin 2.5s linear infinite}.devui-svg-icon{vertical-align:middle}@keyframes iconSpin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.devui-icon-group{display:inline-flex;align-items:center}.devui-icon-group>.devui-icon__container:not(.devui-icon--operable){padding:8px;margin-left:0}.devui-icon-group>.devui-icon__container:not(.devui-icon--operable):first-child{margin-left:-8px}.devui-icon-group>*:not(:first-child){margin-left:0}.devui-step{display:flex;flex-direction:column;flex-shrink:1}.devui-step:last-child{flex-shrink:0}.devui-step:last-child:not(.center):not(.devui-step--simple){flex-basis:auto!important}.devui-step:last-child .devui-step__line{display:none}.devui-step__dot-container{position:relative}.devui-step__content{display:flex;flex-direction:column}.devui-step__dot{display:inline-flex;justify-content:center;align-items:center;width:24px;height:24px;border-radius:50%;background-color:var(--devui-brand-foil, #f2f2f3);color:var(--devui-text, #252b3a)}.devui-step__line{position:absolute;top:12px;left:24px;width:calc(100% - 24px);height:1px;background-color:var(--devui-line, #d7d8da)}.devui-step__title{color:var(--devui-placeholder, #babbc0)}.devui-step__description{color:var(--devui-placeholder, #babbc0);font-size:12px}.devui-step.active .devui-step__dot{background-color:var(--devui-brand, #5e7ce0);color:var(--devui-light-text, #ffffff)}.devui-step.active .devui-step__title,.devui-step.active .devui-step__description{color:var(--devui-brand, #5e7ce0)}.devui-step.finished .devui-step__dot{background-color:var(--devui-success, #50d4ab)}.devui-step.finished .devui-step__title,.devui-step.finished .devui-step__description{color:var(--devui-success, #50d4ab)}.devui-step.center{text-align:center}.devui-step.center .devui-step__line{left:calc(50% + 12px)}.devui-step.wait .devui-step__dot{background-color:var(--devui-brand-foil, #f2f2f3);color:var(--devui-text, #252b3a)}.devui-step.wait .devui-step__title{color:var(--devui-placeholder, #babbc0)}.devui-step.process .devui-step__dot{background-color:var(--devui-brand, #5e7ce0);color:var(--devui-light-text, #ffffff)}.devui-step.process .devui-step__title{color:var(--devui-brand, #5e7ce0)}.devui-step.finish .devui-step__dot{background-color:var(--devui-success, #50d4ab);color:var(--devui-light-text, #ffffff)}.devui-step.finish .devui-step__title{color:var(--devui-success, #50d4ab)}.devui-step.success .devui-step__dot{background-color:var(--devui-success, #50d4ab);color:var(--devui-light-text, #ffffff)}.devui-step.success .devui-step__title{color:var(--devui-success, #50d4ab)}.devui-step.error .devui-step__dot{background-color:var(--devui-danger, #f66f6a);color:var(--devui-light-text, #ffffff)}.devui-step.error .devui-step__title{color:var(--devui-danger, #f66f6a)}
|