vue-devui 1.0.0-alpha.6 → 1.0.0-beta.12
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 +32 -35
- package/accordion/index.d.ts +7 -0
- package/accordion/index.es.js +508 -1
- package/accordion/index.umd.js +1 -1
- package/accordion/style.css +1 -1
- package/alert/index.d.ts +7 -0
- package/alert/index.es.js +178 -1
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/anchor/index.d.ts +7 -0
- package/anchor/index.es.js +263 -1
- package/anchor/index.umd.js +1 -1
- package/avatar/index.d.ts +7 -0
- package/avatar/index.es.js +301 -1
- package/avatar/index.umd.js +1 -1
- package/back-top/index.d.ts +7 -0
- package/back-top/index.es.js +128 -0
- package/back-top/index.umd.js +1 -0
- package/back-top/package.json +7 -0
- package/back-top/style.css +1 -0
- package/badge/index.d.ts +7 -0
- package/badge/index.es.js +95 -1
- package/badge/index.umd.js +1 -1
- package/breadcrumb/index.d.ts +7 -0
- package/breadcrumb/index.es.js +127 -1
- package/breadcrumb/index.umd.js +1 -1
- package/button/index.d.ts +7 -0
- package/button/index.es.js +392 -1
- package/button/index.umd.js +1 -1
- package/button/style.css +1 -1
- package/card/index.d.ts +7 -0
- package/card/index.es.js +61 -1
- package/card/index.umd.js +1 -1
- package/carousel/index.d.ts +7 -0
- package/carousel/index.es.js +329 -1
- package/carousel/index.umd.js +1 -1
- package/cascader/index.d.ts +7 -0
- package/cascader/index.es.js +1343 -1
- package/cascader/index.umd.js +1 -1
- package/cascader/style.css +1 -1
- package/checkbox/index.d.ts +7 -0
- package/checkbox/index.es.js +377 -1
- package/checkbox/index.umd.js +1 -1
- package/comment/index.d.ts +7 -0
- package/comment/index.es.js +85 -0
- package/comment/index.umd.js +1 -0
- package/comment/package.json +7 -0
- package/comment/style.css +1 -0
- package/countdown/index.d.ts +7 -0
- package/countdown/index.es.js +176 -0
- package/countdown/index.umd.js +1 -0
- package/countdown/package.json +7 -0
- package/countdown/style.css +1 -0
- package/date-picker/index.d.ts +7 -0
- package/date-picker/index.es.js +1172 -1
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/dragdrop/index.d.ts +7 -0
- package/dragdrop/index.es.js +32 -0
- package/dragdrop/index.umd.js +1 -0
- package/dragdrop/package.json +7 -0
- package/drawer/index.d.ts +7 -0
- package/drawer/index.es.js +287 -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 +535 -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 +5857 -1
- package/editable-select/index.umd.js +27 -1
- package/editable-select/style.css +1 -1
- package/form/index.d.ts +7 -0
- package/form/index.es.js +2244 -0
- package/form/index.umd.js +1 -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 +163 -1
- package/fullscreen/index.umd.js +1 -1
- package/gantt/index.d.ts +7 -0
- package/gantt/index.es.js +535 -0
- package/gantt/index.umd.js +1 -0
- package/gantt/package.json +7 -0
- package/gantt/style.css +1 -0
- package/grid/index.d.ts +7 -0
- package/grid/index.es.js +269 -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 +75 -1
- package/icon/index.umd.js +1 -1
- package/image-preview/index.d.ts +7 -0
- package/image-preview/index.es.js +498 -1
- 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 +190 -1
- package/input/index.umd.js +1 -1
- package/input-icon/index.d.ts +7 -0
- package/input-icon/index.es.js +332 -0
- package/input-icon/index.umd.js +1 -0
- package/input-icon/package.json +7 -0
- package/input-icon/style.css +1 -0
- package/input-number/index.d.ts +7 -0
- package/input-number/index.es.js +240 -1
- package/input-number/index.umd.js +1 -1
- package/layout/index.d.ts +7 -0
- package/layout/index.es.js +100 -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 +256 -1
- package/loading/index.umd.js +1 -1
- package/modal/index.d.ts +7 -0
- package/modal/index.es.js +1225 -1
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/nav-sprite/index.d.ts +7 -0
- package/nav-sprite/index.es.js +742 -0
- package/nav-sprite/index.umd.js +1 -0
- package/nav-sprite/package.json +7 -0
- package/nuxt/components/Accordion.js +3 -0
- package/nuxt/components/Alert.js +3 -0
- package/nuxt/components/Anchor.js +3 -0
- package/nuxt/components/Aside.js +3 -0
- package/nuxt/components/Avatar.js +3 -0
- package/nuxt/components/BackTop.js +3 -0
- package/nuxt/components/Badge.js +3 -0
- package/nuxt/components/Breadcrumb.js +3 -0
- package/nuxt/components/Button.js +3 -0
- package/nuxt/components/Card.js +3 -0
- package/nuxt/components/Carousel.js +3 -0
- package/nuxt/components/Cascader.js +3 -0
- package/nuxt/components/Checkbox.js +3 -0
- package/nuxt/components/Col.js +3 -0
- package/nuxt/components/Column.js +3 -0
- package/nuxt/components/Comment.js +3 -0
- package/nuxt/components/Content.js +3 -0
- package/nuxt/components/Countdown.js +3 -0
- package/nuxt/components/DatePicker.js +3 -0
- package/nuxt/components/Drawer.js +3 -0
- package/nuxt/components/Dropdown.js +3 -0
- package/nuxt/components/EditableSelect.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/FormControl.js +3 -0
- package/nuxt/components/FormItem.js +3 -0
- package/nuxt/components/FormLabel.js +3 -0
- package/nuxt/components/FormOperation.js +3 -0
- package/nuxt/components/Fullscreen.js +3 -0
- package/nuxt/components/Gantt.js +3 -0
- package/nuxt/components/Header.js +3 -0
- package/nuxt/components/Icon.js +2 -0
- package/nuxt/components/ImagePreviewService.js +3 -0
- package/nuxt/components/Input.js +3 -0
- package/nuxt/components/InputIcon.js +3 -0
- package/nuxt/components/InputNumber.js +3 -0
- package/nuxt/components/Layout.js +3 -0
- package/nuxt/components/Loading.js +3 -0
- package/nuxt/components/LoadingService.js +3 -0
- package/nuxt/components/Modal.js +3 -0
- package/nuxt/components/NavSprite.js +2 -0
- package/nuxt/components/Pagination.js +3 -0
- package/nuxt/components/Panel.js +3 -0
- package/nuxt/components/Popover.js +3 -0
- package/nuxt/components/Progress.js +3 -0
- package/nuxt/components/QuadrantDiagram.js +3 -0
- package/nuxt/components/Radio.js +3 -0
- package/nuxt/components/RadioGroup.js +3 -0
- package/nuxt/components/Rate.js +3 -0
- package/nuxt/components/ReadTip.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/StepsGuide.js +3 -0
- package/nuxt/components/StickSlider.js +3 -0
- package/nuxt/components/Sticky.js +2 -0
- package/nuxt/components/Switch.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/TagInput.js +3 -0
- package/nuxt/components/Textarea.js +3 -0
- package/nuxt/components/TimeAxis.js +3 -0
- package/nuxt/components/TimeAxisItem.js +3 -0
- package/nuxt/components/TimePicker.js +3 -0
- package/nuxt/components/Toast.js +3 -0
- package/nuxt/components/ToastService.js +3 -0
- package/nuxt/components/Tooltip.js +3 -0
- package/nuxt/components/Transfer.js +3 -0
- package/nuxt/components/Tree.js +3 -0
- package/nuxt/components/TreeSelect.js +3 -0
- package/nuxt/components/Upload.js +3 -0
- package/nuxt/components/buttonProps.js +3 -0
- package/nuxt/index.js +13 -0
- package/overlay/index.d.ts +7 -0
- package/overlay/index.es.js +368 -1
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +6 -47
- package/pagination/index.d.ts +7 -0
- package/pagination/index.es.js +642 -1
- package/pagination/index.umd.js +1 -1
- package/panel/index.d.ts +7 -0
- package/panel/index.es.js +205 -1
- 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 +236 -1
- package/popover/index.umd.js +1 -1
- package/progress/index.d.ts +7 -0
- package/progress/index.es.js +153 -1
- package/progress/index.umd.js +3 -1
- package/quadrant-diagram/index.d.ts +7 -0
- package/quadrant-diagram/index.es.js +489 -1
- package/quadrant-diagram/index.umd.js +1 -1
- package/radio/index.d.ts +7 -0
- package/radio/index.es.js +225 -1
- package/radio/index.umd.js +1 -1
- package/rate/index.d.ts +7 -0
- package/rate/index.es.js +220 -1
- package/rate/index.umd.js +1 -1
- package/read-tip/index.d.ts +7 -0
- package/read-tip/index.es.js +258 -0
- package/read-tip/index.umd.js +1 -0
- package/read-tip/package.json +7 -0
- package/read-tip/style.css +1 -0
- package/result/index.d.ts +7 -0
- package/result/index.es.js +119 -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 +181 -1
- package/ripple/index.umd.js +1 -1
- package/search/index.d.ts +7 -0
- package/search/index.es.js +543 -1
- package/search/index.umd.js +1 -1
- package/select/index.d.ts +7 -0
- package/select/index.es.js +706 -1
- package/select/index.umd.js +1 -1
- package/skeleton/index.d.ts +7 -0
- package/skeleton/index.es.js +297 -1
- 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 +199 -1
- 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 +636 -1
- package/splitter/index.umd.js +1 -1
- package/statistic/index.d.ts +7 -0
- package/statistic/index.es.js +280 -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 +42 -1
- package/status/index.umd.js +1 -1
- package/steps-guide/index.d.ts +7 -0
- package/steps-guide/index.es.js +239 -1
- package/steps-guide/index.umd.js +1 -1
- package/steps-guide/style.css +1 -1
- package/sticky/index.d.ts +7 -0
- package/sticky/index.es.js +197 -1
- package/sticky/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.d.ts +7 -0
- package/switch/index.es.js +100 -1
- package/switch/index.umd.js +1 -1
- package/switch/style.css +1 -1
- package/table/index.d.ts +7 -0
- package/table/index.es.js +1836 -1
- package/table/index.umd.js +1 -1
- package/table/style.css +1 -1
- package/tabs/index.d.ts +7 -0
- package/tabs/index.es.js +195 -1
- 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 +131 -0
- package/tag/index.umd.js +1 -0
- package/tag/package.json +7 -0
- package/tag/style.css +1 -0
- package/tag-input/index.d.ts +7 -0
- package/tag-input/index.es.js +329 -1
- package/tag-input/index.umd.js +1 -1
- package/textarea/index.d.ts +7 -0
- package/textarea/index.es.js +132 -0
- package/textarea/index.umd.js +1 -0
- package/textarea/package.json +7 -0
- package/textarea/style.css +1 -0
- package/time-axis/index.d.ts +7 -0
- package/time-axis/index.es.js +299 -0
- package/time-axis/index.umd.js +1 -0
- package/time-axis/package.json +7 -0
- package/time-axis/style.css +1 -0
- package/time-picker/index.d.ts +7 -0
- package/time-picker/index.es.js +1260 -1
- package/time-picker/index.umd.js +1 -1
- package/time-picker/style.css +1 -1
- package/toast/index.d.ts +7 -0
- package/toast/index.es.js +2060 -1
- package/toast/index.umd.js +1 -1
- package/toast/style.css +1 -1
- package/tooltip/index.d.ts +7 -0
- package/tooltip/index.es.js +171 -1
- package/tooltip/index.umd.js +1 -1
- package/transfer/index.d.ts +7 -0
- package/transfer/index.es.js +1725 -1
- package/transfer/index.umd.js +1 -1
- package/transfer/style.css +1 -1
- package/tree/index.d.ts +7 -0
- package/tree/index.es.js +907 -1
- package/tree/index.umd.js +1 -1
- package/tree/style.css +1 -1
- package/tree-select/index.d.ts +7 -0
- package/tree-select/index.es.js +528 -0
- package/tree-select/index.umd.js +1 -0
- package/tree-select/package.json +7 -0
- package/tree-select/style.css +1 -0
- package/upload/index.d.ts +7 -0
- package/upload/index.es.js +2834 -1
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +27777 -1
- package/vue-devui.umd.js +29 -1
package/overlay/index.es.js
CHANGED
|
@@ -1 +1,368 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, withDirectives, vShow, ref, reactive, toRef, isRef } from "vue";
|
|
21
|
+
var overlay = "";
|
|
22
|
+
function _isSlot(s) {
|
|
23
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
24
|
+
}
|
|
25
|
+
const CommonOverlay = defineComponent({
|
|
26
|
+
setup(props, ctx) {
|
|
27
|
+
return () => {
|
|
28
|
+
let _slot;
|
|
29
|
+
return createVNode(Teleport, {
|
|
30
|
+
"to": "#d-overlay-anchor"
|
|
31
|
+
}, {
|
|
32
|
+
default: () => [createVNode(Transition, {
|
|
33
|
+
"name": "devui-overlay-fade"
|
|
34
|
+
}, _isSlot(_slot = renderSlot(ctx.slots, "default")) ? _slot : {
|
|
35
|
+
default: () => [_slot]
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const overlayProps = {
|
|
42
|
+
visible: {
|
|
43
|
+
type: Boolean
|
|
44
|
+
},
|
|
45
|
+
backgroundBlock: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
48
|
+
},
|
|
49
|
+
backgroundClass: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
53
|
+
backgroundStyle: {
|
|
54
|
+
type: [String, Object]
|
|
55
|
+
},
|
|
56
|
+
onBackdropClick: {
|
|
57
|
+
type: Function
|
|
58
|
+
},
|
|
59
|
+
backdropClose: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: true
|
|
62
|
+
},
|
|
63
|
+
hasBackdrop: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: true
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const overlayEmits = ["update:visible", "backdropClick"];
|
|
69
|
+
const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
70
|
+
overlayStyle: {
|
|
71
|
+
type: [String, Object],
|
|
72
|
+
default: void 0
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
const flexibleOverlayProps = __spreadValues({
|
|
76
|
+
origin: {
|
|
77
|
+
type: Object,
|
|
78
|
+
require: true
|
|
79
|
+
},
|
|
80
|
+
position: {
|
|
81
|
+
type: Object,
|
|
82
|
+
default: () => ({
|
|
83
|
+
originX: "left",
|
|
84
|
+
originY: "top",
|
|
85
|
+
overlayX: "left",
|
|
86
|
+
overlayY: "top"
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
}, overlayProps);
|
|
90
|
+
function useOverlayLogic(props, ctx) {
|
|
91
|
+
const backgroundClass = computed(() => {
|
|
92
|
+
return [
|
|
93
|
+
"devui-overlay-background",
|
|
94
|
+
props.backgroundClass,
|
|
95
|
+
!props.hasBackdrop ? "devui-overlay-background__disabled" : "devui-overlay-background__color"
|
|
96
|
+
];
|
|
97
|
+
});
|
|
98
|
+
const overlayClass = computed(() => {
|
|
99
|
+
return "devui-overlay";
|
|
100
|
+
});
|
|
101
|
+
const handleBackdropClick = (event) => {
|
|
102
|
+
var _a;
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
(_a = props.onBackdropClick) == null ? void 0 : _a.call(props);
|
|
105
|
+
if (props.backdropClose) {
|
|
106
|
+
ctx.emit("update:visible", false);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const handleOverlayBubbleCancel = (event) => event.cancelBubble = true;
|
|
110
|
+
onMounted(() => {
|
|
111
|
+
const body = document.body;
|
|
112
|
+
const originOverflow = body.style.overflow;
|
|
113
|
+
const originPosition = body.style.position;
|
|
114
|
+
watch([() => props.visible, () => props.backgroundBlock], ([visible, backgroundBlock]) => {
|
|
115
|
+
if (backgroundBlock) {
|
|
116
|
+
const top = body.getBoundingClientRect().y;
|
|
117
|
+
if (visible) {
|
|
118
|
+
body.style.overflowY = "scroll";
|
|
119
|
+
body.style.position = visible ? "fixed" : "";
|
|
120
|
+
body.style.top = `${top}px`;
|
|
121
|
+
} else {
|
|
122
|
+
body.style.overflowY = originOverflow;
|
|
123
|
+
body.style.position = originPosition;
|
|
124
|
+
body.style.top = "";
|
|
125
|
+
window.scrollTo(0, -top);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
onUnmounted(() => {
|
|
130
|
+
document.body.style.overflow = originOverflow;
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
return {
|
|
134
|
+
backgroundClass,
|
|
135
|
+
overlayClass,
|
|
136
|
+
handleBackdropClick,
|
|
137
|
+
handleOverlayBubbleCancel
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
const FixedOverlay = defineComponent({
|
|
141
|
+
name: "DFixedOverlay",
|
|
142
|
+
props: fixedOverlayProps,
|
|
143
|
+
emits: overlayEmits,
|
|
144
|
+
setup(props, ctx) {
|
|
145
|
+
const {
|
|
146
|
+
backgroundClass,
|
|
147
|
+
overlayClass,
|
|
148
|
+
handleBackdropClick,
|
|
149
|
+
handleOverlayBubbleCancel
|
|
150
|
+
} = useOverlayLogic(props, ctx);
|
|
151
|
+
return () => createVNode(CommonOverlay, null, {
|
|
152
|
+
default: () => [withDirectives(createVNode("div", {
|
|
153
|
+
"class": backgroundClass.value,
|
|
154
|
+
"style": props.backgroundStyle,
|
|
155
|
+
"onClick": handleBackdropClick
|
|
156
|
+
}, [createVNode("div", {
|
|
157
|
+
"class": overlayClass.value,
|
|
158
|
+
"style": props.overlayStyle,
|
|
159
|
+
"onClick": handleOverlayBubbleCancel
|
|
160
|
+
}, [renderSlot(ctx.slots, "default")])]), [[vShow, props.visible]])]
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
function isComponent(target) {
|
|
165
|
+
return !!(target == null ? void 0 : target.$el);
|
|
166
|
+
}
|
|
167
|
+
function getElement(element) {
|
|
168
|
+
if (element instanceof Element) {
|
|
169
|
+
return element;
|
|
170
|
+
}
|
|
171
|
+
if (element && typeof element === "object" && element.$el instanceof Element) {
|
|
172
|
+
return element.$el;
|
|
173
|
+
}
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
const FlexibleOverlay = defineComponent({
|
|
177
|
+
name: "DFlexibleOverlay",
|
|
178
|
+
props: flexibleOverlayProps,
|
|
179
|
+
emits: overlayEmits,
|
|
180
|
+
setup(props, ctx) {
|
|
181
|
+
const overlayRef = ref(null);
|
|
182
|
+
const positionedStyle = reactive({
|
|
183
|
+
position: "absolute"
|
|
184
|
+
});
|
|
185
|
+
onMounted(async () => {
|
|
186
|
+
const handleRectChange = (position, rect, origin) => {
|
|
187
|
+
const point = calculatePosition(position, rect, origin);
|
|
188
|
+
positionedStyle.left = `${point.x}px`;
|
|
189
|
+
positionedStyle.top = `${point.y}px`;
|
|
190
|
+
};
|
|
191
|
+
const locationElements = computed(() => {
|
|
192
|
+
const overlay2 = overlayRef.value;
|
|
193
|
+
const origin = getOrigin(props.origin);
|
|
194
|
+
if (!overlay2 || !origin) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
origin,
|
|
199
|
+
overlay: overlay2
|
|
200
|
+
};
|
|
201
|
+
});
|
|
202
|
+
const visibleRef = toRef(props, "visible");
|
|
203
|
+
const positionRef = toRef(props, "position");
|
|
204
|
+
watch([locationElements, visibleRef, positionRef], async ([locationElements2, visible, position], ov, onInvalidate) => {
|
|
205
|
+
if (!visible || !locationElements2) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const {
|
|
209
|
+
origin,
|
|
210
|
+
overlay: overlay2
|
|
211
|
+
} = locationElements2;
|
|
212
|
+
handleRectChange(position, overlay2.getBoundingClientRect(), origin);
|
|
213
|
+
const unsubscriptions = [subscribeLayoutEvent(() => handleRectChange(position, overlay2.getBoundingClientRect(), origin)), subscribeOverlayResize(overlay2, (entries) => handleRectChange(position, entries[0].contentRect, origin)), subscribeOriginResize(origin, () => handleRectChange(position, overlay2.getBoundingClientRect(), origin))];
|
|
214
|
+
onInvalidate(() => {
|
|
215
|
+
unsubscriptions.forEach((fn) => fn());
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
const {
|
|
220
|
+
backgroundClass,
|
|
221
|
+
overlayClass,
|
|
222
|
+
handleBackdropClick,
|
|
223
|
+
handleOverlayBubbleCancel
|
|
224
|
+
} = useOverlayLogic(props, ctx);
|
|
225
|
+
return () => createVNode(CommonOverlay, null, {
|
|
226
|
+
default: () => [withDirectives(createVNode("div", {
|
|
227
|
+
"style": props.backgroundStyle,
|
|
228
|
+
"class": backgroundClass.value,
|
|
229
|
+
"onClick": handleBackdropClick
|
|
230
|
+
}, [createVNode("div", {
|
|
231
|
+
"ref": overlayRef,
|
|
232
|
+
"class": overlayClass.value,
|
|
233
|
+
"style": positionedStyle,
|
|
234
|
+
"onClick": handleOverlayBubbleCancel
|
|
235
|
+
}, [renderSlot(ctx.slots, "default")])]), [[vShow, props.visible]])]
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
function getOrigin(origin) {
|
|
240
|
+
if (origin instanceof Element) {
|
|
241
|
+
return origin;
|
|
242
|
+
}
|
|
243
|
+
if (isRef(origin)) {
|
|
244
|
+
return getElement(origin.value);
|
|
245
|
+
}
|
|
246
|
+
if (isComponent(origin)) {
|
|
247
|
+
return getElement(origin);
|
|
248
|
+
}
|
|
249
|
+
return origin;
|
|
250
|
+
}
|
|
251
|
+
function calculatePosition(position, rect, origin) {
|
|
252
|
+
const originRect = getOriginRect(origin);
|
|
253
|
+
const originPoint = getOriginRelativePoint(originRect, position);
|
|
254
|
+
return getOverlayPoint(originPoint, rect, position);
|
|
255
|
+
}
|
|
256
|
+
function getOriginRect(origin) {
|
|
257
|
+
if (origin instanceof Element) {
|
|
258
|
+
return origin.getBoundingClientRect();
|
|
259
|
+
}
|
|
260
|
+
const width = origin.width || 0;
|
|
261
|
+
const height = origin.height || 0;
|
|
262
|
+
return {
|
|
263
|
+
top: origin.y,
|
|
264
|
+
bottom: origin.y + height,
|
|
265
|
+
left: origin.x,
|
|
266
|
+
right: origin.x + width,
|
|
267
|
+
height,
|
|
268
|
+
width
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function getOverlayPoint(originPoint, rect, position) {
|
|
272
|
+
let x;
|
|
273
|
+
const {
|
|
274
|
+
width,
|
|
275
|
+
height
|
|
276
|
+
} = rect;
|
|
277
|
+
if (position.overlayX == "center") {
|
|
278
|
+
x = originPoint.x - width / 2;
|
|
279
|
+
} else {
|
|
280
|
+
x = position.overlayX == "left" ? originPoint.x : originPoint.x - width;
|
|
281
|
+
}
|
|
282
|
+
let y;
|
|
283
|
+
if (position.overlayY == "center") {
|
|
284
|
+
y = originPoint.y - height / 2;
|
|
285
|
+
} else {
|
|
286
|
+
y = position.overlayY == "top" ? originPoint.y : originPoint.y - height;
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
x,
|
|
290
|
+
y
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
function getOriginRelativePoint(originRect, position) {
|
|
294
|
+
let x;
|
|
295
|
+
if (position.originX == "center") {
|
|
296
|
+
x = originRect.left + originRect.width / 2;
|
|
297
|
+
} else {
|
|
298
|
+
const startX = originRect.left;
|
|
299
|
+
const endX = originRect.right;
|
|
300
|
+
x = position.originX == "left" ? startX : endX;
|
|
301
|
+
}
|
|
302
|
+
let y;
|
|
303
|
+
if (position.originY == "center") {
|
|
304
|
+
y = originRect.top + originRect.height / 2;
|
|
305
|
+
} else {
|
|
306
|
+
y = position.originY == "top" ? originRect.top : originRect.bottom;
|
|
307
|
+
}
|
|
308
|
+
return {
|
|
309
|
+
x,
|
|
310
|
+
y
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function subscribeLayoutEvent(event) {
|
|
314
|
+
window.addEventListener("scroll", event, true);
|
|
315
|
+
window.addEventListener("resize", event);
|
|
316
|
+
window.addEventListener("orientationchange", event);
|
|
317
|
+
return () => {
|
|
318
|
+
window.removeEventListener("scroll", event, true);
|
|
319
|
+
window.removeEventListener("resize", event);
|
|
320
|
+
window.removeEventListener("orientationchange", event);
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
function subscribeOverlayResize(overlay2, callback) {
|
|
324
|
+
if (overlay2 instanceof Element) {
|
|
325
|
+
const resizeObserver = new ResizeObserver(callback);
|
|
326
|
+
resizeObserver.observe(overlay2);
|
|
327
|
+
return () => resizeObserver.disconnect();
|
|
328
|
+
}
|
|
329
|
+
return () => {
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
function subscribeOriginResize(origin, callback) {
|
|
333
|
+
if (origin instanceof Element) {
|
|
334
|
+
const observer = new MutationObserver(callback);
|
|
335
|
+
observer.observe(origin, {
|
|
336
|
+
attributeFilter: ["style"]
|
|
337
|
+
});
|
|
338
|
+
return () => observer.disconnect();
|
|
339
|
+
}
|
|
340
|
+
return () => {
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
const inBrowser = typeof window !== "undefined";
|
|
344
|
+
FlexibleOverlay.install = function(app) {
|
|
345
|
+
app.component(FlexibleOverlay.name, FlexibleOverlay);
|
|
346
|
+
};
|
|
347
|
+
FixedOverlay.install = function(app) {
|
|
348
|
+
app.component(FixedOverlay.name, FixedOverlay);
|
|
349
|
+
};
|
|
350
|
+
var index = {
|
|
351
|
+
title: "Overlay \u906E\u7F69\u5C42",
|
|
352
|
+
category: "\u901A\u7528",
|
|
353
|
+
status: "100%",
|
|
354
|
+
install(app) {
|
|
355
|
+
app.use(FixedOverlay);
|
|
356
|
+
app.use(FlexibleOverlay);
|
|
357
|
+
if (inBrowser && !document.getElementById("d-overlay-anchor")) {
|
|
358
|
+
const overlayAnchor = document.createElement("div");
|
|
359
|
+
overlayAnchor.setAttribute("id", "d-overlay-anchor");
|
|
360
|
+
overlayAnchor.style.position = "fixed";
|
|
361
|
+
overlayAnchor.style.left = "0";
|
|
362
|
+
overlayAnchor.style.top = "0";
|
|
363
|
+
overlayAnchor.style.zIndex = "1000";
|
|
364
|
+
document.body.appendChild(overlayAnchor);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
export { FixedOverlay, FlexibleOverlay, index as default };
|
package/overlay/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var J=Object.defineProperty,K=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var F=(l,t,a)=>t in l?J(l,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[t]=a,B=(l,t)=>{for(var a in t||(t={}))W.call(t,a)&&F(l,a,t[a]);if(V)for(var a of V(t))Z.call(t,a)&&F(l,a,t[a]);return l},N=(l,t)=>K(l,Q(t));(function(l,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(l=typeof globalThis!="undefined"?globalThis:l||self,t(l.index={},l.Vue))})(this,function(l,t){"use strict";var a="";function L(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const x=t.defineComponent({setup(e,n){return()=>{let o;return t.createVNode(t.Teleport,{to:"#d-overlay-anchor"},{default:()=>[t.createVNode(t.Transition,{name:"devui-overlay-fade"},L(o=t.renderSlot(n.slots,"default"))?o:{default:()=>[o]})]})}}}),E={visible:{type:Boolean},backgroundBlock:{type:Boolean,default:!1},backgroundClass:{type:String,default:""},backgroundStyle:{type:[String,Object]},onBackdropClick:{type:Function},backdropClose:{type:Boolean,default:!0},hasBackdrop:{type:Boolean,default:!0}},S=["update:visible","backdropClick"],X=N(B({},E),{overlayStyle:{type:[String,Object],default:void 0}}),Y=B({origin:{type:Object,require:!0},position:{type:Object,default:()=>({originX:"left",originY:"top",overlayX:"left",overlayY:"top"})}},E);function R(e,n){const o=t.computed(()=>["devui-overlay-background",e.backgroundClass,e.hasBackdrop?"devui-overlay-background__color":"devui-overlay-background__disabled"]),i=t.computed(()=>"devui-overlay"),c=r=>{var d;r.preventDefault(),(d=e.onBackdropClick)==null||d.call(e),e.backdropClose&&n.emit("update:visible",!1)},s=r=>r.cancelBubble=!0;return t.onMounted(()=>{const r=document.body,d=r.style.overflow,f=r.style.position;t.watch([()=>e.visible,()=>e.backgroundBlock],([p,w])=>{if(w){const C=r.getBoundingClientRect().y;p?(r.style.overflowY="scroll",r.style.position=p?"fixed":"",r.style.top=`${C}px`):(r.style.overflowY=d,r.style.position=f,r.style.top="",window.scrollTo(0,-C))}}),t.onUnmounted(()=>{document.body.style.overflow=d})}),{backgroundClass:o,overlayClass:i,handleBackdropClick:c,handleOverlayBubbleCancel:s}}const v=t.defineComponent({name:"DFixedOverlay",props:X,emits:S,setup(e,n){const{backgroundClass:o,overlayClass:i,handleBackdropClick:c,handleOverlayBubbleCancel:s}=R(e,n);return()=>t.createVNode(x,null,{default:()=>[t.withDirectives(t.createVNode("div",{class:o.value,style:e.backgroundStyle,onClick:c},[t.createVNode("div",{class:i.value,style:e.overlayStyle,onClick:s},[t.renderSlot(n.slots,"default")])]),[[t.vShow,e.visible]])]})}});function _(e){return!!(e==null?void 0:e.$el)}function j(e){return e instanceof Element?e:e&&typeof e=="object"&&e.$el instanceof Element?e.$el:null}const h=t.defineComponent({name:"DFlexibleOverlay",props:Y,emits:S,setup(e,n){const o=t.ref(null),i=t.reactive({position:"absolute"});t.onMounted(async()=>{const f=(u,y,b)=>{const g=T(u,y,b);i.left=`${g.x}px`,i.top=`${g.y}px`},p=t.computed(()=>{const u=o.value,y=z(e.origin);if(!(!u||!y))return{origin:y,overlay:u}}),w=t.toRef(e,"visible"),C=t.toRef(e,"position");t.watch([p,w,C],async([u,y,b],g,G)=>{if(!y||!u)return;const{origin:m,overlay:k}=u;f(b,k.getBoundingClientRect(),m);const H=[P(()=>f(b,k.getBoundingClientRect(),m)),A(k,O=>f(b,O[0].contentRect,m)),q(m,()=>f(b,k.getBoundingClientRect(),m))];G(()=>{H.forEach(O=>O())})})});const{backgroundClass:c,overlayClass:s,handleBackdropClick:r,handleOverlayBubbleCancel:d}=R(e,n);return()=>t.createVNode(x,null,{default:()=>[t.withDirectives(t.createVNode("div",{style:e.backgroundStyle,class:c.value,onClick:r},[t.createVNode("div",{ref:o,class:s.value,style:i,onClick:d},[t.renderSlot(n.slots,"default")])]),[[t.vShow,e.visible]])]})}});function z(e){return e instanceof Element?e:t.isRef(e)?j(e.value):_(e)?j(e):e}function T(e,n,o){const i=$(o),c=M(i,e);return D(c,n,e)}function $(e){if(e instanceof Element)return e.getBoundingClientRect();const n=e.width||0,o=e.height||0;return{top:e.y,bottom:e.y+o,left:e.x,right:e.x+n,height:o,width:n}}function D(e,n,o){let i;const{width:c,height:s}=n;o.overlayX=="center"?i=e.x-c/2:i=o.overlayX=="left"?e.x:e.x-c;let r;return o.overlayY=="center"?r=e.y-s/2:r=o.overlayY=="top"?e.y:e.y-s,{x:i,y:r}}function M(e,n){let o;if(n.originX=="center")o=e.left+e.width/2;else{const c=e.left,s=e.right;o=n.originX=="left"?c:s}let i;return n.originY=="center"?i=e.top+e.height/2:i=n.originY=="top"?e.top:e.bottom,{x:o,y:i}}function P(e){return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}}function A(e,n){if(e instanceof Element){const o=new ResizeObserver(n);return o.observe(e),()=>o.disconnect()}return()=>{}}function q(e,n){if(e instanceof Element){const o=new MutationObserver(n);return o.observe(e,{attributeFilter:["style"]}),()=>o.disconnect()}return()=>{}}const I=typeof window!="undefined";h.install=function(e){e.component(h.name,h)},v.install=function(e){e.component(v.name,v)};var U={title:"Overlay \u906E\u7F69\u5C42",category:"\u901A\u7528",status:"100%",install(e){if(e.use(v),e.use(h),I&&!document.getElementById("d-overlay-anchor")){const n=document.createElement("div");n.setAttribute("id","d-overlay-anchor"),n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.zIndex="1000",document.body.appendChild(n)}}};l.FixedOverlay=v,l.FlexibleOverlay=h,l.default=U,Object.defineProperty(l,"__esModule",{value:!0}),l[Symbol.toStringTag]="Module"});
|
package/overlay/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-overlay-background{position:fixed;top:0;left:0;height:100vh;width:100vw;display:flex}.devui-overlay-background__color{background:rgba(0,0,0,.4)}.devui-overlay-background .devui-overlay{position:relative;z-index:1000;pointer-events:auto}@keyframes d-overlay-fade{0%{opacity:0}to{opacity:1}}.devui-overlay-fade-enter{opacity:0}.devui-overlay-fade-enter-active{animation-name:d-overlay-fade;animation-duration:.3s}.devui-overlay-fade-leave{opacity:1}.devui-overlay-fade-leave-active{animation-name:d-overlay-fade;animation-duration:.3s;animation-direction:reverse}
|
|
1
|
+
.devui-overlay-background{position:fixed;top:0;left:0;height:100vh;width:100vw;display:flex}.devui-overlay-background__color{background:rgba(0,0,0,.4)}.devui-overlay-background .devui-overlay{position:relative;z-index:1000;pointer-events:auto}.devui-overlay-background__disabled{pointer-events:none}@keyframes d-overlay-fade{0%{opacity:0}to{opacity:1}}.devui-overlay-fade-enter{opacity:0}.devui-overlay-fade-enter-active{animation-name:d-overlay-fade;animation-duration:.3s}.devui-overlay-fade-leave{opacity:1}.devui-overlay-fade-leave-active{animation-name:d-overlay-fade;animation-duration:.3s;animation-direction:reverse}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-devui",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-beta.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "DevUI components based on Vite and Vue3",
|
|
6
6
|
"keywords": [
|
|
@@ -18,33 +18,12 @@
|
|
|
18
18
|
"main": "vue-devui.umd.js",
|
|
19
19
|
"module": "vue-devui.es.js",
|
|
20
20
|
"style": "style.css",
|
|
21
|
-
"bin": {
|
|
22
|
-
"devui-cli": "./devui-cli/index.js"
|
|
23
|
-
},
|
|
24
|
-
"scripts": {
|
|
25
|
-
"dev": "vitepress dev docs",
|
|
26
|
-
"build": "vitepress build docs && cp public/* docs/.vitepress/dist/assets",
|
|
27
|
-
"serve": "vitepress serve docs",
|
|
28
|
-
"app:dev": "vite",
|
|
29
|
-
"app:build": "vite build",
|
|
30
|
-
"build:lib": "yarn predev && yarn build:components && yarn generate:theme && yarn copy",
|
|
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
|
-
"build:components": "node ./devui-cli/index.js build",
|
|
37
|
-
"generate:theme": "node ./devui-cli/index.js generate:theme",
|
|
38
|
-
"copy": "cp package.json build && cp README.md build && cp devui/theme/theme.scss build/theme",
|
|
39
|
-
"clean:cli": "npm uninstall -g devui-cli & npm uninstall -g vue-devui",
|
|
40
|
-
"cli:create": "node ./devui-cli/index.js create -t component",
|
|
41
|
-
"predev": "node ./devui-cli/index.js create -t vue-devui --ignore-parse-error",
|
|
42
|
-
"prebuild": "node ./devui-cli/index.js create -t vue-devui --ignore-parse-error"
|
|
43
|
-
},
|
|
44
21
|
"dependencies": {
|
|
45
22
|
"@devui-design/icons": "^1.3.0",
|
|
46
23
|
"@types/lodash-es": "^4.17.4",
|
|
24
|
+
"async-validator": "^4.0.2",
|
|
47
25
|
"lodash-es": "^4.17.20",
|
|
26
|
+
"mitt": "^3.0.0",
|
|
48
27
|
"vue": "^3.1.1",
|
|
49
28
|
"vue-router": "^4.0.3"
|
|
50
29
|
},
|
|
@@ -55,7 +34,6 @@
|
|
|
55
34
|
"@babel/traverse": "^7.15.4",
|
|
56
35
|
"@commitlint/cli": "^11.0.0",
|
|
57
36
|
"@commitlint/config-conventional": "^11.0.0",
|
|
58
|
-
"@ls-lint/ls-lint": "^1.10.0",
|
|
59
37
|
"@types/chalk": "^2.2.0",
|
|
60
38
|
"@types/commander": "^2.12.2",
|
|
61
39
|
"@types/jest": "^26.0.23",
|
|
@@ -72,38 +50,19 @@
|
|
|
72
50
|
"babel-jest": "^27.0.2",
|
|
73
51
|
"chalk": "^4.1.2",
|
|
74
52
|
"commander": "^8.1.0",
|
|
75
|
-
"esbuild-register": "^2.6.0",
|
|
76
|
-
"eslint": "^7.28.0",
|
|
77
|
-
"eslint-plugin-vue": "^7.11.1",
|
|
78
|
-
"husky": "^4.3.7",
|
|
79
53
|
"inquirer": "^8.1.2",
|
|
80
54
|
"jest": "^27.0.4",
|
|
81
|
-
"lint-staged": "^11.0.0",
|
|
82
55
|
"ora": "^5.4.1",
|
|
83
56
|
"patch-vue-directive-ssr": "^0.0.1",
|
|
84
57
|
"sass": "^1.32.2",
|
|
85
58
|
"shelljs": "^0.8.4",
|
|
86
|
-
"stylelint": "^13.13.1",
|
|
87
|
-
"stylelint-config-recommended-scss": "^4.3.0",
|
|
88
|
-
"stylelint-config-standard": "^22.0.0",
|
|
89
|
-
"stylelint-scss": "^3.20.1",
|
|
90
59
|
"typescript": "^4.3.2",
|
|
91
60
|
"vite": "^2.4.4",
|
|
92
61
|
"vite-plugin-md": "^0.6.0",
|
|
93
62
|
"vite-svg-loader": "^2.2.0",
|
|
94
|
-
"vitepress": "
|
|
95
|
-
"vitepress-theme-demoblock": "1.
|
|
63
|
+
"vitepress": "0.20.1",
|
|
64
|
+
"vitepress-theme-demoblock": "1.3.2",
|
|
96
65
|
"vue-tsc": "^0.2.2",
|
|
97
66
|
"yarn": "^1.22.11"
|
|
98
|
-
},
|
|
99
|
-
"husky": {
|
|
100
|
-
"hooks": {
|
|
101
|
-
"pre-commit": "ls-lint && lint-staged",
|
|
102
|
-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"lint-staged": {
|
|
106
|
-
"{src,devui}/**/*.{js,ts,jsx,tsx,vue}": "eslint --fix",
|
|
107
|
-
"{src,devui}/**/*.{scss,css}": "stylelint --fix"
|
|
108
67
|
}
|
|
109
|
-
}
|
|
68
|
+
}
|