vue-devui 0.1.3 → 1.0.0-alpha.10
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 +161 -59
- package/alert/index.d.ts +7 -0
- package/alert/index.es.js +204 -0
- package/alert/index.umd.js +1 -0
- package/alert/package.json +7 -0
- package/alert/style.css +1 -0
- package/auto-complete/index.d.ts +7 -0
- package/auto-complete/index.es.js +9051 -0
- package/auto-complete/index.umd.js +40 -0
- package/auto-complete/package.json +7 -0
- package/auto-complete/style.css +1 -0
- package/avatar/index.d.ts +7 -0
- package/avatar/index.es.js +308 -0
- package/avatar/index.umd.js +1 -0
- package/avatar/package.json +7 -0
- package/avatar/style.css +1 -0
- package/badge/index.d.ts +7 -0
- package/badge/index.es.js +120 -0
- package/badge/index.umd.js +1 -0
- package/badge/package.json +7 -0
- package/badge/style.css +1 -0
- package/button/index.d.ts +7 -0
- package/button/index.es.js +5964 -0
- package/button/index.umd.js +27 -0
- package/button/package.json +7 -0
- package/button/style.css +1 -0
- package/card/index.d.ts +7 -0
- package/card/index.es.js +89 -0
- package/card/index.umd.js +1 -0
- package/card/package.json +7 -0
- package/card/style.css +1 -0
- package/checkbox/index.d.ts +7 -0
- package/checkbox/index.es.js +8207 -0
- package/checkbox/index.umd.js +38 -0
- package/checkbox/package.json +7 -0
- package/checkbox/style.css +1 -0
- package/collapse/index.d.ts +7 -0
- package/collapse/index.es.js +195 -0
- package/collapse/index.umd.js +1 -0
- package/collapse/package.json +7 -0
- 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/countdown/package.json +7 -0
- package/countdown/style.css +1 -0
- package/date-picker-pro/index.d.ts +7 -0
- package/date-picker-pro/index.es.js +12031 -0
- package/date-picker-pro/index.umd.js +38 -0
- package/date-picker-pro/package.json +7 -0
- package/date-picker-pro/style.css +1 -0
- package/drawer/index.d.ts +7 -0
- package/drawer/index.es.js +248 -0
- package/drawer/index.umd.js +1 -0
- package/drawer/package.json +7 -0
- package/drawer/style.css +1 -0
- package/dropdown/index.d.ts +7 -0
- package/dropdown/index.es.js +743 -0
- package/dropdown/index.umd.js +1 -0
- package/dropdown/package.json +7 -0
- package/dropdown/style.css +1 -0
- package/editable-select/index.d.ts +7 -0
- package/editable-select/index.es.js +991 -0
- package/editable-select/index.umd.js +1 -0
- package/editable-select/package.json +7 -0
- package/editable-select/style.css +1 -0
- package/form/index.d.ts +7 -0
- package/form/index.es.js +7751 -0
- package/form/index.umd.js +38 -0
- package/form/package.json +7 -0
- package/form/style.css +1 -0
- package/fullscreen/index.d.ts +7 -0
- package/fullscreen/index.es.js +166 -0
- package/fullscreen/index.umd.js +1 -0
- package/fullscreen/package.json +7 -0
- package/fullscreen/style.css +1 -0
- package/grid/index.d.ts +7 -0
- package/grid/index.es.js +271 -0
- package/grid/index.umd.js +1 -0
- package/grid/package.json +7 -0
- package/grid/style.css +1 -0
- package/icon/index.d.ts +7 -0
- package/icon/index.es.js +218 -0
- package/icon/index.umd.js +1 -0
- package/icon/package.json +7 -0
- package/icon/style.css +1 -0
- package/image-preview/index.d.ts +7 -0
- package/image-preview/index.es.js +511 -0
- package/image-preview/index.umd.js +1 -0
- package/image-preview/package.json +7 -0
- package/image-preview/style.css +1 -0
- package/index.d.ts +7 -0
- package/input/index.d.ts +7 -0
- package/input/index.es.js +8311 -0
- package/input/index.umd.js +38 -0
- package/input/package.json +7 -0
- package/input/style.css +1 -0
- package/input-number/index.d.ts +7 -0
- package/input-number/index.es.js +308 -0
- package/input-number/index.umd.js +1 -0
- package/input-number/package.json +7 -0
- package/input-number/style.css +1 -0
- package/layout/index.d.ts +7 -0
- package/layout/index.es.js +115 -0
- package/layout/index.umd.js +1 -0
- package/layout/package.json +7 -0
- package/layout/style.css +1 -0
- package/loading/index.d.ts +7 -0
- package/loading/index.es.js +272 -0
- package/loading/index.umd.js +1 -0
- package/loading/package.json +7 -0
- package/loading/style.css +1 -0
- package/message/index.d.ts +7 -0
- package/message/index.es.js +534 -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 +741 -0
- package/modal/index.umd.js +1 -0
- package/modal/package.json +7 -0
- package/modal/style.css +1 -0
- package/notification/index.d.ts +7 -0
- package/notification/index.es.js +528 -0
- package/notification/index.umd.js +1 -0
- package/notification/package.json +7 -0
- package/notification/style.css +1 -0
- package/nuxt/components/Alert.js +3 -0
- package/nuxt/components/Aside.js +3 -0
- package/nuxt/components/AutoComplete.js +3 -0
- package/nuxt/components/Avatar.js +3 -0
- package/nuxt/components/Badge.js +3 -0
- package/nuxt/components/Button.js +3 -0
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/Card.js +3 -0
- package/nuxt/components/Checkbox.js +3 -0
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/Col.js +3 -0
- package/nuxt/components/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/Column.js +3 -0
- package/nuxt/components/Content.js +3 -0
- package/nuxt/components/Countdown.js +3 -0
- package/nuxt/components/DRangeDatePickerPro.js +3 -0
- package/nuxt/components/DatePickerPro.js +3 -0
- package/nuxt/components/Drawer.js +3 -0
- package/nuxt/components/DrawerService.js +3 -0
- package/nuxt/components/Dropdown.js +3 -0
- package/nuxt/components/DropdownMenu.js +3 -0
- package/nuxt/components/DropdownPropsKey.js +3 -0
- package/nuxt/components/EditableSelect.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/FixedOverlay.js +3 -0
- package/nuxt/components/FlexibleOverlay.js +3 -0
- package/nuxt/components/Footer.js +3 -0
- package/nuxt/components/Form.js +3 -0
- package/nuxt/components/FormItem.js +3 -0
- package/nuxt/components/FormOperation.js +3 -0
- package/nuxt/components/Fullscreen.js +3 -0
- package/nuxt/components/Header.js +3 -0
- package/nuxt/components/IFileOptions.js +3 -0
- package/nuxt/components/IUploadOptions.js +3 -0
- package/nuxt/components/Icon.js +3 -0
- package/nuxt/components/IconGroup.js +3 -0
- package/nuxt/components/ImagePreviewService.js +3 -0
- package/nuxt/components/Input.js +3 -0
- package/nuxt/components/InputNumber.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/Layout.js +3 -0
- package/nuxt/components/Loading.js +3 -0
- package/nuxt/components/LoadingOptions.js +3 -0
- package/nuxt/components/LoadingService.js +3 -0
- package/nuxt/components/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/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/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/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 +293 -0
- package/overlay/index.umd.js +1 -0
- package/overlay/package.json +7 -0
- package/overlay/style.css +1 -0
- package/package.json +17 -77
- package/pagination/index.d.ts +7 -0
- package/pagination/index.es.js +820 -0
- package/pagination/index.umd.js +1 -0
- package/pagination/package.json +7 -0
- package/pagination/style.css +1 -0
- package/panel/index.d.ts +7 -0
- package/panel/index.es.js +218 -0
- package/panel/index.umd.js +1 -0
- package/panel/package.json +7 -0
- package/panel/style.css +1 -0
- package/popover/index.d.ts +7 -0
- package/popover/index.es.js +6062 -0
- package/popover/index.umd.js +27 -0
- package/popover/package.json +7 -0
- package/popover/style.css +1 -0
- package/progress/index.d.ts +7 -0
- package/progress/index.es.js +207 -0
- package/progress/index.umd.js +3 -0
- package/progress/package.json +7 -0
- package/progress/style.css +1 -0
- package/radio/index.d.ts +7 -0
- package/radio/index.es.js +8056 -0
- package/radio/index.umd.js +38 -0
- package/radio/package.json +7 -0
- package/radio/style.css +1 -0
- package/rate/index.d.ts +7 -0
- package/rate/index.es.js +242 -0
- package/rate/index.umd.js +1 -0
- package/rate/package.json +7 -0
- package/rate/style.css +1 -0
- package/result/index.d.ts +7 -0
- package/result/index.es.js +248 -0
- package/result/index.umd.js +1 -0
- package/result/package.json +7 -0
- package/result/style.css +1 -0
- package/ripple/index.d.ts +7 -0
- package/ripple/index.es.js +173 -0
- package/ripple/index.umd.js +1 -0
- package/ripple/package.json +7 -0
- package/search/index.d.ts +7 -0
- package/search/index.es.js +8512 -0
- package/search/index.umd.js +38 -0
- package/search/package.json +7 -0
- package/search/style.css +1 -0
- package/select/index.d.ts +7 -0
- package/select/index.es.js +9423 -0
- package/select/index.umd.js +38 -0
- package/select/package.json +7 -0
- package/select/style.css +1 -0
- package/skeleton/index.d.ts +7 -0
- package/skeleton/index.es.js +145 -0
- package/skeleton/index.umd.js +1 -0
- package/skeleton/package.json +7 -0
- package/skeleton/style.css +1 -0
- package/slider/index.d.ts +7 -0
- package/slider/index.es.js +203 -0
- package/slider/index.umd.js +1 -0
- package/slider/package.json +7 -0
- package/slider/style.css +1 -0
- package/splitter/index.d.ts +7 -0
- package/splitter/index.es.js +6754 -0
- package/splitter/index.umd.js +27 -0
- package/splitter/package.json +7 -0
- package/splitter/style.css +1 -0
- package/statistic/index.d.ts +7 -0
- package/statistic/index.es.js +253 -0
- package/statistic/index.umd.js +1 -0
- package/statistic/package.json +7 -0
- package/statistic/style.css +1 -0
- package/status/index.d.ts +7 -0
- package/status/index.es.js +63 -0
- package/status/index.umd.js +1 -0
- package/status/package.json +7 -0
- package/status/style.css +1 -0
- 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 +7852 -0
- package/switch/index.umd.js +38 -0
- package/switch/package.json +7 -0
- package/switch/style.css +1 -0
- package/table/index.d.ts +7 -0
- package/table/index.es.js +11527 -0
- package/table/index.umd.js +38 -0
- package/table/package.json +7 -0
- package/table/style.css +1 -0
- package/tabs/index.d.ts +7 -0
- package/tabs/index.es.js +407 -0
- package/tabs/index.umd.js +1 -0
- package/tabs/package.json +7 -0
- package/tabs/style.css +1 -0
- 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 +7986 -0
- package/textarea/index.umd.js +46 -0
- package/textarea/package.json +7 -0
- package/textarea/style.css +1 -0
- package/theme/theme.scss +121 -0
- package/time-picker/index.d.ts +7 -0
- package/time-picker/index.es.js +9556 -0
- package/time-picker/index.umd.js +38 -0
- package/time-picker/package.json +7 -0
- package/time-picker/style.css +1 -0
- package/time-select/index.d.ts +7 -0
- package/time-select/index.es.js +9604 -0
- package/time-select/index.umd.js +38 -0
- package/time-select/package.json +7 -0
- 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 +5900 -0
- package/tooltip/index.umd.js +27 -0
- package/tooltip/package.json +7 -0
- package/tooltip/style.css +1 -0
- package/tree/index.d.ts +7 -0
- package/tree/index.es.js +10336 -0
- package/tree/index.umd.js +38 -0
- package/tree/package.json +7 -0
- package/tree/style.css +1 -0
- package/upload/index.d.ts +7 -0
- package/upload/index.es.js +1398 -0
- package/upload/index.umd.js +1 -0
- package/upload/package.json +7 -0
- package/upload/style.css +1 -0
- package/vue-devui.es.js +27451 -1
- package/vue-devui.umd.js +50 -1
- package/favicon.ico +0 -0
- package/logo.svg +0 -30
package/nuxt/index.js
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { watch, onUnmounted, defineComponent, toRefs, createVNode, Transition, mergeProps, ref, nextTick, unref } from "vue";
|
|
2
|
+
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
3
|
+
const fixedOverlayProps = {
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: Boolean,
|
|
6
|
+
default: false
|
|
7
|
+
},
|
|
8
|
+
lockScroll: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: true
|
|
11
|
+
},
|
|
12
|
+
closeOnClickOverlay: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: true
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
function lockScroll() {
|
|
18
|
+
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
19
|
+
const scrollTop = document.documentElement.scrollTop;
|
|
20
|
+
const style = document.documentElement.getAttribute("style");
|
|
21
|
+
document.documentElement.style.position = "fixed";
|
|
22
|
+
document.documentElement.style.top = `-${scrollTop}px`;
|
|
23
|
+
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
24
|
+
document.documentElement.style.overflowY = "scroll";
|
|
25
|
+
return () => {
|
|
26
|
+
if (style) {
|
|
27
|
+
document.documentElement.setAttribute("style", style);
|
|
28
|
+
} else {
|
|
29
|
+
document.documentElement.removeAttribute("style");
|
|
30
|
+
}
|
|
31
|
+
document.documentElement.scrollTop = scrollTop;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
function useFixedOverlay(props, ctx) {
|
|
37
|
+
let lockScrollCb;
|
|
38
|
+
const onClick = (event) => {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
ctx.emit("click", event);
|
|
41
|
+
if (props.closeOnClickOverlay) {
|
|
42
|
+
ctx.emit("update:modelValue", false);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const removeBodyAdditions = () => {
|
|
46
|
+
lockScrollCb == null ? void 0 : lockScrollCb();
|
|
47
|
+
};
|
|
48
|
+
watch(() => props.modelValue, (val) => {
|
|
49
|
+
if (val) {
|
|
50
|
+
props.lockScroll && (lockScrollCb = lockScroll());
|
|
51
|
+
} else {
|
|
52
|
+
removeBodyAdditions();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
onUnmounted(removeBodyAdditions);
|
|
56
|
+
return { onClick };
|
|
57
|
+
}
|
|
58
|
+
function createBem(namespace, element, modifier) {
|
|
59
|
+
let cls = namespace;
|
|
60
|
+
if (element) {
|
|
61
|
+
cls += `__${element}`;
|
|
62
|
+
}
|
|
63
|
+
if (modifier) {
|
|
64
|
+
cls += `--${modifier}`;
|
|
65
|
+
}
|
|
66
|
+
return cls;
|
|
67
|
+
}
|
|
68
|
+
function useNamespace(block, needDot = false) {
|
|
69
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
70
|
+
const b = () => createBem(namespace);
|
|
71
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
72
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
73
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
74
|
+
return {
|
|
75
|
+
b,
|
|
76
|
+
e,
|
|
77
|
+
m,
|
|
78
|
+
em
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
var fixedOverlay = "";
|
|
82
|
+
const FixedOverlay = defineComponent({
|
|
83
|
+
name: "DFixedOverlay",
|
|
84
|
+
inheritAttrs: false,
|
|
85
|
+
props: fixedOverlayProps,
|
|
86
|
+
emits: ["update:modelValue", "click"],
|
|
87
|
+
setup(props, ctx) {
|
|
88
|
+
const {
|
|
89
|
+
modelValue
|
|
90
|
+
} = toRefs(props);
|
|
91
|
+
const ns = useNamespace("fixed-overlay");
|
|
92
|
+
const {
|
|
93
|
+
onClick
|
|
94
|
+
} = useFixedOverlay(props, ctx);
|
|
95
|
+
return () => createVNode(Transition, {
|
|
96
|
+
"name": ns.m("fade")
|
|
97
|
+
}, {
|
|
98
|
+
default: () => {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
return [modelValue.value && createVNode("div", mergeProps({
|
|
101
|
+
"class": ns.b()
|
|
102
|
+
}, ctx.attrs, {
|
|
103
|
+
"onClick": onClick
|
|
104
|
+
}), [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
const flexibleOverlayProps = {
|
|
110
|
+
modelValue: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: false
|
|
113
|
+
},
|
|
114
|
+
origin: {
|
|
115
|
+
type: Object,
|
|
116
|
+
require: true
|
|
117
|
+
},
|
|
118
|
+
position: {
|
|
119
|
+
type: Array,
|
|
120
|
+
default: ["bottom"]
|
|
121
|
+
},
|
|
122
|
+
offset: {
|
|
123
|
+
type: [Number, Object],
|
|
124
|
+
default: 8
|
|
125
|
+
},
|
|
126
|
+
shiftOffset: {
|
|
127
|
+
type: Number
|
|
128
|
+
},
|
|
129
|
+
align: {
|
|
130
|
+
type: String,
|
|
131
|
+
default: null
|
|
132
|
+
},
|
|
133
|
+
showArrow: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: false
|
|
136
|
+
},
|
|
137
|
+
isArrowCenter: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: true
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
function getScrollParent(element) {
|
|
143
|
+
const overflowRegex = /(auto|scroll|hidden)/;
|
|
144
|
+
for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
|
|
145
|
+
const style = window.getComputedStyle(parent);
|
|
146
|
+
if (overflowRegex.test(style.overflow + style.overflowX + style.overflowY)) {
|
|
147
|
+
return parent;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return window;
|
|
151
|
+
}
|
|
152
|
+
function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
|
|
153
|
+
let { x, y } = point;
|
|
154
|
+
if (!isArrowCenter) {
|
|
155
|
+
const { width, height } = originRect;
|
|
156
|
+
if (x && placement.includes("start")) {
|
|
157
|
+
x = 12;
|
|
158
|
+
}
|
|
159
|
+
if (x && placement.includes("end")) {
|
|
160
|
+
x = Math.round(width - 24);
|
|
161
|
+
}
|
|
162
|
+
if (y && placement.includes("start")) {
|
|
163
|
+
y = 10;
|
|
164
|
+
}
|
|
165
|
+
if (y && placement.includes("end")) {
|
|
166
|
+
y = height - 14;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return { x, y };
|
|
170
|
+
}
|
|
171
|
+
function useOverlay(props, emit) {
|
|
172
|
+
const overlayRef = ref();
|
|
173
|
+
const arrowRef = ref();
|
|
174
|
+
let originParent = null;
|
|
175
|
+
const updateArrowPosition = (arrowEl, placement, point, overlayEl) => {
|
|
176
|
+
const { x, y } = adjustArrowPosition(props.isArrowCenter, point, placement, overlayEl.getBoundingClientRect());
|
|
177
|
+
const staticSide = {
|
|
178
|
+
top: "bottom",
|
|
179
|
+
right: "left",
|
|
180
|
+
bottom: "top",
|
|
181
|
+
left: "right"
|
|
182
|
+
}[placement.split("-")[0]];
|
|
183
|
+
Object.assign(arrowEl.style, {
|
|
184
|
+
left: x ? `${x}px` : "",
|
|
185
|
+
top: y ? `${y}px` : "",
|
|
186
|
+
right: "",
|
|
187
|
+
bottom: "",
|
|
188
|
+
[staticSide]: "-4px"
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
const updatePosition = async () => {
|
|
192
|
+
const hostEl = props.origin;
|
|
193
|
+
const overlayEl = unref(overlayRef.value);
|
|
194
|
+
const arrowEl = unref(arrowRef.value);
|
|
195
|
+
const middleware = [
|
|
196
|
+
offset(props.offset),
|
|
197
|
+
autoPlacement({
|
|
198
|
+
alignment: props.align,
|
|
199
|
+
allowedPlacements: props.position
|
|
200
|
+
})
|
|
201
|
+
];
|
|
202
|
+
props.showArrow && middleware.push(arrow({ element: arrowEl }));
|
|
203
|
+
props.shiftOffset !== void 0 && middleware.push(shift());
|
|
204
|
+
const { x, y, placement, middlewareData } = await computePosition(hostEl, overlayEl, {
|
|
205
|
+
strategy: "fixed",
|
|
206
|
+
middleware
|
|
207
|
+
});
|
|
208
|
+
let applyX = x;
|
|
209
|
+
let applyY = y;
|
|
210
|
+
if (props.shiftOffset !== void 0) {
|
|
211
|
+
const { x: shiftX, y: shiftY } = middlewareData.shift;
|
|
212
|
+
shiftX < 0 && (applyX -= props.shiftOffset);
|
|
213
|
+
shiftX > 0 && (applyX += props.shiftOffset);
|
|
214
|
+
shiftY < 0 && (applyY -= props.shiftOffset);
|
|
215
|
+
shiftY > 0 && (applyY += props.shiftOffset);
|
|
216
|
+
}
|
|
217
|
+
emit("positionChange", placement);
|
|
218
|
+
Object.assign(overlayEl.style, { top: `${applyY}px`, left: `${applyX}px` });
|
|
219
|
+
props.showArrow && updateArrowPosition(arrowEl, placement, middlewareData.arrow, overlayEl);
|
|
220
|
+
};
|
|
221
|
+
watch(() => props.modelValue, () => {
|
|
222
|
+
if (props.modelValue && props.origin) {
|
|
223
|
+
originParent = getScrollParent(props.origin);
|
|
224
|
+
nextTick(updatePosition);
|
|
225
|
+
originParent == null ? void 0 : originParent.addEventListener("scroll", updatePosition);
|
|
226
|
+
originParent !== window && window.addEventListener("scroll", updatePosition);
|
|
227
|
+
window.addEventListener("resize", updatePosition);
|
|
228
|
+
} else {
|
|
229
|
+
originParent == null ? void 0 : originParent.removeEventListener("scroll", updatePosition);
|
|
230
|
+
originParent !== window && window.removeEventListener("scroll", updatePosition);
|
|
231
|
+
window.removeEventListener("resize", updatePosition);
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
onUnmounted(() => {
|
|
235
|
+
originParent == null ? void 0 : originParent.removeEventListener("scroll", updatePosition);
|
|
236
|
+
originParent !== window && window.removeEventListener("scroll", updatePosition);
|
|
237
|
+
window.removeEventListener("resize", updatePosition);
|
|
238
|
+
});
|
|
239
|
+
return { arrowRef, overlayRef, updatePosition };
|
|
240
|
+
}
|
|
241
|
+
var flexibleOverlay = "";
|
|
242
|
+
const FlexibleOverlay = defineComponent({
|
|
243
|
+
name: "DFlexibleOverlay",
|
|
244
|
+
inheritAttrs: false,
|
|
245
|
+
props: flexibleOverlayProps,
|
|
246
|
+
emits: ["update:modelValue", "positionChange"],
|
|
247
|
+
setup(props, {
|
|
248
|
+
slots,
|
|
249
|
+
attrs,
|
|
250
|
+
emit,
|
|
251
|
+
expose
|
|
252
|
+
}) {
|
|
253
|
+
const ns = useNamespace("flexible-overlay");
|
|
254
|
+
const {
|
|
255
|
+
arrowRef,
|
|
256
|
+
overlayRef,
|
|
257
|
+
updatePosition
|
|
258
|
+
} = useOverlay(props, emit);
|
|
259
|
+
expose({
|
|
260
|
+
updatePosition
|
|
261
|
+
});
|
|
262
|
+
return () => {
|
|
263
|
+
var _a;
|
|
264
|
+
return props.modelValue && createVNode("div", mergeProps({
|
|
265
|
+
"ref": overlayRef,
|
|
266
|
+
"class": ns.b()
|
|
267
|
+
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
|
|
268
|
+
"ref": arrowRef,
|
|
269
|
+
"class": ns.e("arrow")
|
|
270
|
+
}, null)]);
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
const inBrowser = typeof window !== "undefined";
|
|
275
|
+
var index = {
|
|
276
|
+
title: "Overlay \u906E\u7F69\u5C42",
|
|
277
|
+
category: "\u901A\u7528",
|
|
278
|
+
status: "100%",
|
|
279
|
+
install(app) {
|
|
280
|
+
app.component(FixedOverlay.name, FixedOverlay);
|
|
281
|
+
app.component(FlexibleOverlay.name, FlexibleOverlay);
|
|
282
|
+
if (inBrowser && !document.getElementById("d-overlay-anchor")) {
|
|
283
|
+
const overlayAnchor = document.createElement("div");
|
|
284
|
+
overlayAnchor.setAttribute("id", "d-overlay-anchor");
|
|
285
|
+
overlayAnchor.style.position = "fixed";
|
|
286
|
+
overlayAnchor.style.left = "0";
|
|
287
|
+
overlayAnchor.style.top = "0";
|
|
288
|
+
overlayAnchor.style.zIndex = "1000";
|
|
289
|
+
document.body.appendChild(overlayAnchor);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
export { FixedOverlay, FlexibleOverlay, index as default, fixedOverlayProps, flexibleOverlayProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(a,l){typeof exports=="object"&&typeof module!="undefined"?l(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],l):(a=typeof globalThis!="undefined"?globalThis:a||self,l(a.index={},a.Vue,a.dom))})(this,function(a,l,f){"use strict";const b={modelValue:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}};function P(){if(document.documentElement.scrollHeight>document.documentElement.clientHeight){const e=document.documentElement.scrollTop,t=document.documentElement.getAttribute("style");return document.documentElement.style.position="fixed",document.documentElement.style.top=`-${e}px`,document.documentElement.style.width=document.documentElement.style.width||"100%",document.documentElement.style.overflowY="scroll",()=>{t?document.documentElement.setAttribute("style",t):document.documentElement.removeAttribute("style"),document.documentElement.scrollTop=e}}}function k(e,t){let o;const i=s=>{s.preventDefault(),t.emit("click",s),e.closeOnClickOverlay&&t.emit("update:modelValue",!1)},n=()=>{o==null||o()};return l.watch(()=>e.modelValue,s=>{s?e.lockScroll&&(o=P()):n()}),l.onUnmounted(n),{onClick:i}}function y(e,t,o){let i=e;return t&&(i+=`__${t}`),o&&(i+=`--${o}`),i}function g(e,t=!1){const o=t?`.devui-${e}`:`devui-${e}`;return{b:()=>y(o),e:d=>d?y(o,d):"",m:d=>d?y(o,"",d):"",em:(d,c)=>d&&c?y(o,d,c):""}}var j="";const O=l.defineComponent({name:"DFixedOverlay",inheritAttrs:!1,props:b,emits:["update:modelValue","click"],setup(e,t){const{modelValue:o}=l.toRefs(e),i=g("fixed-overlay"),{onClick:n}=k(e,t);return()=>l.createVNode(l.Transition,{name:i.m("fade")},{default:()=>{var s,r;return[o.value&&l.createVNode("div",l.mergeProps({class:i.b()},t.attrs,{onClick:n}),[(r=(s=t.slots).default)==null?void 0:r.call(s)])]}})}}),A={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},shiftOffset:{type:Number},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0}};function L(e){const t=/(auto|scroll|hidden)/;for(let o=e;o=o.parentElement;o.parentElement!==document.body){const i=window.getComputedStyle(o);if(t.test(i.overflow+i.overflowX+i.overflowY))return o}return window}function $(e,t,o,i){let{x:n,y:s}=t;if(!e){const{width:r,height:d}=i;n&&o.includes("start")&&(n=12),n&&o.includes("end")&&(n=Math.round(r-24)),s&&o.includes("start")&&(s=10),s&&o.includes("end")&&(s=d-14)}return{x:n,y:s}}function F(e,t){const o=l.ref(),i=l.ref();let n=null;const s=(d,c,u,m)=>{const{x:w,y:v}=$(e.isArrowCenter,u,c,m.getBoundingClientRect()),h={top:"bottom",right:"left",bottom:"top",left:"right"}[c.split("-")[0]];Object.assign(d.style,{left:w?`${w}px`:"",top:v?`${v}px`:"",right:"",bottom:"",[h]:"-4px"})},r=async()=>{const d=e.origin,c=l.unref(o.value),u=l.unref(i.value),m=[f.offset(e.offset),f.autoPlacement({alignment:e.align,allowedPlacements:e.position})];e.showArrow&&m.push(f.arrow({element:u})),e.shiftOffset!==void 0&&m.push(f.shift());const{x:w,y:v,placement:h,middlewareData:V}=await f.computePosition(d,c,{strategy:"fixed",middleware:m});let p=w,x=v;if(e.shiftOffset!==void 0){const{x:C,y:B}=V.shift;C<0&&(p-=e.shiftOffset),C>0&&(p+=e.shiftOffset),B<0&&(x-=e.shiftOffset),B>0&&(x+=e.shiftOffset)}t("positionChange",h),Object.assign(c.style,{top:`${x}px`,left:`${p}px`}),e.showArrow&&s(u,h,V.arrow,c)};return l.watch(()=>e.modelValue,()=>{e.modelValue&&e.origin?(n=L(e.origin),l.nextTick(r),n==null||n.addEventListener("scroll",r),n!==window&&window.addEventListener("scroll",r),window.addEventListener("resize",r)):(n==null||n.removeEventListener("scroll",r),n!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r))}),l.onUnmounted(()=>{n==null||n.removeEventListener("scroll",r),n!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}),{arrowRef:i,overlayRef:o,updatePosition:r}}var N="";const E=l.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:A,emits:["update:modelValue","positionChange"],setup(e,{slots:t,attrs:o,emit:i,expose:n}){const s=g("flexible-overlay"),{arrowRef:r,overlayRef:d,updatePosition:c}=F(e,i);return n({updatePosition:c}),()=>{var u;return e.modelValue&&l.createVNode("div",l.mergeProps({ref:d,class:s.b()},o),[(u=t.default)==null?void 0:u.call(t),e.showArrow&&l.createVNode("div",{ref:r,class:s.e("arrow")},null)])}}}),S=typeof window!="undefined";var T={title:"Overlay \u906E\u7F69\u5C42",category:"\u901A\u7528",status:"100%",install(e){if(e.component(O.name,O),e.component(E.name,E),S&&!document.getElementById("d-overlay-anchor")){const t=document.createElement("div");t.setAttribute("id","d-overlay-anchor"),t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.zIndex="1000",document.body.appendChild(t)}}};a.FixedOverlay=O,a.FlexibleOverlay=E,a.default=T,a.fixedOverlayProps=b,a.flexibleOverlayProps=A,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 4px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-devui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-alpha.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "DevUI components based on Vite and Vue3",
|
|
6
6
|
"keywords": [
|
|
@@ -15,88 +15,28 @@
|
|
|
15
15
|
"jsx",
|
|
16
16
|
"devui"
|
|
17
17
|
],
|
|
18
|
+
"homepage": "https://vue-devui.github.io/",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git@github.com:DevCloudFE/vue-devui.git"
|
|
22
|
+
},
|
|
18
23
|
"main": "vue-devui.umd.js",
|
|
19
24
|
"module": "vue-devui.es.js",
|
|
20
25
|
"style": "style.css",
|
|
21
|
-
"bin": {
|
|
22
|
-
"devui-cli": "./devui-cli/index.js"
|
|
23
|
-
},
|
|
24
|
-
"scripts": {
|
|
25
|
-
"dev": "vitepress dev sites",
|
|
26
|
-
"build": "vitepress build sites",
|
|
27
|
-
"serve": "vitepress serve sites",
|
|
28
|
-
"app:dev": "vite",
|
|
29
|
-
"app:build": "vite build",
|
|
30
|
-
"build:lib": "yarn predev && vite build --config vite.config.build.ts && cp package.json dist && cp README.md dist",
|
|
31
|
-
"test": "jest --config jest.config.js",
|
|
32
|
-
"ls-lint": "ls-lint",
|
|
33
|
-
"lint": "eslint \"{src,devui}/**/*.{vue,js,ts,jsx,tsx}\"",
|
|
34
|
-
"lint:fix": "eslint --fix \"{src,devui}/**/*.{vue,js,ts,jsx,tsx}\"",
|
|
35
|
-
"stylelint": "stylelint --fix \"{devui,src}/**/*.{scss,css}\"",
|
|
36
|
-
"convert:route": "node ./scripts/convert-component-route.js",
|
|
37
|
-
"generate:devui": "node scripts/generate-devui.js",
|
|
38
|
-
"clean:cli": "npm uninstall -g devui-cli & npm uninstall -g vue-devui",
|
|
39
|
-
"cli:create": "node ./devui-cli/index.js create",
|
|
40
|
-
"predev": "node ./devui-cli/index.js create -t vue-devui --ignore-parse-error"
|
|
41
|
-
},
|
|
42
26
|
"dependencies": {
|
|
43
27
|
"@devui-design/icons": "^1.3.0",
|
|
28
|
+
"@floating-ui/dom": "^0.4.4",
|
|
44
29
|
"@types/lodash-es": "^4.17.4",
|
|
30
|
+
"@vue/shared": "^3.2.33",
|
|
31
|
+
"@vueuse/core": "^7.7.1",
|
|
32
|
+
"async-validator": "^4.0.2",
|
|
33
|
+
"dayjs": "^1.11.3",
|
|
34
|
+
"devui-theme": "^0.0.1",
|
|
35
|
+
"fs-extra": "^10.0.0",
|
|
36
|
+
"lodash": "^4.17.21",
|
|
45
37
|
"lodash-es": "^4.17.20",
|
|
46
|
-
"
|
|
38
|
+
"mitt": "^3.0.0",
|
|
39
|
+
"vue": "3.2.31",
|
|
47
40
|
"vue-router": "^4.0.3"
|
|
48
|
-
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@babel/preset-env": "^7.14.5",
|
|
51
|
-
"@babel/preset-typescript": "^7.14.5",
|
|
52
|
-
"@commitlint/cli": "^11.0.0",
|
|
53
|
-
"@commitlint/config-conventional": "^11.0.0",
|
|
54
|
-
"@ls-lint/ls-lint": "^1.10.0",
|
|
55
|
-
"@types/chalk": "^2.2.0",
|
|
56
|
-
"@types/commander": "^2.12.2",
|
|
57
|
-
"@types/jest": "^26.0.23",
|
|
58
|
-
"@types/ora": "^3.2.0",
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^4.27.0",
|
|
60
|
-
"@typescript-eslint/parser": "^4.27.0",
|
|
61
|
-
"@vitejs/plugin-vue": "^1.3.0",
|
|
62
|
-
"@vitejs/plugin-vue-jsx": "^1.1.0",
|
|
63
|
-
"@vue/babel-plugin-jsx": "^1.0.6",
|
|
64
|
-
"@vue/compiler-sfc": "^3.0.5",
|
|
65
|
-
"@vue/test-utils": "^2.0.0-rc.9",
|
|
66
|
-
"@vuedx/typecheck": "^0.4.1",
|
|
67
|
-
"@vuedx/typescript-plugin-vue": "^0.4.1",
|
|
68
|
-
"babel-jest": "^27.0.2",
|
|
69
|
-
"chalk": "^4.1.2",
|
|
70
|
-
"commander": "^8.1.0",
|
|
71
|
-
"esbuild-register": "^2.6.0",
|
|
72
|
-
"eslint": "^7.28.0",
|
|
73
|
-
"eslint-plugin-vue": "^7.11.1",
|
|
74
|
-
"husky": "^4.3.7",
|
|
75
|
-
"inquirer": "^8.1.2",
|
|
76
|
-
"jest": "^27.0.4",
|
|
77
|
-
"lint-staged": "^11.0.0",
|
|
78
|
-
"ora": "^5.4.1",
|
|
79
|
-
"sass": "^1.32.2",
|
|
80
|
-
"shelljs": "^0.8.4",
|
|
81
|
-
"stylelint": "^13.13.1",
|
|
82
|
-
"stylelint-config-recommended-scss": "^4.3.0",
|
|
83
|
-
"stylelint-config-standard": "^22.0.0",
|
|
84
|
-
"stylelint-scss": "^3.20.1",
|
|
85
|
-
"typescript": "^4.3.2",
|
|
86
|
-
"vite": "^2.4.4",
|
|
87
|
-
"vite-plugin-md": "^0.6.0",
|
|
88
|
-
"vitepress": "^0.15.6",
|
|
89
|
-
"vue-tsc": "^0.2.2",
|
|
90
|
-
"yarn": "^1.22.11"
|
|
91
|
-
},
|
|
92
|
-
"husky": {
|
|
93
|
-
"hooks": {
|
|
94
|
-
"pre-commit": "ls-lint && lint-staged",
|
|
95
|
-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"lint-staged": {
|
|
99
|
-
"{src,devui}/**/*.{js,ts,jsx,tsx,vue}": "eslint --fix",
|
|
100
|
-
"{src,devui}/**/*.{scss,css}": "stylelint --fix"
|
|
101
41
|
}
|
|
102
|
-
}
|
|
42
|
+
}
|