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
package/accordion/index.es.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { defineComponent, createVNode, mergeProps, resolveComponent, createTextVNode, reactive } from "vue";
|
|
2
|
-
var AccordionList = defineComponent({
|
|
3
|
-
name: "DAccordionList",
|
|
4
|
-
inheritAttrs: false,
|
|
5
|
-
props: {
|
|
6
|
-
data: {
|
|
7
|
-
type: Array,
|
|
8
|
-
default: null
|
|
9
|
-
},
|
|
10
|
-
deepth: {
|
|
11
|
-
type: Number,
|
|
12
|
-
default: 0
|
|
13
|
-
},
|
|
14
|
-
parent: {
|
|
15
|
-
type: Object,
|
|
16
|
-
default: null
|
|
17
|
-
},
|
|
18
|
-
innerListTemplate: Boolean
|
|
19
|
-
},
|
|
20
|
-
setup(props, ctx) {
|
|
21
|
-
return () => {
|
|
22
|
-
return (!props.innerListTemplate || props.deepth === 0) && createVNode("ul", mergeProps({
|
|
23
|
-
"class": "devui-accordion-list"
|
|
24
|
-
}, ctx.attrs), [props.data.map((item) => {
|
|
25
|
-
return createVNode("li", {
|
|
26
|
-
"class": "devui-accordion-item",
|
|
27
|
-
"key": item.title
|
|
28
|
-
}, [createVNode("div", {
|
|
29
|
-
"class": "devui-accordion-menu-item open",
|
|
30
|
-
"title": item.title
|
|
31
|
-
}, [createVNode("div", {
|
|
32
|
-
"title": item.title,
|
|
33
|
-
"class": `devui-accordion-item-title devui-over-flow-ellipsis open`
|
|
34
|
-
}, [item.title]), createVNode("div", {
|
|
35
|
-
"class": "devui-accordion-submenu devui-accordion-show-animate",
|
|
36
|
-
"style": "opacity: 1; overflow: hidden;"
|
|
37
|
-
}, [createVNode("ul", {
|
|
38
|
-
"class": "devui-accordion-list"
|
|
39
|
-
}, [item.children.map((component) => {
|
|
40
|
-
return createVNode("li", {
|
|
41
|
-
"class": "devui-accordion-item",
|
|
42
|
-
"key": component.title
|
|
43
|
-
}, [createVNode("div", {
|
|
44
|
-
"class": "devui-accordion-item-title devui-over-flow-ellipsis",
|
|
45
|
-
"style": "text-indent: 20px;",
|
|
46
|
-
"title": component.title
|
|
47
|
-
}, [createVNode(resolveComponent("router-link"), {
|
|
48
|
-
"to": component.link
|
|
49
|
-
}, {
|
|
50
|
-
default: () => [createVNode("div", {
|
|
51
|
-
"class": "devui-accordion-splitter",
|
|
52
|
-
"style": "left: 30px;"
|
|
53
|
-
}, null), component.title, component.done && createVNode("span", {
|
|
54
|
-
"class": "tag-done"
|
|
55
|
-
}, [createTextVNode("\u5DF2\u5B8C\u6210")])]
|
|
56
|
-
})])]);
|
|
57
|
-
})])])])]);
|
|
58
|
-
})]);
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
var accordion = "";
|
|
63
|
-
var Accordion = defineComponent({
|
|
64
|
-
name: "DAccordion",
|
|
65
|
-
props: {
|
|
66
|
-
data: {
|
|
67
|
-
type: Array,
|
|
68
|
-
default: null
|
|
69
|
-
},
|
|
70
|
-
titleKey: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: "title"
|
|
73
|
-
},
|
|
74
|
-
loadingKey: {
|
|
75
|
-
type: String,
|
|
76
|
-
default: "loading"
|
|
77
|
-
},
|
|
78
|
-
childrenKey: {
|
|
79
|
-
type: String,
|
|
80
|
-
default: "children"
|
|
81
|
-
},
|
|
82
|
-
disabledKey: {
|
|
83
|
-
type: String,
|
|
84
|
-
default: "disabled"
|
|
85
|
-
},
|
|
86
|
-
activeKey: {
|
|
87
|
-
type: String,
|
|
88
|
-
default: "active"
|
|
89
|
-
},
|
|
90
|
-
openKey: {
|
|
91
|
-
type: String,
|
|
92
|
-
default: "open"
|
|
93
|
-
},
|
|
94
|
-
menuItemTemplate: {
|
|
95
|
-
type: String,
|
|
96
|
-
default: ""
|
|
97
|
-
},
|
|
98
|
-
itemTemplate: {
|
|
99
|
-
type: String,
|
|
100
|
-
default: ""
|
|
101
|
-
},
|
|
102
|
-
menuToggle: {
|
|
103
|
-
type: Function,
|
|
104
|
-
default: null
|
|
105
|
-
},
|
|
106
|
-
itemClick: {
|
|
107
|
-
type: Function,
|
|
108
|
-
default: null
|
|
109
|
-
},
|
|
110
|
-
activeItemChange: {
|
|
111
|
-
type: Function,
|
|
112
|
-
default: null
|
|
113
|
-
},
|
|
114
|
-
restrictOneOpen: {
|
|
115
|
-
type: Boolean,
|
|
116
|
-
default: false
|
|
117
|
-
},
|
|
118
|
-
autoOpenActiveMenu: {
|
|
119
|
-
type: Boolean,
|
|
120
|
-
default: false
|
|
121
|
-
},
|
|
122
|
-
showNoContent: {
|
|
123
|
-
type: Boolean,
|
|
124
|
-
default: true
|
|
125
|
-
},
|
|
126
|
-
noContentTemplate: {
|
|
127
|
-
type: String,
|
|
128
|
-
default: ""
|
|
129
|
-
},
|
|
130
|
-
loadingTemplate: {
|
|
131
|
-
type: String,
|
|
132
|
-
default: ""
|
|
133
|
-
},
|
|
134
|
-
innerListTemplate: {
|
|
135
|
-
type: String,
|
|
136
|
-
default: ""
|
|
137
|
-
},
|
|
138
|
-
linkType: {
|
|
139
|
-
type: String,
|
|
140
|
-
default: ""
|
|
141
|
-
},
|
|
142
|
-
linkTypeKey: {
|
|
143
|
-
type: String,
|
|
144
|
-
default: "linkType"
|
|
145
|
-
},
|
|
146
|
-
linkKey: {
|
|
147
|
-
type: String,
|
|
148
|
-
default: "link"
|
|
149
|
-
},
|
|
150
|
-
linkTargetKey: {
|
|
151
|
-
type: String,
|
|
152
|
-
default: "target"
|
|
153
|
-
},
|
|
154
|
-
linkDefaultTarget: {
|
|
155
|
-
type: String,
|
|
156
|
-
default: "_self"
|
|
157
|
-
},
|
|
158
|
-
accordionType: {
|
|
159
|
-
type: String,
|
|
160
|
-
default: "normal"
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
setup(props) {
|
|
164
|
-
const {
|
|
165
|
-
data,
|
|
166
|
-
accordionType
|
|
167
|
-
} = reactive(props);
|
|
168
|
-
return () => {
|
|
169
|
-
return createVNode("div", {
|
|
170
|
-
"class": `devui-accordion-menu devui-scrollbar ${accordionType === "normal" ? "devui-accordion-menu-normal" : ""}`
|
|
171
|
-
}, [createVNode(AccordionList, mergeProps({
|
|
172
|
-
"data": data,
|
|
173
|
-
"deepth": 0,
|
|
174
|
-
"parent": null
|
|
175
|
-
}, props), null)]);
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
Accordion.install = function(app) {
|
|
180
|
-
app.component(Accordion.name, Accordion);
|
|
181
|
-
};
|
|
182
|
-
var index = {
|
|
183
|
-
title: "Accordion \u624B\u98CE\u7434",
|
|
184
|
-
category: "\u5BFC\u822A",
|
|
185
|
-
status: "10%",
|
|
186
|
-
install(app) {
|
|
187
|
-
app.use(Accordion);
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
export { Accordion, index as default };
|
package/accordion/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(i,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis!="undefined"?globalThis:i||self,e(i.index={},i.Vue))})(this,function(i,e){"use strict";var o=e.defineComponent({name:"DAccordionList",inheritAttrs:!1,props:{data:{type:Array,default:null},deepth:{type:Number,default:0},parent:{type:Object,default:null},innerListTemplate:Boolean},setup(t,d){return()=>(!t.innerListTemplate||t.deepth===0)&&e.createVNode("ul",e.mergeProps({class:"devui-accordion-list"},d.attrs),[t.data.map(n=>e.createVNode("li",{class:"devui-accordion-item",key:n.title},[e.createVNode("div",{class:"devui-accordion-menu-item open",title:n.title},[e.createVNode("div",{title:n.title,class:"devui-accordion-item-title devui-over-flow-ellipsis open"},[n.title]),e.createVNode("div",{class:"devui-accordion-submenu devui-accordion-show-animate",style:"opacity: 1; overflow: hidden;"},[e.createVNode("ul",{class:"devui-accordion-list"},[n.children.map(a=>e.createVNode("li",{class:"devui-accordion-item",key:a.title},[e.createVNode("div",{class:"devui-accordion-item-title devui-over-flow-ellipsis",style:"text-indent: 20px;",title:a.title},[e.createVNode(e.resolveComponent("router-link"),{to:a.link},{default:()=>[e.createVNode("div",{class:"devui-accordion-splitter",style:"left: 30px;"},null),a.title,a.done&&e.createVNode("span",{class:"tag-done"},[e.createTextVNode("\u5DF2\u5B8C\u6210")])]})])]))])])])]))])}}),c="",l=e.defineComponent({name:"DAccordion",props:{data:{type:Array,default:null},titleKey:{type:String,default:"title"},loadingKey:{type:String,default:"loading"},childrenKey:{type:String,default:"children"},disabledKey:{type:String,default:"disabled"},activeKey:{type:String,default:"active"},openKey:{type:String,default:"open"},menuItemTemplate:{type:String,default:""},itemTemplate:{type:String,default:""},menuToggle:{type:Function,default:null},itemClick:{type:Function,default:null},activeItemChange:{type:Function,default:null},restrictOneOpen:{type:Boolean,default:!1},autoOpenActiveMenu:{type:Boolean,default:!1},showNoContent:{type:Boolean,default:!0},noContentTemplate:{type:String,default:""},loadingTemplate:{type:String,default:""},innerListTemplate:{type:String,default:""},linkType:{type:String,default:""},linkTypeKey:{type:String,default:"linkType"},linkKey:{type:String,default:"link"},linkTargetKey:{type:String,default:"target"},linkDefaultTarget:{type:String,default:"_self"},accordionType:{type:String,default:"normal"}},setup(t){const{data:d,accordionType:n}=e.reactive(t);return()=>e.createVNode("div",{class:`devui-accordion-menu devui-scrollbar ${n==="normal"?"devui-accordion-menu-normal":""}`},[e.createVNode(o,e.mergeProps({data:d,deepth:0,parent:null},t),null)])}});l.install=function(t){t.component(l.name,l)};var r={title:"Accordion \u624B\u98CE\u7434",category:"\u5BFC\u822A",status:"10%",install(t){t.use(l)}};i.Accordion=l,i.default=r,Object.defineProperty(i,"__esModule",{value:!0}),i[Symbol.toStringTag]="Module"});
|
package/accordion/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";:host{display:block}.devui-accordion-menu-item,d-accordion-item,d-accordion-item-hreflink,d-accordion-item-routerlink,.devui-accordion-list{display:block}.devui-accordion-menu{display:block;background:var(--devui-base-bg, #ffffff);width:100%;overflow-y:auto;border-radius:var(--devui-border-radius, 2px);height:100%}.devui-accordion-menu.devui-accordion-menu-normal{box-shadow:var(--devui-shadow-length-base, 0 1px 4px 0) var(--devui-shadow, rgba(0, 0, 0, .2))}.devui-accordion-menu>.devui-accordion-list{padding:10px 0}.devui-accordion-menu .devui-over-flow-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.devui-accordion-submenu{background:var(--devui-base-bg, #ffffff);width:100%}.devui-accordion-item-title{display:block;height:40px;width:100%;padding:0 10px 0 20px;font-weight:400;line-height:40px;color:var(--devui-text-weak, #575d6c);background:transparent;cursor:pointer}.devui-accordion-item-title.disabled{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-accordion-item-title.disabled>a{color:var(--devui-disabled-text, #adb0b8)}.devui-accordion-item-title:not(.disabled):hover{background:var(--devui-list-item-hover-bg, #f2f5fc);color:var(--devui-list-item-hover-text, #526ecc)}.devui-accordion-item-title:not(.disabled).devui-router-active,.devui-accordion-item-title:not(.disabled).active:not(.open){color:var(--devui-brand-active, #526ecc);font-weight:bold}.devui-accordion-item-title:not(.disabled).devui-router-active>a,.devui-accordion-item-title:not(.disabled).active:not(.open)>a{color:var(--devui-brand-active, #526ecc)}.devui-accordion-item-title>a{text-decoration:none;display:block;width:100%;color:var(--devui-text-weak, #575d6c)}.devui-accordion-item-title>a:hover{color:inherit;text-decoration:none}d-accordion-item-hreflink.devui-accordion-item-title,d-accordion-item-routerlink.devui-accordion-item-title{padding:0}d-accordion-item-hreflink.devui-accordion-item-title>a,d-accordion-item-routerlink.devui-accordion-item-title>a{padding:0 10px 0 20px}.devui-accordion-menu-item>.devui-accordion-item-title{position:relative}.devui-accordion-menu-item>.devui-accordion-item-title>.devui-accordion-open-icon{display:inline-block;text-indent:0;pointer-events:none;position:absolute;right:10px;top:12px;width:16px;height:16px;line-height:16px;transition:transform ease-out .3s}.devui-accordion-menu-item>.devui-accordion-item-title>.devui-accordion-open-icon>svg{width:16px;height:16px}.devui-accordion-menu-item>.devui-accordion-item-title>.devui-accordion-open-icon>svg polygon{fill:var(--devui-text-weak, #575d6c)}.devui-accordion-menu-item>.devui-accordion-item-title:not(.open).active svg polygon{fill:var(--devui-icon-fill-active, #5e7ce0)}.devui-accordion-menu-item>.devui-accordion-item-title:not(.open)>.devui-accordion-open-icon{transform:rotate(-180deg);transform-origin:center}.devui-accordion-menu-item>.devui-accordion-item-title.disabled>.devui-accordion-open-icon{color:var(--devui-disabled-text, #adb0b8)}.devui-accordion-menu-item>.devui-accordion-item-title.disabled>.devui-accordion-open-icon svg polygon{fill:var(--devui-disabled-text, #adb0b8)}.devui-accordion-menu-item>.devui-accordion-item-title{padding-right:30px}.devui-accordion-menu-item>.devui-accordion-item-title.active:not(.open){color:var(--devui-brand-active, #526ecc);background:transparent}.devui-accordion-list.devui-accordion-menu-hidden{display:none}.devui-accordion-item-title{position:relative}.devui-accordion-item-title .devui-accordion-splitter{position:absolute;display:inline-block;left:10px;width:2px;height:40px;background:var(--devui-dividing-line, #dfe1e6);vertical-align:middle}.devui-accordion-item-title .devui-accordion-splitter.devui-parent-list{background-color:transparent}.devui-accordion-item-title.devui-router-active:not(.open) .devui-accordion-splitter:before,.devui-accordion-item-title.active:not(.open) .devui-accordion-splitter:before{content:"";display:block;width:2px;height:18px;background:var(--devui-form-control-line-active, #5e7ce0);position:absolute;top:11px;left:0}.devui-accordion-list>.devui-accordion-item:first-child>.devui-accordion-item-title>a>.devui-accordion-splitter,.devui-accordion-list>.devui-accordion-item:first-child>.devui-accordion-item-title>.devui-accordion-splitter,.devui-accordion-list>.devui-accordion-item:first-child>.devui-accordion-menu-item>.devui-accordion-item-title>a>.devui-accordion-splitter,.devui-accordion-list>.devui-accordion-item:first-child>.devui-accordion-menu-item>.devui-accordion-item-title>.devui-accordion-splitter{height:28px;top:12px}.devui-accordion-list>.devui-accordion-item:first-child>.devui-accordion-item-title>a>.devui-accordion-splitter:before,.devui-accordion-list>.devui-accordion-item:first-child>.devui-accordion-item-title>.devui-accordion-splitter:before,.devui-accordion-list>.devui-accordion-item:first-child>.devui-accordion-menu-item>.devui-accordion-item-title>a>.devui-accordion-splitter:before,.devui-accordion-list>.devui-accordion-item:first-child>.devui-accordion-menu-item>.devui-accordion-item-title>.devui-accordion-splitter:before{top:0}.devui-accordion-list>.devui-accordion-item:last-child>.devui-accordion-item-title>a>.devui-accordion-splitter,.devui-accordion-list>.devui-accordion-item:last-child>.devui-accordion-item-title>.devui-accordion-splitter,.devui-accordion-list>.devui-accordion-item:last-child>.devui-accordion-menu-item>.devui-accordion-item-title>a>.devui-accordion-splitter,.devui-accordion-list>.devui-accordion-item:last-child>.devui-accordion-menu-item>.devui-accordion-item-title>.devui-accordion-splitter{height:28px;top:0}.devui-accordion-list>.devui-accordion-item:last-child>.devui-accordion-item-title>a>.devui-accordion-splitter:before,.devui-accordion-list>.devui-accordion-item:last-child>.devui-accordion-item-title>.devui-accordion-splitter:before,.devui-accordion-list>.devui-accordion-item:last-child>.devui-accordion-menu-item>.devui-accordion-item-title>a>.devui-accordion-splitter:before,.devui-accordion-list>.devui-accordion-item:last-child>.devui-accordion-menu-item>.devui-accordion-item-title>.devui-accordion-splitter:before{top:initial;bottom:0}.devui-accordion-list>.devui-accordion-item:last-child:first-child>.devui-accordion-item-title>a>.devui-accordion-splitter,.devui-accordion-list>.devui-accordion-item:last-child:first-child>.devui-accordion-item-title>.devui-accordion-splitter,.devui-accordion-list>.devui-accordion-item:last-child:first-child>.devui-accordion-menu-item>.devui-accordion-item-title>a>.devui-accordion-splitter,.devui-accordion-list>.devui-accordion-item:last-child:first-child>.devui-accordion-menu-item>.devui-accordion-item-title>.devui-accordion-splitter{height:18px;top:11px}.devui-accordion-item>a{padding:0 10px 0 20px;color:var(--devui-text-weak, #575d6c);display:block;text-decoration:none;width:100%}.devui-accordion-item-title .tag-done{display:inline-block;height:18px;min-height:20px;padding:0 10px;margin-left:8px;line-height:18px;color:#fa9841;border:solid 1px #fa9841;background:var(--devui-base-bg, #ffffff);font-size:var(--devui-font-size, 12px);border-radius:var(--devui-border-radius, 2px);text-indent:0;cursor:default}
|
package/anchor/index.es.js
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import { defineComponent, createVNode, createTextVNode } from "vue";
|
|
2
|
-
var Anchor = defineComponent({
|
|
3
|
-
name: "DAnchor",
|
|
4
|
-
props: {},
|
|
5
|
-
setup() {
|
|
6
|
-
return () => {
|
|
7
|
-
return createVNode("div", null, [createTextVNode(" ")]);
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
let repeatCount = 0;
|
|
12
|
-
let cTimeout;
|
|
13
|
-
const timeoutIntervalSpeed = 10;
|
|
14
|
-
let hashName;
|
|
15
|
-
let scollFlag = false;
|
|
16
|
-
function elementPosition(obj) {
|
|
17
|
-
let curleft = 0, curtop = 0;
|
|
18
|
-
curleft = obj.offsetLeft;
|
|
19
|
-
curtop = obj.offsetTop;
|
|
20
|
-
return { x: curleft, y: curtop };
|
|
21
|
-
}
|
|
22
|
-
function scrollToControl(elem, container) {
|
|
23
|
-
hashName = elem.getAttribute("name");
|
|
24
|
-
scollFlag = true;
|
|
25
|
-
const tops = container.scrollTop >= 0 ? container.scrollTop : -document.getElementsByClassName("mycontainer")[0].offsetTop;
|
|
26
|
-
let scrollPos = elementPosition(elem).y - tops;
|
|
27
|
-
scrollPos = scrollPos - document.documentElement.scrollTop;
|
|
28
|
-
const remainder = scrollPos % timeoutIntervalSpeed;
|
|
29
|
-
const repeatTimes = Math.abs((scrollPos - remainder) / timeoutIntervalSpeed);
|
|
30
|
-
if (scrollPos < 0 && container || elem.getBoundingClientRect().top < container.offsetTop) {
|
|
31
|
-
window.scrollBy(0, elem.getBoundingClientRect().top - container.offsetTop - 16);
|
|
32
|
-
}
|
|
33
|
-
scrollSmoothly(scrollPos, repeatTimes, container);
|
|
34
|
-
}
|
|
35
|
-
function scrollSmoothly(scrollPos, repeatTimes, container) {
|
|
36
|
-
if (repeatCount <= repeatTimes) {
|
|
37
|
-
scrollPos > 0 ? container.scrollBy(0, timeoutIntervalSpeed) : container.scrollBy(0, -timeoutIntervalSpeed);
|
|
38
|
-
} else {
|
|
39
|
-
repeatCount = 0;
|
|
40
|
-
clearTimeout(cTimeout);
|
|
41
|
-
history.replaceState(null, null, document.location.pathname + "#" + hashName);
|
|
42
|
-
hightLightFn(hashName);
|
|
43
|
-
setTimeout(() => {
|
|
44
|
-
scollFlag = false;
|
|
45
|
-
}, 310);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
repeatCount++;
|
|
49
|
-
cTimeout = setTimeout(() => {
|
|
50
|
-
scrollSmoothly(scrollPos, repeatTimes, container);
|
|
51
|
-
}, 10);
|
|
52
|
-
}
|
|
53
|
-
function hightLightFn(hashName2) {
|
|
54
|
-
const childLength = document.getElementsByClassName("mysidebar")[0].children.length;
|
|
55
|
-
for (let i = 0; i < childLength; i++) {
|
|
56
|
-
if (document.getElementsByClassName("mysidebar")[0].children[i].classList.value.indexOf("active") > -1) {
|
|
57
|
-
document.getElementsByClassName("mysidebar")[0].children[i].classList.remove("active");
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
document.getElementById(hashName2).classList.add("active");
|
|
61
|
-
}
|
|
62
|
-
let activeLink = null;
|
|
63
|
-
let rootActiveLink = null;
|
|
64
|
-
let rootClassName = "";
|
|
65
|
-
const setActiveLink = (timeId) => {
|
|
66
|
-
if (scollFlag) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
timeId ? rootClassName = timeId : rootClassName = document.getElementsByClassName("mymain")[0].id;
|
|
70
|
-
const sidebarLinks = getSidebarLinks(rootClassName);
|
|
71
|
-
const anchors = getAnchors(sidebarLinks);
|
|
72
|
-
try {
|
|
73
|
-
anchors.forEach((index2, i) => {
|
|
74
|
-
const anchor2 = anchors[i];
|
|
75
|
-
const nextAnchor = anchors[i + 1];
|
|
76
|
-
const [isActive, hash] = isAnchorActive(i, anchor2, nextAnchor);
|
|
77
|
-
if (isActive) {
|
|
78
|
-
history.replaceState(null, document.title, hash ? hash : " ");
|
|
79
|
-
activateLink(hash);
|
|
80
|
-
throw Error(hash + "");
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
} catch (e) {
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
function throttleAndDebounce(fn, delay) {
|
|
87
|
-
let timeout;
|
|
88
|
-
let called = false;
|
|
89
|
-
return () => {
|
|
90
|
-
if (timeout) {
|
|
91
|
-
clearTimeout(timeout);
|
|
92
|
-
}
|
|
93
|
-
if (!called) {
|
|
94
|
-
fn();
|
|
95
|
-
called = true;
|
|
96
|
-
setTimeout(() => {
|
|
97
|
-
called = false;
|
|
98
|
-
}, delay);
|
|
99
|
-
} else {
|
|
100
|
-
timeout = setTimeout(fn, delay);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
const onScroll = throttleAndDebounce(setActiveLink, 300);
|
|
105
|
-
function activateLink(hash) {
|
|
106
|
-
deactiveLink(activeLink);
|
|
107
|
-
deactiveLink(rootActiveLink);
|
|
108
|
-
hash ? activeLink = document.querySelector(`${hash}`) : activeLink = document.querySelector(`.${rootClassName} ul li`);
|
|
109
|
-
if (!activeLink) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
if (!scollFlag) {
|
|
113
|
-
hash && hightLightFn(hash.split("#")[1]);
|
|
114
|
-
} else {
|
|
115
|
-
hightLightFn(hashName);
|
|
116
|
-
}
|
|
117
|
-
const rootLi = activeLink.closest(".mycontainer > ul > li");
|
|
118
|
-
if (rootLi && rootLi !== activeLink.parentElement) {
|
|
119
|
-
rootActiveLink = rootLi;
|
|
120
|
-
rootActiveLink && rootActiveLink.classList.add("active");
|
|
121
|
-
} else {
|
|
122
|
-
rootActiveLink = null;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
function deactiveLink(link) {
|
|
126
|
-
link && link.classList.remove("active");
|
|
127
|
-
}
|
|
128
|
-
function getPageOffset() {
|
|
129
|
-
return document.querySelector(".mysidebar ").getBoundingClientRect().y;
|
|
130
|
-
}
|
|
131
|
-
function getAnchorTop(anchor2) {
|
|
132
|
-
const pageOffset = getPageOffset();
|
|
133
|
-
return anchor2.parentElement.offsetTop - pageOffset - 5;
|
|
134
|
-
}
|
|
135
|
-
function isAnchorActive(index2, anchor2, nextAnchor) {
|
|
136
|
-
let scrollTop;
|
|
137
|
-
document.getElementsByClassName("scrollTarget").length ? scrollTop = document.getElementsByClassName("scrollTarget")[0].scrollTop : scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
138
|
-
if (index2 === 0 && scrollTop === 0) {
|
|
139
|
-
return [true, null];
|
|
140
|
-
}
|
|
141
|
-
if (scrollTop < getAnchorTop(anchor2)) {
|
|
142
|
-
return [false, null];
|
|
143
|
-
}
|
|
144
|
-
if (!nextAnchor || scrollTop < getAnchorTop(nextAnchor)) {
|
|
145
|
-
return [true, decodeURIComponent(anchor2.hash)];
|
|
146
|
-
}
|
|
147
|
-
return [false, null];
|
|
148
|
-
}
|
|
149
|
-
function getSidebarLinks(rootClassName2) {
|
|
150
|
-
return [].slice.call(document.querySelectorAll(`.${rootClassName2} > .step-nav > li.bar-link-item > a`));
|
|
151
|
-
}
|
|
152
|
-
function getAnchors(sidebarLinks) {
|
|
153
|
-
return [].slice.call(document.querySelectorAll(".box-anchor")).filter((anchor2) => sidebarLinks.some((sidebarLink) => sidebarLink.hash === anchor2.hash));
|
|
154
|
-
}
|
|
155
|
-
const randomId = function(n = 8) {
|
|
156
|
-
const str = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
157
|
-
let result = "";
|
|
158
|
-
for (let i = 0; i < n; i++) {
|
|
159
|
-
result += str[parseInt((Math.random() * str.length).toString())];
|
|
160
|
-
}
|
|
161
|
-
return result;
|
|
162
|
-
};
|
|
163
|
-
const inBrowser = typeof window !== "undefined";
|
|
164
|
-
var dAnchorBox = {
|
|
165
|
-
name: "d-anchor-box",
|
|
166
|
-
mounted(el) {
|
|
167
|
-
const timeId = "m" + randomId(8);
|
|
168
|
-
el.id = timeId;
|
|
169
|
-
const classList = el.classList;
|
|
170
|
-
classList.add("mycontainer", "mymain", timeId);
|
|
171
|
-
let windoScrollTop;
|
|
172
|
-
const div = document.querySelector(`#${timeId}`);
|
|
173
|
-
const mysidebar = document.querySelector(`#${timeId} .mysidebar`);
|
|
174
|
-
const mysidebarHeight = mysidebar.clientHeight;
|
|
175
|
-
window.addEventListener("resize", () => {
|
|
176
|
-
cssChange(mysidebar, "absolute", 0, 0);
|
|
177
|
-
});
|
|
178
|
-
window.onscroll = function() {
|
|
179
|
-
windoScrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
180
|
-
if (!document.getElementsByClassName("scrollTarget").length) {
|
|
181
|
-
if (windoScrollTop + mysidebarHeight - 16 >= div.offsetTop + div.clientHeight) {
|
|
182
|
-
cssChange(mysidebar, "absolute", div.clientHeight - mysidebarHeight - 8, 0);
|
|
183
|
-
} else if (windoScrollTop > div.offsetTop) {
|
|
184
|
-
cssChange(mysidebar, "fixed", div.offsetTop, div.getBoundingClientRect().left);
|
|
185
|
-
} else if (div.offsetTop >= windoScrollTop && windoScrollTop >= 0) {
|
|
186
|
-
cssChange(mysidebar, "absolute", 0, 0);
|
|
187
|
-
} else {
|
|
188
|
-
cssChange(mysidebar, "absolute", div.clientHeight - mysidebarHeight - 8, 0);
|
|
189
|
-
}
|
|
190
|
-
} else {
|
|
191
|
-
cssChange(mysidebar, "absolute", div.scrollTop, 0);
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
addEvent(div, "scroll", function() {
|
|
195
|
-
if (document.getElementsByClassName("scrollTarget").length) {
|
|
196
|
-
cssChange(mysidebar, "fixed", div.getBoundingClientRect().top, div.getBoundingClientRect().left);
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
setActiveLink(timeId);
|
|
200
|
-
document.getElementsByClassName("scrollTarget").length ? addEvent(div, "scroll", onScroll) : window.addEventListener("scroll", onScroll);
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
const cssChange = (mysidebar, postion, top, left) => {
|
|
204
|
-
mysidebar.style.position = postion;
|
|
205
|
-
mysidebar.style.top = top + "px";
|
|
206
|
-
mysidebar.style.left = left + "px";
|
|
207
|
-
};
|
|
208
|
-
const addEvent = function() {
|
|
209
|
-
if (inBrowser && window.addEventListener) {
|
|
210
|
-
return function(elm, type, handle) {
|
|
211
|
-
elm.addEventListener(type, handle, false);
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
}();
|
|
215
|
-
var dAnchorLink = {
|
|
216
|
-
name: "d-anchor-link",
|
|
217
|
-
mounted(el, binding) {
|
|
218
|
-
const parent = el.parentNode;
|
|
219
|
-
if (!parent.className) {
|
|
220
|
-
parent.className = "mysidebar step-nav";
|
|
221
|
-
}
|
|
222
|
-
el.className = "bar-link-item";
|
|
223
|
-
el.innerHTML += '<a class="d-d-anchor" style="display:none" href="#' + binding.value + '">?</a>';
|
|
224
|
-
el.setAttribute("id", binding.value);
|
|
225
|
-
el.onclick = () => {
|
|
226
|
-
let scrollContainer;
|
|
227
|
-
const scollToDomY = document.getElementsByName(binding.value)[0];
|
|
228
|
-
document.getElementsByClassName("scrollTarget").length ? scrollContainer = document.getElementsByClassName("scrollTarget")[0] : scrollContainer = window;
|
|
229
|
-
scrollToControl(scollToDomY, scrollContainer);
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
var dAnchor = {
|
|
234
|
-
name: "d-anchor",
|
|
235
|
-
mounted(el, binding) {
|
|
236
|
-
const parent = el.parentNode;
|
|
237
|
-
if (!parent.className) {
|
|
238
|
-
parent.className = "mycontent";
|
|
239
|
-
}
|
|
240
|
-
el.innerHTML = '<a class="box-anchor" style="display:none" href="#' + binding.value + '">?</a>' + el.innerHTML;
|
|
241
|
-
el.className = "section-block";
|
|
242
|
-
el.setAttribute("name", binding.value);
|
|
243
|
-
el.onclick = (e) => {
|
|
244
|
-
hightLightFn(binding.value);
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
var anchor = "";
|
|
249
|
-
Anchor.install = function(Vue) {
|
|
250
|
-
Vue.directive(dAnchor.name, dAnchor);
|
|
251
|
-
Vue.directive(dAnchorLink.name, dAnchorLink);
|
|
252
|
-
Vue.directive(dAnchorBox.name, dAnchorBox);
|
|
253
|
-
Vue.component(Anchor.name, Anchor);
|
|
254
|
-
};
|
|
255
|
-
var index = {
|
|
256
|
-
title: "Anchor \u951A\u70B9",
|
|
257
|
-
category: "\u5BFC\u822A",
|
|
258
|
-
status: "50%",
|
|
259
|
-
install(app) {
|
|
260
|
-
app.use(Anchor);
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
export { Anchor, index as default };
|
package/anchor/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(c,r){typeof exports=="object"&&typeof module!="undefined"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(c=typeof globalThis!="undefined"?globalThis:c||self,r(c.index={},c.Vue))})(this,function(c,r){"use strict";var u=r.defineComponent({name:"DAnchor",props:{},setup(){return()=>r.createVNode("div",null,[r.createTextVNode(" ")])}});let v=0,B;const f=10;let p,h=!1;function k(e){let t=0,n=0;return t=e.offsetLeft,n=e.offsetTop,{x:t,y:n}}function q(e,t){p=e.getAttribute("name"),h=!0;const n=t.scrollTop>=0?t.scrollTop:-document.getElementsByClassName("mycontainer")[0].offsetTop;let o=k(e).y-n;o=o-document.documentElement.scrollTop;const l=o%f,s=Math.abs((o-l)/f);(o<0&&t||e.getBoundingClientRect().top<t.offsetTop)&&window.scrollBy(0,e.getBoundingClientRect().top-t.offsetTop-16),L(o,s,t)}function L(e,t,n){if(v<=t)e>0?n.scrollBy(0,f):n.scrollBy(0,-f);else{v=0,clearTimeout(B),history.replaceState(null,null,document.location.pathname+"#"+p),y(p),setTimeout(()=>{h=!1},310);return}v++,B=setTimeout(()=>{L(e,t,n)},10)}function y(e){const t=document.getElementsByClassName("mysidebar")[0].children.length;for(let n=0;n<t;n++)document.getElementsByClassName("mysidebar")[0].children[n].classList.value.indexOf("active")>-1&&document.getElementsByClassName("mysidebar")[0].children[n].classList.remove("active");document.getElementById(e).classList.add("active")}let a=null,d=null,g="";const C=e=>{if(h)return;e?g=e:g=document.getElementsByClassName("mymain")[0].id;const t=$(g),n=O(t);try{n.forEach((o,l)=>{const s=n[l],m=n[l+1],[j,T]=I(l,s,m);if(j)throw history.replaceState(null,document.title,T||" "),M(T),Error(T+"")})}catch{}};function H(e,t){let n,o=!1;return()=>{n&&clearTimeout(n),o?n=setTimeout(e,t):(e(),o=!0,setTimeout(()=>{o=!1},t))}}const E=H(C,300);function M(e){if(N(a),N(d),e?a=document.querySelector(`${e}`):a=document.querySelector(`.${g} ul li`),!a)return;h?y(p):e&&y(e.split("#")[1]);const t=a.closest(".mycontainer > ul > li");t&&t!==a.parentElement?(d=t,d&&d.classList.add("active")):d=null}function N(e){e&&e.classList.remove("active")}function R(){return document.querySelector(".mysidebar ").getBoundingClientRect().y}function b(e){const t=R();return e.parentElement.offsetTop-t-5}function I(e,t,n){let o;return document.getElementsByClassName("scrollTarget").length?o=document.getElementsByClassName("scrollTarget")[0].scrollTop:o=document.documentElement.scrollTop||document.body.scrollTop,e===0&&o===0?[!0,null]:o<b(t)?[!1,null]:!n||o<b(n)?[!0,decodeURIComponent(t.hash)]:[!1,null]}function $(e){return[].slice.call(document.querySelectorAll(`.${e} > .step-nav > li.bar-link-item > a`))}function O(e){return[].slice.call(document.querySelectorAll(".box-anchor")).filter(t=>e.some(n=>n.hash===t.hash))}const D=function(e=8){const t="abcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let o=0;o<e;o++)n+=t[parseInt((Math.random()*t.length).toString())];return n},F=typeof window!="undefined";var A={name:"d-anchor-box",mounted(e){const t="m"+D(8);e.id=t,e.classList.add("mycontainer","mymain",t);let o;const l=document.querySelector(`#${t}`),s=document.querySelector(`#${t} .mysidebar`),m=s.clientHeight;window.addEventListener("resize",()=>{i(s,"absolute",0,0)}),window.onscroll=function(){o=document.documentElement.scrollTop||document.body.scrollTop,document.getElementsByClassName("scrollTarget").length?i(s,"absolute",l.scrollTop,0):o+m-16>=l.offsetTop+l.clientHeight?i(s,"absolute",l.clientHeight-m-8,0):o>l.offsetTop?i(s,"fixed",l.offsetTop,l.getBoundingClientRect().left):l.offsetTop>=o&&o>=0?i(s,"absolute",0,0):i(s,"absolute",l.clientHeight-m-8,0)},w(l,"scroll",function(){document.getElementsByClassName("scrollTarget").length&&i(s,"fixed",l.getBoundingClientRect().top,l.getBoundingClientRect().left)}),C(t),document.getElementsByClassName("scrollTarget").length?w(l,"scroll",E):window.addEventListener("scroll",E)}};const i=(e,t,n,o)=>{e.style.position=t,e.style.top=n+"px",e.style.left=o+"px"},w=function(){if(F&&window.addEventListener)return function(e,t,n){e.addEventListener(t,n,!1)}}();var S={name:"d-anchor-link",mounted(e,t){const n=e.parentNode;n.className||(n.className="mysidebar step-nav"),e.className="bar-link-item",e.innerHTML+='<a class="d-d-anchor" style="display:none" href="#'+t.value+'">?</a>',e.setAttribute("id",t.value),e.onclick=()=>{let o;const l=document.getElementsByName(t.value)[0];document.getElementsByClassName("scrollTarget").length?o=document.getElementsByClassName("scrollTarget")[0]:o=window,q(l,o)}}},x={name:"d-anchor",mounted(e,t){const n=e.parentNode;n.className||(n.className="mycontent"),e.innerHTML='<a class="box-anchor" style="display:none" href="#'+t.value+'">?</a>'+e.innerHTML,e.className="section-block",e.setAttribute("name",t.value),e.onclick=o=>{y(t.value)}}},z="";u.install=function(e){e.directive(x.name,x),e.directive(S.name,S),e.directive(A.name,A),e.component(u.name,u)};var P={title:"Anchor \u951A\u70B9",category:"\u5BFC\u822A",status:"50%",install(e){e.use(u)}};c.Anchor=u,c.default=P,Object.defineProperty(c,"__esModule",{value:!0}),c[Symbol.toStringTag]="Module"});
|
package/anchor/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.mysidebar{width:240px;position:absolute;top:0;left:0;height:auto}.scrollTarget{height:450px!important;overflow-y:auto}.mycontainer{height:auto}.devui-scrollbar::-webkit-scrollbar{width:8px;height:8px}.devui-scrollbar::-webkit-scrollbar-track{background-color:transparent}.devui-scrollbar::-webkit-scrollbar-thumb{border-radius:8px;background-color:#adb0b8;background-color:var(--devui-line, #adb0b8)}.devui-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#8a8e99;background-color:var(--devui-placeholder, #8a8e99)}body>* ::-webkit-scrollbar{width:8px;height:8px}body>* ::-webkit-scrollbar-track{background-color:transparent}body>* ::-webkit-scrollbar-thumb{border-radius:8px;background-color:#adb0b8;background-color:var(--devui-line, #adb0b8)}body>* ::-webkit-scrollbar-thumb:hover{background-color:#8a8e99;background-color:var(--devui-placeholder, #8a8e99)}body>* ::-webkit-scrollbar-corner{background-color:transparent}.step-nav{padding-top:8px;width:240px}.step-nav>li{list-style:none;counter-increment:stepli;padding:0;cursor:pointer;height:30px;line-height:1.5;font-size:12px;font-size:var(--devui-font-size, 12px);color:#575d6c;color:var(--devui-text-weak, #575d6c);position:relative;display:flex;align-items:center}.step-nav>li.active,.step-nav>li:hover{color:#526ecc;color:var(--devui-brand-active, #526ecc)}.step-nav>li.active:before{border-color:#526ecc;border-color:var(--devui-brand-active, #526ecc)}.step-nav>li:before{content:"";display:inline-block;width:12px;height:12px;text-align:center;line-height:26px;border-radius:50%;background-color:#fff;background-color:var(--devui-base-bg, #ffffff);margin-right:20px;border:2px solid #dfe1e6;border:2px solid var(--devui-dividing-line, #dfe1e6)}.step-nav>li:not(:first-of-type){margin-top:32px}.step-nav>li:not(:first-of-type):after{content:"";display:block;position:absolute;top:-32px;left:5px;width:1px;height:32px;border-left:2px solid #dfe1e6;border-left:2px solid var(--devui-dividing-line, #dfe1e6)}.mymain{position:relative}.mycontent{padding:8px;margin-left:240px;border-left:1px solid #adb0b8;border-left:1px solid var(--devui-line, #adb0b8)}.section-block{min-height:200px;border-bottom:1px dashed #adb0b8;border-bottom:1px dashed var(--devui-line, #adb0b8)}.section-block.active.anchor-active-by-anchor-link{-webkit-animation:hightlight-and-disapear 3s linear 1;animation:hightlight-and-disapear 3s linear 1}@-webkit-keyframes hightlight-and-disapear{0%{outline:medium none invert}2%{outline:0 none rgba(255,255,255,0)}10%{outline:1px solid #5e7ce0;outline:1px solid var(--devui-brand, #5e7ce0)}50%{outline:1px solid #5e7ce0;outline:1px solid var(--devui-brand, #5e7ce0)}90%{outline:1px solid rgba(255,255,255,0)}99%{outline:0 none rgba(255,255,255,0)}to{outline:medium none invert}}@keyframes hightlight-and-disapear{0%{outline:medium none invert}2%{outline:0 none rgba(255,255,255,0)}10%{outline:1px solid #5e7ce0;outline:1px solid var(--devui-brand, #5e7ce0)}50%{outline:1px solid #5e7ce0;outline:1px solid var(--devui-brand, #5e7ce0)}90%{outline:1px solid rgba(255,255,255,0)}99%{outline:0 none rgba(255,255,255,0)}to{outline:medium none invert}}
|
package/breadcrumb/index.es.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, getCurrentInstance, onMounted, onBeforeUnmount, createVNode, provide, resolveComponent } from "vue";
|
|
2
|
-
const breadcrumbProps = {
|
|
3
|
-
source: {
|
|
4
|
-
type: Array,
|
|
5
|
-
default: []
|
|
6
|
-
},
|
|
7
|
-
separatorIcon: {
|
|
8
|
-
type: String
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
const breadcrumbItemProps = {
|
|
12
|
-
showMenu: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
},
|
|
16
|
-
menuList: {
|
|
17
|
-
type: Array
|
|
18
|
-
},
|
|
19
|
-
isSearch: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
dafault: false
|
|
22
|
-
},
|
|
23
|
-
to: {
|
|
24
|
-
type: [String, Object],
|
|
25
|
-
default: ""
|
|
26
|
-
},
|
|
27
|
-
replace: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: false
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
var breadcrumbItem = "";
|
|
33
|
-
var BreadcrumbItem = defineComponent({
|
|
34
|
-
name: "DBreadcrumbItem",
|
|
35
|
-
props: breadcrumbItemProps,
|
|
36
|
-
setup(props, {
|
|
37
|
-
slots
|
|
38
|
-
}) {
|
|
39
|
-
const separatorIcon = inject("separatorIcon");
|
|
40
|
-
const linkClass = props.to ? "is-link" : "";
|
|
41
|
-
const link = ref(null);
|
|
42
|
-
const instance = getCurrentInstance();
|
|
43
|
-
const router = instance.appContext.config.globalProperties.$router;
|
|
44
|
-
const handleClickLink = () => {
|
|
45
|
-
if (!props.to || !router)
|
|
46
|
-
return;
|
|
47
|
-
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
48
|
-
};
|
|
49
|
-
onMounted(() => {
|
|
50
|
-
link.value.addEventListener("click", handleClickLink);
|
|
51
|
-
});
|
|
52
|
-
onBeforeUnmount(() => {
|
|
53
|
-
link.value.removeEventListener("click", handleClickLink);
|
|
54
|
-
});
|
|
55
|
-
return () => {
|
|
56
|
-
const renderBreadcrumbSperator = () => {
|
|
57
|
-
return createVNode("span", {
|
|
58
|
-
"class": "devui-breadcrumb-separator"
|
|
59
|
-
}, [separatorIcon]);
|
|
60
|
-
};
|
|
61
|
-
return createVNode("div", {
|
|
62
|
-
"class": "devui-breadcrumb-item"
|
|
63
|
-
}, [createVNode("span", {
|
|
64
|
-
"ref": link,
|
|
65
|
-
"class": linkClass
|
|
66
|
-
}, [slots == null ? void 0 : slots.default()]), renderBreadcrumbSperator()]);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
function getPropsSlot(slots, props, prop = "default") {
|
|
71
|
-
var _a, _b;
|
|
72
|
-
return (_b = props[prop]) != null ? _b : (_a = slots[prop]) == null ? void 0 : _a.call(slots);
|
|
73
|
-
}
|
|
74
|
-
var breadcrumb = "";
|
|
75
|
-
var Breadcrumb = defineComponent({
|
|
76
|
-
name: "DBreadcrumb",
|
|
77
|
-
components: {
|
|
78
|
-
DBreadcrumbItem: BreadcrumbItem
|
|
79
|
-
},
|
|
80
|
-
props: breadcrumbProps,
|
|
81
|
-
setup(props, {
|
|
82
|
-
slots
|
|
83
|
-
}) {
|
|
84
|
-
var _a;
|
|
85
|
-
const separatorIcon = (_a = getPropsSlot(slots, props, "separatorIcon")) != null ? _a : "/";
|
|
86
|
-
provide("separatorIcon", separatorIcon);
|
|
87
|
-
const renderBreadcrumbItemRouted = (item) => {
|
|
88
|
-
return createVNode(resolveComponent("d-breadcrumb-item"), {
|
|
89
|
-
"to": `path: ${item.link}`,
|
|
90
|
-
"replace": item.replace
|
|
91
|
-
}, {
|
|
92
|
-
default: () => [item.title]
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
const renderBreadItemList = (source) => {
|
|
96
|
-
return source.map((item) => {
|
|
97
|
-
if (!item.noNavigation && item.linkType === "routerLink") {
|
|
98
|
-
return renderBreadcrumbItemRouted(item);
|
|
99
|
-
}
|
|
100
|
-
return createVNode(resolveComponent("d-breadcrumb-item"), null, {
|
|
101
|
-
default: () => [!item.noNavigation && (!item.linkType || item.linkType === "hrefLink") ? createVNode("a", {
|
|
102
|
-
"href": item.link,
|
|
103
|
-
"target": item.target ? item.target : "_self"
|
|
104
|
-
}, [item.title]) : null, item.noNavigation ? createVNode("span", null, [item.title]) : null]
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
return () => {
|
|
109
|
-
return createVNode("div", {
|
|
110
|
-
"class": "devui-breadcrumb"
|
|
111
|
-
}, [props.source && props.source.length ? renderBreadItemList(props.source) : slots == null ? void 0 : slots.default()]);
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
Breadcrumb.install = function(app) {
|
|
116
|
-
app.component(Breadcrumb.name, Breadcrumb);
|
|
117
|
-
app.component(BreadcrumbItem.name, BreadcrumbItem);
|
|
118
|
-
};
|
|
119
|
-
var index = {
|
|
120
|
-
title: "Breadcrumb \u9762\u5305\u5C51",
|
|
121
|
-
category: "\u5BFC\u822A",
|
|
122
|
-
status: "50%",
|
|
123
|
-
install(app) {
|
|
124
|
-
app.use(Breadcrumb);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
export { Breadcrumb, index as default };
|
package/breadcrumb/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(a,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(a=typeof globalThis!="undefined"?globalThis:a||self,e(a.index={},a.Vue))})(this,function(a,e){"use strict";const f={source:{type:Array,default:[]},separatorIcon:{type:String}},p={showMenu:{type:Boolean,default:!1},menuList:{type:Array},isSearch:{type:Boolean,dafault:!1},to:{type:[String,Object],default:""},replace:{type:Boolean,default:!1}};var g="",l=e.defineComponent({name:"DBreadcrumbItem",props:p,setup(r,{slots:t}){const u=e.inject("separatorIcon"),d=r.to?"is-link":"",c=e.ref(null),o=e.getCurrentInstance().appContext.config.globalProperties.$router,n=()=>{!r.to||!o||(r.replace?o.replace(r.to):o.push(r.to))};return e.onMounted(()=>{c.value.addEventListener("click",n)}),e.onBeforeUnmount(()=>{c.value.removeEventListener("click",n)}),()=>{const y=()=>e.createVNode("span",{class:"devui-breadcrumb-separator"},[u]);return e.createVNode("div",{class:"devui-breadcrumb-item"},[e.createVNode("span",{ref:c,class:d},[t==null?void 0:t.default()]),y()])}}});function m(r,t,u="default"){var d,c;return(c=t[u])!=null?c:(d=r[u])==null?void 0:d.call(r)}var B="",i=e.defineComponent({name:"DBreadcrumb",components:{DBreadcrumbItem:l},props:f,setup(r,{slots:t}){var s;const u=(s=m(t,r,"separatorIcon"))!=null?s:"/";e.provide("separatorIcon",u);const d=o=>e.createVNode(e.resolveComponent("d-breadcrumb-item"),{to:`path: ${o.link}`,replace:o.replace},{default:()=>[o.title]}),c=o=>o.map(n=>!n.noNavigation&&n.linkType==="routerLink"?d(n):e.createVNode(e.resolveComponent("d-breadcrumb-item"),null,{default:()=>[!n.noNavigation&&(!n.linkType||n.linkType==="hrefLink")?e.createVNode("a",{href:n.link,target:n.target?n.target:"_self"},[n.title]):null,n.noNavigation?e.createVNode("span",null,[n.title]):null]}));return()=>e.createVNode("div",{class:"devui-breadcrumb"},[r.source&&r.source.length?c(r.source):t==null?void 0:t.default()])}});i.install=function(r){r.component(i.name,i),r.component(l.name,l)};var b={title:"Breadcrumb \u9762\u5305\u5C51",category:"\u5BFC\u822A",status:"50%",install(r){r.use(i)}};a.Breadcrumb=i,a.default=b,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
|
package/breadcrumb/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.devui-breadcrumb-font-style,.devui-breadcrumb-separator,.devui-breadcrumb-item a,.devui-breadcrumb-item{font-size:var(--devui-font-size, 12px);color:var(--devui-aide-text, #8a8e99);line-height:18px}.devui-breadcrumb-item{cursor:auto}.devui-breadcrumb-item a{cursor:pointer}.devui-breadcrumb-item a:hover{color:var(--devui-text, #252b3a);text-decoration:none}.devui-breadcrumb-item a,.devui-breadcrumb-item span{transition:color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-breadcrumb-item .is-link{cursor:pointer}.devui-breadcrumb-item .is-link:hover{color:var(--devui-text, #252b3a);text-decoration:none}.devui-breadcrumb-separator{margin:0 4px}.devui-breadcrumb{display:flex;align-items:center}.devui-breadcrumb .devui-breadcrumb-item:last-child .devui-breadcrumb-separator{display:none}
|