vue-devui 1.0.0-pre.0 → 1.0.0-rc.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 +149 -187
- package/alert/index.es.js +74 -45
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +8182 -296
- package/auto-complete/index.umd.js +29 -1
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +153 -146
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.es.js +30 -5
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5741 -127
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.es.js +59 -35
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +8060 -255
- package/checkbox/index.umd.js +27 -1
- package/checkbox/style.css +1 -1
- package/{accordion → collapse}/index.d.ts +0 -0
- package/collapse/index.es.js +379 -0
- package/collapse/index.umd.js +1 -0
- package/{anchor → collapse}/package.json +1 -1
- package/collapse/style.css +1 -0
- package/countdown/index.es.js +5 -7
- package/countdown/index.umd.js +1 -1
- package/date-picker/index.es.js +8159 -288
- package/date-picker/index.umd.js +27 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +31 -4
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +297 -181
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +525 -154
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +1039 -1175
- package/form/index.umd.js +15 -15
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +42 -21
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.es.js +101 -86
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +197 -56
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +55 -31
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +8066 -144
- package/input/index.umd.js +27 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +269 -183
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +40 -25
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.es.js +74 -35
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/modal/index.es.js +412 -204
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +307 -57
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/DropdownPropsKey.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/Icon.js +1 -0
- package/nuxt/components/IconGroup.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/LoadingOptions.js +3 -0
- package/nuxt/components/Option.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/RadioButton.js +3 -0
- package/nuxt/components/Tab.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/autoCompleteProps.js +3 -0
- package/nuxt/components/avatarProps.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.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/editableSelectProps.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/modalProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.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/rowProps.js +3 -0
- package/nuxt/components/screenSizes.js +3 -0
- package/nuxt/components/searchProps.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/svgIconProps.js +3 -0
- package/nuxt/components/switchProps.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/treeProps.js +3 -0
- package/overlay/index.es.js +127 -149
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +10 -44
- package/pagination/index.es.js +158 -148
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/panel/style.css +1 -1
- package/popover/index.es.js +317 -246
- package/popover/index.umd.js +15 -15
- package/popover/style.css +1 -1
- package/progress/index.es.js +110 -56
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +7964 -157
- package/radio/index.umd.js +27 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +77 -55
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +184 -57
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/ripple/index.es.js +47 -42
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +3644 -1122
- package/search/index.umd.js +18 -18
- package/search/style.css +1 -1
- package/select/index.es.js +9144 -597
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +63 -41
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +109 -75
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +469 -349
- package/splitter/index.umd.js +15 -15
- package/splitter/style.css +1 -1
- package/statistic/index.es.js +7 -18
- package/statistic/index.umd.js +1 -1
- package/status/index.es.js +27 -6
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +7794 -64
- package/switch/index.umd.js +27 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +10119 -1206
- package/table/index.umd.js +27 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +342 -141
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +49 -24
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +7913 -83
- package/textarea/index.umd.js +35 -1
- package/textarea/style.css +1 -1
- package/{anchor → timeline}/index.d.ts +0 -0
- package/timeline/index.es.js +425 -0
- package/timeline/index.umd.js +1 -0
- package/{back-top → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +308 -236
- package/tooltip/index.umd.js +15 -15
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +4189 -1851
- package/tree/index.umd.js +18 -18
- package/tree/style.css +1 -1
- package/upload/index.es.js +380 -123
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +18121 -23161
- package/vue-devui.umd.js +25 -15
- package/accordion/index.es.js +0 -720
- package/accordion/index.umd.js +0 -1
- package/accordion/package.json +0 -7
- 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/back-top/index.d.ts +0 -7
- package/back-top/index.es.js +0 -128
- package/back-top/index.umd.js +0 -1
- package/back-top/style.css +0 -1
- package/breadcrumb/index.d.ts +0 -7
- package/breadcrumb/index.es.js +0 -127
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/package.json +0 -7
- package/breadcrumb/style.css +0 -1
- package/carousel/index.d.ts +0 -7
- package/carousel/index.es.js +0 -329
- package/carousel/index.umd.js +0 -1
- package/carousel/package.json +0 -7
- package/carousel/style.css +0 -1
- package/cascader/index.d.ts +0 -7
- package/cascader/index.es.js +0 -5963
- package/cascader/index.umd.js +0 -27
- package/cascader/package.json +0 -7
- package/cascader/style.css +0 -1
- package/color-picker/index.d.ts +0 -7
- package/color-picker/index.es.js +0 -8187
- package/color-picker/index.umd.js +0 -27
- package/color-picker/package.json +0 -7
- package/color-picker/style.css +0 -1
- package/comment/index.d.ts +0 -7
- package/comment/index.es.js +0 -86
- package/comment/index.umd.js +0 -1
- package/comment/package.json +0 -7
- package/comment/style.css +0 -1
- package/dragdrop/index.d.ts +0 -7
- package/dragdrop/index.es.js +0 -157
- package/dragdrop/index.umd.js +0 -1
- package/dragdrop/package.json +0 -7
- package/gantt/index.d.ts +0 -7
- package/gantt/index.es.js +0 -523
- package/gantt/index.umd.js +0 -1
- package/gantt/package.json +0 -7
- package/gantt/style.css +0 -1
- package/input-icon/index.d.ts +0 -7
- package/input-icon/index.es.js +0 -331
- package/input-icon/index.umd.js +0 -1
- package/input-icon/package.json +0 -7
- package/input-icon/style.css +0 -1
- package/list/index.d.ts +0 -7
- package/list/index.es.js +0 -39
- package/list/index.umd.js +0 -1
- package/list/package.json +0 -7
- package/list/style.css +0 -1
- package/nav-sprite/index.d.ts +0 -7
- package/nav-sprite/index.es.js +0 -68
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/nuxt/components/Accordion.js +0 -3
- package/nuxt/components/Anchor.js +0 -3
- package/nuxt/components/BackTop.js +0 -3
- package/nuxt/components/Breadcrumb.js +0 -3
- package/nuxt/components/Carousel.js +0 -3
- package/nuxt/components/CarouselItem.js +0 -3
- package/nuxt/components/Cascader.js +0 -3
- package/nuxt/components/ColorPicker.js +0 -3
- package/nuxt/components/Comment.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/List.js +0 -3
- package/nuxt/components/ListItem.js +0 -3
- package/nuxt/components/NavSprite.js +0 -2
- package/nuxt/components/QuadrantDiagram.js +0 -3
- package/nuxt/components/ReadTip.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/TagInput.js +0 -3
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/TimePicker.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/nuxt/components/overlayEmits.js +0 -3
- package/nuxt/components/overlayProps.js +0 -3
- package/quadrant-diagram/index.d.ts +0 -7
- package/quadrant-diagram/index.es.js +0 -5728
- package/quadrant-diagram/index.umd.js +0 -27
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/read-tip/index.d.ts +0 -7
- package/read-tip/index.es.js +0 -258
- package/read-tip/index.umd.js +0 -1
- package/read-tip/package.json +0 -7
- package/read-tip/style.css +0 -1
- package/steps-guide/index.d.ts +0 -7
- package/steps-guide/index.es.js +0 -239
- 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.d.ts +0 -7
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/sticky/package.json +0 -7
- package/tag-input/index.d.ts +0 -7
- package/tag-input/index.es.js +0 -329
- 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.d.ts +0 -7
- package/time-axis/index.es.js +0 -299
- package/time-axis/index.umd.js +0 -1
- package/time-axis/package.json +0 -7
- package/time-axis/style.css +0 -1
- package/time-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1237
- package/time-picker/index.umd.js +0 -1
- package/time-picker/package.json +0 -7
- package/time-picker/style.css +0 -1
- package/transfer/index.d.ts +0 -7
- package/transfer/index.es.js +0 -7608
- package/transfer/index.umd.js +0 -27
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree-select/index.d.ts +0 -7
- package/tree-select/index.es.js +0 -623
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/layout/index.es.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from "vue";
|
|
2
|
+
function createBem(namespace, element, modifier) {
|
|
3
|
+
let cls = namespace;
|
|
4
|
+
if (element) {
|
|
5
|
+
cls += `__${element}`;
|
|
6
|
+
}
|
|
7
|
+
if (modifier) {
|
|
8
|
+
cls += `--${modifier}`;
|
|
9
|
+
}
|
|
10
|
+
return cls;
|
|
11
|
+
}
|
|
12
|
+
function useNamespace(block, needDot = false) {
|
|
13
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
14
|
+
const b = () => createBem(namespace);
|
|
15
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
16
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
17
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
18
|
+
return {
|
|
19
|
+
b,
|
|
20
|
+
e,
|
|
21
|
+
m,
|
|
22
|
+
em
|
|
23
|
+
};
|
|
24
|
+
}
|
|
2
25
|
var layout = "";
|
|
3
26
|
var Layout = defineComponent({
|
|
4
27
|
name: "DLayout",
|
|
@@ -6,11 +29,12 @@ var Layout = defineComponent({
|
|
|
6
29
|
setup(props, {
|
|
7
30
|
slots
|
|
8
31
|
}) {
|
|
32
|
+
const ns = useNamespace("layout");
|
|
9
33
|
return () => {
|
|
10
34
|
var _a;
|
|
11
35
|
const slotDefault = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
12
36
|
const isAside = slotDefault.some((item) => item.type.name === "DAside");
|
|
13
|
-
const classNames = `${isAside ? "
|
|
37
|
+
const classNames = `${isAside ? ns.e("aside") : ""} ${ns.b()}`;
|
|
14
38
|
return createVNode("div", {
|
|
15
39
|
"class": classNames
|
|
16
40
|
}, [slotDefault]);
|
|
@@ -23,10 +47,11 @@ var Content = defineComponent({
|
|
|
23
47
|
setup(props, {
|
|
24
48
|
slots
|
|
25
49
|
}) {
|
|
50
|
+
const ns = useNamespace("layout");
|
|
26
51
|
return () => {
|
|
27
52
|
var _a;
|
|
28
53
|
return createVNode("div", {
|
|
29
|
-
"class": "
|
|
54
|
+
"class": ns.e("content")
|
|
30
55
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
31
56
|
};
|
|
32
57
|
}
|
|
@@ -37,10 +62,11 @@ var Header = defineComponent({
|
|
|
37
62
|
setup(props, {
|
|
38
63
|
slots
|
|
39
64
|
}) {
|
|
65
|
+
const ns = useNamespace("layout");
|
|
40
66
|
return () => {
|
|
41
67
|
var _a;
|
|
42
68
|
return createVNode("div", {
|
|
43
|
-
"class": "
|
|
69
|
+
"class": ns.e("header")
|
|
44
70
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
45
71
|
};
|
|
46
72
|
}
|
|
@@ -51,10 +77,11 @@ var Footer = defineComponent({
|
|
|
51
77
|
setup(props, {
|
|
52
78
|
slots
|
|
53
79
|
}) {
|
|
80
|
+
const ns = useNamespace("layout");
|
|
54
81
|
return () => {
|
|
55
82
|
var _a;
|
|
56
83
|
return createVNode("div", {
|
|
57
|
-
"class": "
|
|
84
|
+
"class": ns.e("footer")
|
|
58
85
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
59
86
|
};
|
|
60
87
|
}
|
|
@@ -64,37 +91,25 @@ var Aside = defineComponent({
|
|
|
64
91
|
setup(props, {
|
|
65
92
|
slots
|
|
66
93
|
}) {
|
|
94
|
+
const ns = useNamespace("layout");
|
|
67
95
|
return () => {
|
|
68
96
|
var _a;
|
|
69
|
-
return createVNode("div",
|
|
97
|
+
return createVNode("div", {
|
|
98
|
+
"class": ns.e("aside")
|
|
99
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
70
100
|
};
|
|
71
101
|
}
|
|
72
102
|
});
|
|
73
|
-
Layout.install = function(app) {
|
|
74
|
-
app.component(Layout.name, Layout);
|
|
75
|
-
};
|
|
76
|
-
Content.install = function(app) {
|
|
77
|
-
app.component(Content.name, Content);
|
|
78
|
-
};
|
|
79
|
-
Header.install = function(app) {
|
|
80
|
-
app.component(Header.name, Header);
|
|
81
|
-
};
|
|
82
|
-
Footer.install = function(app) {
|
|
83
|
-
app.component(Footer.name, Footer);
|
|
84
|
-
};
|
|
85
|
-
Aside.install = function(app) {
|
|
86
|
-
app.component(Aside.name, Aside);
|
|
87
|
-
};
|
|
88
103
|
var index = {
|
|
89
104
|
title: "Layout \u5E03\u5C40",
|
|
90
105
|
category: "\u5E03\u5C40",
|
|
91
106
|
status: "100%",
|
|
92
107
|
install(app) {
|
|
93
|
-
app.
|
|
94
|
-
app.
|
|
95
|
-
app.
|
|
96
|
-
app.
|
|
97
|
-
app.
|
|
108
|
+
app.component(Layout.name, Layout);
|
|
109
|
+
app.component(Content.name, Content);
|
|
110
|
+
app.component(Header.name, Header);
|
|
111
|
+
app.component(Footer.name, Footer);
|
|
112
|
+
app.component(Aside.name, Aside);
|
|
98
113
|
}
|
|
99
114
|
};
|
|
100
115
|
export { Aside, Content, Footer, Header, Layout, index as default };
|
package/layout/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(d,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(d=typeof globalThis!="undefined"?globalThis:d||self,o(d.index={},d.Vue))})(this,function(d,o){"use strict";function c(a,e,t){let n=a;return e&&(n+=`__${e}`),t&&(n+=`--${t}`),n}function u(a,e=!1){const t=e?`.devui-${a}`:`devui-${a}`;return{b:()=>c(t),e:r=>r?c(t,r):"",m:r=>r?c(t,"",r):"",em:(r,C)=>r&&C?c(t,r,C):""}}var l="",i=o.defineComponent({name:"DLayout",emits:[],setup(a,{slots:e}){const t=u("layout");return()=>{var y;const n=(y=e.default)==null?void 0:y.call(e),v=`${n.some(r=>r.type.name==="DAside")?t.e("aside"):""} ${t.b()}`;return o.createVNode("div",{class:v},[n])}}}),A="",f=o.defineComponent({name:"DContent",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("content")},[(n=e.default)==null?void 0:n.call(e)])}}}),V="",m=o.defineComponent({name:"DHeader",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("header")},[(n=e.default)==null?void 0:n.call(e)])}}}),$="",s=o.defineComponent({name:"DFooter",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("footer")},[(n=e.default)==null?void 0:n.call(e)])}}}),p=o.defineComponent({name:"DAside",setup(a,{slots:e}){const t=u("layout");return()=>{var n;return o.createVNode("div",{class:t.e("aside")},[(n=e.default)==null?void 0:n.call(e)])}}}),D={title:"Layout \u5E03\u5C40",category:"\u5E03\u5C40",status:"100%",install(a){a.component(i.name,i),a.component(f.name,f),a.component(m.name,m),a.component(s.name,s),a.component(p.name,p)}};d.Aside=p,d.Content=f,d.Footer=s,d.Header=m,d.Layout=i,d.default=D,Object.defineProperty(d,"__esModule",{value:!0}),d[Symbol.toStringTag]="Module"});
|
package/layout/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-layout{display:flex;flex-direction:column;flex:auto}.devui-
|
|
1
|
+
.devui-layout{display:flex;flex-direction:column;flex:auto}.devui-layout__aside{flex-direction:row}.devui-layout__content{flex:auto;min-height:0}.devui-layout__header{min-height:40px;flex:auto}.devui-layout__footer{text-align:center;line-height:1.5}
|
package/loading/index.es.js
CHANGED
|
@@ -28,7 +28,7 @@ class View {
|
|
|
28
28
|
__publicField(this, "left", "50%");
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const loadingProps = {
|
|
32
32
|
message: String,
|
|
33
33
|
backdrop: Boolean,
|
|
34
34
|
view: {
|
|
@@ -41,7 +41,7 @@ const componentProps = {
|
|
|
41
41
|
default: false
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
class
|
|
44
|
+
class LoadingOptions {
|
|
45
45
|
constructor() {
|
|
46
46
|
__publicField(this, "target");
|
|
47
47
|
__publicField(this, "message");
|
|
@@ -52,11 +52,34 @@ class LoadingProps {
|
|
|
52
52
|
__publicField(this, "zIndex");
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
function createBem(namespace, element, modifier) {
|
|
56
|
+
let cls = namespace;
|
|
57
|
+
if (element) {
|
|
58
|
+
cls += `__${element}`;
|
|
59
|
+
}
|
|
60
|
+
if (modifier) {
|
|
61
|
+
cls += `--${modifier}`;
|
|
62
|
+
}
|
|
63
|
+
return cls;
|
|
64
|
+
}
|
|
65
|
+
function useNamespace(block, needDot = false) {
|
|
66
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
67
|
+
const b = () => createBem(namespace);
|
|
68
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
69
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
70
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
71
|
+
return {
|
|
72
|
+
b,
|
|
73
|
+
e,
|
|
74
|
+
m,
|
|
75
|
+
em
|
|
76
|
+
};
|
|
77
|
+
}
|
|
55
78
|
var loading$1 = "";
|
|
56
79
|
var Loading = defineComponent({
|
|
57
80
|
name: "DLoading",
|
|
58
81
|
inheritAttrs: false,
|
|
59
|
-
props:
|
|
82
|
+
props: loadingProps,
|
|
60
83
|
setup(props) {
|
|
61
84
|
const style = {
|
|
62
85
|
top: props.view.top,
|
|
@@ -90,33 +113,34 @@ var Loading = defineComponent({
|
|
|
90
113
|
message,
|
|
91
114
|
$slots
|
|
92
115
|
} = this;
|
|
116
|
+
const ns = useNamespace("loading");
|
|
93
117
|
return isShow && createVNode("div", {
|
|
94
|
-
"class": [
|
|
118
|
+
"class": [ns.b(), isFull ? ns.m("full") : ""]
|
|
95
119
|
}, [((_a = $slots.default) == null ? void 0 : _a.call($slots)) || createVNode("div", {
|
|
96
|
-
"class": "
|
|
120
|
+
"class": ns.e("wrapper")
|
|
97
121
|
}, [backdrop ? createVNode("div", {
|
|
98
|
-
"class": "
|
|
122
|
+
"class": ns.e("mask")
|
|
99
123
|
}, null) : null, createVNode("div", {
|
|
100
124
|
"style": style,
|
|
101
|
-
"class": "
|
|
125
|
+
"class": ns.e("area")
|
|
102
126
|
}, [createVNode("div", {
|
|
103
|
-
"class": "
|
|
127
|
+
"class": ns.e("busy-default-spinner")
|
|
104
128
|
}, [createVNode("div", {
|
|
105
|
-
"class": "
|
|
129
|
+
"class": ns.e("bar1")
|
|
106
130
|
}, null), createVNode("div", {
|
|
107
|
-
"class": "
|
|
131
|
+
"class": ns.e("bar2")
|
|
108
132
|
}, null), createVNode("div", {
|
|
109
|
-
"class": "
|
|
133
|
+
"class": ns.e("bar3")
|
|
110
134
|
}, null), createVNode("div", {
|
|
111
|
-
"class": "
|
|
135
|
+
"class": ns.e("bar4")
|
|
112
136
|
}, null)]), message ? createVNode("span", {
|
|
113
|
-
"class": "
|
|
137
|
+
"class": ns.e("text")
|
|
114
138
|
}, [message]) : null])])]);
|
|
115
139
|
}
|
|
116
140
|
});
|
|
117
141
|
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
118
|
-
function createComponent(
|
|
119
|
-
const vnode = h(
|
|
142
|
+
function createComponent(component, props, children = null) {
|
|
143
|
+
const vnode = h(component, __spreadValues({}, props), children);
|
|
120
144
|
const container = document.createElement("div");
|
|
121
145
|
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
122
146
|
render(vnode, container);
|
|
@@ -128,14 +152,18 @@ function unmountComponent(ComponnetInstance) {
|
|
|
128
152
|
const loadingConstructor$1 = defineComponent(Loading);
|
|
129
153
|
const cacheInstance = /* @__PURE__ */ new WeakSet();
|
|
130
154
|
const isEmpty = (val) => {
|
|
131
|
-
if (!val)
|
|
155
|
+
if (!val) {
|
|
132
156
|
return true;
|
|
133
|
-
|
|
157
|
+
}
|
|
158
|
+
if (Array.isArray(val)) {
|
|
134
159
|
return val.length === 0;
|
|
135
|
-
|
|
160
|
+
}
|
|
161
|
+
if (val instanceof Set || val instanceof Map) {
|
|
136
162
|
return val.size === 0;
|
|
137
|
-
|
|
163
|
+
}
|
|
164
|
+
if (val instanceof Promise) {
|
|
138
165
|
return false;
|
|
166
|
+
}
|
|
139
167
|
if (typeof val === "object") {
|
|
140
168
|
try {
|
|
141
169
|
return Object.keys(val).length === 0;
|
|
@@ -169,11 +197,13 @@ const unmount = (el) => {
|
|
|
169
197
|
unmountComponent(el.instance);
|
|
170
198
|
};
|
|
171
199
|
const toggleLoading = (el, binding) => {
|
|
200
|
+
var _a, _b, _c;
|
|
172
201
|
if (binding.value) {
|
|
173
202
|
const vals = isPromise(binding.value);
|
|
174
|
-
if (vals === "error")
|
|
203
|
+
if (vals === "error") {
|
|
175
204
|
return;
|
|
176
|
-
|
|
205
|
+
}
|
|
206
|
+
(_c = (_b = (_a = el == null ? void 0 : el.instance) == null ? void 0 : _a.proxy) == null ? void 0 : _b.open) == null ? void 0 : _c.call(_b);
|
|
177
207
|
el.appendChild(el.mask);
|
|
178
208
|
cacheInstance.add(el);
|
|
179
209
|
if (vals) {
|
|
@@ -196,13 +226,14 @@ const removeAttribute = (el) => {
|
|
|
196
226
|
el.removeAttribute("loadingtemplateref");
|
|
197
227
|
};
|
|
198
228
|
const handleProps = (el, vprops) => {
|
|
199
|
-
|
|
229
|
+
var _a;
|
|
230
|
+
const props = __spreadValues(__spreadValues({}, new LoadingOptions()), vprops);
|
|
200
231
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
201
232
|
const loadingInstance = createComponent(loadingConstructor$1, __spreadValues({}, props), loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
202
233
|
el.style.position = props.positionType;
|
|
203
234
|
el.options = props;
|
|
204
235
|
el.instance = loadingInstance;
|
|
205
|
-
el.mask = loadingInstance.proxy.$el;
|
|
236
|
+
el.mask = (_a = loadingInstance == null ? void 0 : loadingInstance.proxy) == null ? void 0 : _a.$el;
|
|
206
237
|
};
|
|
207
238
|
const loadingDirective = {
|
|
208
239
|
mounted: function(el, binding, vnode) {
|
|
@@ -211,8 +242,9 @@ const loadingDirective = {
|
|
|
211
242
|
!isEmpty(binding.value) && toggleLoading(el, binding);
|
|
212
243
|
},
|
|
213
244
|
updated: function(el, binding, vnode) {
|
|
214
|
-
if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el))
|
|
245
|
+
if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el)) {
|
|
215
246
|
return;
|
|
247
|
+
}
|
|
216
248
|
!cacheInstance.has(el) && handleProps(el, vnode.props);
|
|
217
249
|
removeAttribute(el);
|
|
218
250
|
toggleLoading(el, binding);
|
|
@@ -222,25 +254,32 @@ const loadingConstructor = defineComponent(Loading);
|
|
|
222
254
|
const cacheTarget = /* @__PURE__ */ new WeakMap();
|
|
223
255
|
const loading = {
|
|
224
256
|
open(options = {}) {
|
|
257
|
+
var _a, _b, _c;
|
|
225
258
|
const parent = options.target || document.body;
|
|
226
259
|
if (cacheTarget.has(parent)) {
|
|
227
260
|
return cacheTarget.get(parent);
|
|
228
261
|
}
|
|
229
|
-
parent.style
|
|
262
|
+
if (parent.style) {
|
|
263
|
+
parent.style.position = options.positionType;
|
|
264
|
+
}
|
|
230
265
|
const isFull = document.body === parent;
|
|
231
|
-
options = __spreadValues(__spreadValues({}, new
|
|
266
|
+
options = __spreadValues(__spreadValues({}, new LoadingOptions()), options);
|
|
232
267
|
const instance = createComponent(loadingConstructor, __spreadProps(__spreadValues({}, options), {
|
|
233
268
|
isFull
|
|
234
269
|
}), options.loadingTemplateRef ? () => options.loadingTemplateRef : null);
|
|
235
270
|
cacheTarget.set(parent, instance);
|
|
236
|
-
instance.proxy.open();
|
|
237
|
-
parent.appendChild(instance.proxy.$el);
|
|
238
|
-
const close = instance.proxy.close;
|
|
239
|
-
instance
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
271
|
+
(_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.open();
|
|
272
|
+
parent.appendChild((_b = instance == null ? void 0 : instance.proxy) == null ? void 0 : _b.$el);
|
|
273
|
+
const close = (_c = instance == null ? void 0 : instance.proxy) == null ? void 0 : _c.close;
|
|
274
|
+
if (instance) {
|
|
275
|
+
instance.loadingInstance = instance == null ? void 0 : instance.proxy;
|
|
276
|
+
if (instance.loadingInstance) {
|
|
277
|
+
instance.loadingInstance.close = (...args) => {
|
|
278
|
+
cacheTarget.delete(parent);
|
|
279
|
+
close == null ? void 0 : close(...args);
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
}
|
|
244
283
|
return instance;
|
|
245
284
|
}
|
|
246
285
|
};
|
|
@@ -253,4 +292,4 @@ var index = {
|
|
|
253
292
|
app.config.globalProperties.$loadingService = loading;
|
|
254
293
|
}
|
|
255
294
|
};
|
|
256
|
-
export { loadingDirective as Loading, loading as LoadingService, index as default };
|
|
295
|
+
export { loadingDirective as Loading, LoadingOptions, loading as LoadingService, index as default, loadingProps };
|
package/loading/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var B=Object.defineProperty,D=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var v=(s,t,c)=>t in s?B(s,t,{enumerable:!0,configurable:!0,writable:!0,value:c}):s[t]=c,p=(s,t)=>{for(var c in t||(t={}))I.call(t,c)&&v(s,c,t[c]);if(C)for(var c of C(t))W.call(t,c)&&v(s,c,t[c]);return s},_=(s,t)=>D(s,F(t));var u=(s,t,c)=>(v(s,typeof t!="symbol"?t+"":t,c),c);(function(s,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(s=typeof globalThis!="undefined"?globalThis:s||self,t(s.index={},s.Vue))})(this,function(s,t){"use strict";class c{constructor(){u(this,"top","50%");u(this,"left","50%")}}const w={message:String,backdrop:Boolean,view:{type:Object,default:()=>new c},zIndex:Number,isFull:{type:Boolean,default:!1}};class b{constructor(){u(this,"target");u(this,"message");u(this,"loadingTemplateRef");u(this,"backdrop",!0);u(this,"positionType","relative");u(this,"view",new c);u(this,"zIndex")}}function m(e,o,r){let n=e;return o&&(n+=`__${o}`),r&&(n+=`--${r}`),n}function $(e,o=!1){const r=o?`.devui-${e}`:`devui-${e}`;return{b:()=>m(r),e:l=>l?m(r,l):"",m:l=>l?m(r,"",l):"",em:(l,y)=>l&&y?m(r,l,y):""}}var q="",N=t.defineComponent({name:"DLoading",inheritAttrs:!1,props:w,setup(e){const o={top:e.view.top,left:e.view.left,zIndex:e.zIndex};e.message||(o.background="none");const r=t.ref(!1);return{style:o,isShow:r,open:()=>{r.value=!0},close:()=>{r.value=!1}}},render(){var l;const{isShow:e,isFull:o,backdrop:r,style:n,message:a,$slots:d}=this,i=$("loading");return e&&t.createVNode("div",{class:[i.b(),o?i.m("full"):""]},[((l=d.default)==null?void 0:l.call(d))||t.createVNode("div",{class:i.e("wrapper")},[r?t.createVNode("div",{class:i.e("mask")},null):null,t.createVNode("div",{style:n,class:i.e("area")},[t.createVNode("div",{class:i.e("busy-default-spinner")},[t.createVNode("div",{class:i.e("bar1")},null),t.createVNode("div",{class:i.e("bar2")},null),t.createVNode("div",{class:i.e("bar3")},null),t.createVNode("div",{class:i.e("bar4")},null)]),a?t.createVNode("span",{class:i.e("text")},[a]):null])])])}});const T=Symbol("dev_component_container");function A(e,o,r=null){const n=t.h(e,p({},o),r),a=document.createElement("div");return n[T]=a,t.render(n,a),n.component}function j(e){t.render(null,e==null?void 0:e.vnode[T])}const z=t.defineComponent(N),f=new WeakSet,h=e=>{if(!e)return!0;if(Array.isArray(e))return e.length===0;if(e instanceof Set||e instanceof Map)return e.size===0;if(e instanceof Promise)return!1;if(typeof e=="object")try{return Object.keys(e).length===0}catch{return!1}return!1},x=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),E=e=>{switch(x(e)){case"promise":return[e];case"array":return e.some(r=>x(r)!=="promise")?(console.error(new TypeError("Binding values should all be of type Promise")),"error"):e;default:return!1}},S=e=>{f.delete(e),e.instance.proxy.close(),j(e.instance)},V=(e,o)=>{var r,n,a;if(o.value){const d=E(o.value);if(d==="error")return;(a=(n=(r=e==null?void 0:e.instance)==null?void 0:r.proxy)==null?void 0:n.open)==null||a.call(n),e.appendChild(e.mask),f.add(e),d&&Promise.all(d).catch(i=>{console.error(new Error("Promise handling errors"),i)}).finally(()=>{S(e)})}else S(e)},L=e=>{e.removeAttribute("zindex"),e.removeAttribute("positiontype"),e.removeAttribute("backdrop"),e.removeAttribute("message"),e.removeAttribute("view"),e.removeAttribute("loadingtemplateref")},P=(e,o)=>{var d;const r=p(p({},new b),o),n=r.loadingTemplateRef,a=A(z,p({},r),n?()=>n:null);e.style.position=r.positionType,e.options=r,e.instance=a,e.mask=(d=a==null?void 0:a.proxy)==null?void 0:d.$el},k={mounted:function(e,o,r){P(e,r.props),L(e),!h(o.value)&&V(e,o)},updated:function(e,o,r){!h(o.value)&&f.has(e)||h(o.value)&&!f.has(e)||(!f.has(e)&&P(e,r.props),L(e),V(e,o))}},M=t.defineComponent(N),g=new WeakMap,O={open(e={}){var d,i,l;const o=e.target||document.body;if(g.has(o))return g.get(o);o.style&&(o.style.position=e.positionType);const r=document.body===o;e=p(p({},new b),e);const n=A(M,_(p({},e),{isFull:r}),e.loadingTemplateRef?()=>e.loadingTemplateRef:null);g.set(o,n),(d=n==null?void 0:n.proxy)==null||d.open(),o.appendChild((i=n==null?void 0:n.proxy)==null?void 0:i.$el);const a=(l=n==null?void 0:n.proxy)==null?void 0:l.close;return n&&(n.loadingInstance=n==null?void 0:n.proxy,n.loadingInstance&&(n.loadingInstance.close=(...y)=>{g.delete(o),a==null||a(...y)})),n}};var R={title:"Loading \u52A0\u8F7D\u63D0\u793A",category:"\u53CD\u9988",status:"100%",install(e){e.directive("dLoading",k),e.config.globalProperties.$loadingService=O}};s.Loading=k,s.LoadingOptions=b,s.LoadingService=O,s.default=R,s.loadingProps=w,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
|
package/loading/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(
|
|
1
|
+
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #d7d8da);opacity:.3}.devui-loading__wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:9999}.devui-loading--hidden{overflow:hidden}.devui-loading__text{margin-left:10px}.devui-loading__area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-loading__busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-loading__busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-loading__busy-default-spinner .devui-loading__bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-loading__busy-default-spinner .devui-loading__bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}
|