vue-devui 1.0.0-beta.16 → 1.0.0-beta.19
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 +29 -21
- package/accordion/index.es.js +229 -14
- package/accordion/index.umd.js +1 -1
- package/accordion/style.css +1 -1
- package/alert/index.es.js +28 -30
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +133 -271
- package/auto-complete/index.umd.js +1 -1
- package/auto-complete/style.css +1 -1
- package/back-top/index.es.js +5 -3
- package/back-top/index.umd.js +1 -1
- package/badge/index.es.js +13 -19
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/breadcrumb/index.es.js +2 -1
- package/button/index.es.js +95 -122
- package/button/index.umd.js +1 -1
- package/button/style.css +1 -1
- package/carousel/index.es.js +38 -53
- package/carousel/index.umd.js +1 -1
- package/cascader/index.es.js +5412 -784
- package/cascader/index.umd.js +27 -1
- package/cascader/style.css +1 -1
- package/checkbox/style.css +1 -1
- package/color-picker/index.es.js +5517 -281
- package/color-picker/index.umd.js +27 -1
- package/color-picker/style.css +1 -1
- package/countdown/index.es.js +9 -8
- package/date-picker/index.es.js +44 -62
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +159 -324
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +459 -301
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +293 -5724
- package/editable-select/index.umd.js +1 -27
- package/editable-select/style.css +1 -1
- package/form/index.es.js +6125 -535
- package/form/index.umd.js +27 -1
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +112 -133
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/gantt/index.es.js +3 -15
- package/gantt/index.umd.js +1 -1
- package/gantt/style.css +1 -1
- package/grid/index.es.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +39 -57
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +2 -1
- package/input/index.es.js +4 -5
- package/input/index.umd.js +1 -1
- package/input/style.css +1 -1
- package/input-icon/index.es.js +42 -42
- package/input-icon/index.umd.js +1 -1
- package/input-icon/style.css +1 -1
- package/input-number/index.es.js +46 -57
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/{time-axis → list}/index.d.ts +0 -0
- package/list/index.es.js +39 -0
- package/list/index.umd.js +1 -0
- package/{toast → list}/package.json +1 -1
- package/list/style.css +1 -0
- package/loading/index.es.js +2 -2
- package/modal/index.es.js +300 -960
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/nav-sprite/index.es.js +1 -675
- package/nav-sprite/index.umd.js +1 -1
- package/{toast → notification}/index.d.ts +0 -0
- package/notification/index.es.js +284 -0
- package/notification/index.umd.js +1 -0
- package/notification/package.json +7 -0
- package/notification/style.css +1 -0
- package/nuxt/components/DropdownMenu.js +3 -0
- package/nuxt/components/IFileOptions.js +3 -0
- package/nuxt/components/IUploadOptions.js +3 -0
- package/nuxt/components/List.js +3 -0
- package/nuxt/components/ListItem.js +3 -0
- package/nuxt/components/Notification.js +3 -0
- package/nuxt/components/NotificationService.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/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/UploadStatus.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/badgeProps.js +3 -0
- package/nuxt/components/dropdownMenuProps.js +3 -0
- package/nuxt/components/fixedOverlayProps.js +3 -0
- package/nuxt/components/flexibleOverlayProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +2 -0
- package/nuxt/components/notificationProps.js +3 -0
- package/nuxt/components/overlayEmits.js +3 -0
- package/nuxt/components/overlayProps.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/searchProps.js +3 -0
- package/nuxt/components/tooltipProps.js +3 -0
- package/nuxt/components/uploadProps.js +3 -0
- package/overlay/index.es.js +152 -198
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +12 -60
- package/pagination/index.es.js +11 -13
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +48 -35
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +5954 -201
- package/popover/index.umd.js +27 -1
- package/popover/style.css +1 -1
- package/quadrant-diagram/index.es.js +5405 -166
- package/quadrant-diagram/index.umd.js +27 -1
- package/radio/style.css +1 -1
- package/read-tip/index.es.js +6 -3
- package/read-tip/style.css +1 -1
- package/result/index.es.js +38 -53
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +10 -6
- package/search/index.es.js +5428 -200
- package/search/index.umd.js +27 -1
- package/search/style.css +1 -1
- package/select/index.es.js +43 -43
- package/select/index.umd.js +1 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +17 -17
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +2 -1
- package/splitter/index.es.js +5815 -99
- package/splitter/index.umd.js +27 -1
- package/splitter/style.css +1 -1
- package/status/index.es.js +1 -4
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/steps-guide/index.es.js +6 -3
- package/sticky/index.umd.js +1 -1
- package/style.css +1 -1
- package/table/index.es.js +548 -360
- package/table/index.umd.js +1 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +3 -4
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +2 -1
- package/tag-input/index.es.js +4 -2
- package/textarea/style.css +1 -1
- package/{theme → theme/theme.scss} +0 -0
- package/time-picker/index.es.js +98 -123
- package/time-picker/index.umd.js +1 -1
- package/time-picker/style.css +1 -1
- package/timeline/index.d.ts +7 -0
- package/{time-axis → timeline}/index.es.js +65 -78
- package/timeline/index.umd.js +1 -0
- package/{time-axis → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +5804 -94
- package/tooltip/index.umd.js +27 -1
- package/tooltip/style.css +1 -1
- package/transfer/index.es.js +5896 -404
- package/transfer/index.umd.js +27 -1
- package/transfer/style.css +1 -1
- package/tree/index.es.js +5439 -814
- package/tree/index.umd.js +27 -1
- package/tree/style.css +1 -1
- package/tree-select/index.es.js +11 -7
- package/tree-select/style.css +1 -1
- package/upload/index.es.js +335 -2213
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +9709 -12248
- package/vue-devui.umd.js +20 -20
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/Toast.js +0 -3
- package/nuxt/components/ToastService.js +0 -3
- package/time-axis/index.umd.js +0 -1
- package/time-axis/style.css +0 -1
- package/toast/index.es.js +0 -2063
- package/toast/index.umd.js +0 -1
- package/toast/style.css +0 -1
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
import { defineComponent, createVNode, inject, createTextVNode, provide, ref, reactive, onMounted, watch, toRef, nextTick, Fragment } from "vue";
|
|
1
|
+
import { defineComponent, toRefs, createVNode, inject, createTextVNode, provide, ref, reactive, onMounted, watch, toRef, nextTick, Fragment } from "vue";
|
|
18
2
|
const timeAxisProps = {
|
|
19
3
|
direction: {
|
|
20
4
|
type: String,
|
|
@@ -33,50 +17,51 @@ const timeAxisProps = {
|
|
|
33
17
|
default: "left"
|
|
34
18
|
}
|
|
35
19
|
};
|
|
20
|
+
const iconProps = {
|
|
21
|
+
name: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "",
|
|
24
|
+
required: true
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "inherit"
|
|
29
|
+
},
|
|
30
|
+
color: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "inherit"
|
|
33
|
+
},
|
|
34
|
+
classPrefix: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "icon"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
36
39
|
var DIcon = defineComponent({
|
|
37
40
|
name: "DIcon",
|
|
38
|
-
props:
|
|
39
|
-
name: {
|
|
40
|
-
type: String,
|
|
41
|
-
required: true
|
|
42
|
-
},
|
|
43
|
-
size: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: "inherit"
|
|
46
|
-
},
|
|
47
|
-
color: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: "inherit"
|
|
50
|
-
},
|
|
51
|
-
classPrefix: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: "icon"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
41
|
+
props: iconProps,
|
|
56
42
|
setup(props) {
|
|
57
|
-
return __spreadValues({}, props);
|
|
58
|
-
},
|
|
59
|
-
render() {
|
|
60
43
|
const {
|
|
61
44
|
name,
|
|
62
45
|
size,
|
|
63
46
|
color,
|
|
64
47
|
classPrefix
|
|
65
|
-
} =
|
|
66
|
-
return
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
48
|
+
} = toRefs(props);
|
|
49
|
+
return () => {
|
|
50
|
+
return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
|
|
51
|
+
"src": name.value,
|
|
52
|
+
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
53
|
+
"style": {
|
|
54
|
+
width: size.value,
|
|
55
|
+
verticalAlign: "text-bottom"
|
|
56
|
+
}
|
|
57
|
+
}, null) : createVNode("i", {
|
|
58
|
+
"class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
|
|
59
|
+
"style": {
|
|
60
|
+
fontSize: size.value,
|
|
61
|
+
color: color.value
|
|
62
|
+
}
|
|
63
|
+
}, null);
|
|
64
|
+
};
|
|
80
65
|
}
|
|
81
66
|
});
|
|
82
67
|
const timeAxisItemProps = {
|
|
@@ -105,16 +90,16 @@ const timeAxisItemProps = {
|
|
|
105
90
|
default: "primary"
|
|
106
91
|
}
|
|
107
92
|
};
|
|
108
|
-
var
|
|
109
|
-
name: "
|
|
93
|
+
var TimelineItem = defineComponent({
|
|
94
|
+
name: "DTimelineItem",
|
|
110
95
|
components: {
|
|
111
96
|
DIcon
|
|
112
97
|
},
|
|
113
98
|
props: timeAxisItemProps,
|
|
114
99
|
emits: [],
|
|
115
100
|
setup(props, ctx) {
|
|
116
|
-
const
|
|
117
|
-
const itemClass = "devui-
|
|
101
|
+
const timeAxis = inject("timeAxis");
|
|
102
|
+
const itemClass = "devui-timeline-item";
|
|
118
103
|
const renderTime = () => {
|
|
119
104
|
var _a, _b;
|
|
120
105
|
return createVNode("div", {
|
|
@@ -131,7 +116,7 @@ var TimeAxisItem = defineComponent({
|
|
|
131
116
|
if (types.includes(props.position)) {
|
|
132
117
|
return renderContent();
|
|
133
118
|
} else {
|
|
134
|
-
if (
|
|
119
|
+
if (timeAxis.props.direction === "horizontal") {
|
|
135
120
|
return renderTime();
|
|
136
121
|
} else {
|
|
137
122
|
return props.timePosition === "left" ? renderTime() : "";
|
|
@@ -171,7 +156,7 @@ var TimeAxisItem = defineComponent({
|
|
|
171
156
|
"class": `${itemClass}-data-left ${itemClass}-data-top`
|
|
172
157
|
}, [renderPosition(["top", "left"])]), createVNode("div", {
|
|
173
158
|
"class": `${itemClass}-axis`
|
|
174
|
-
}, [renderDot(),
|
|
159
|
+
}, [renderDot(), timeAxis.props.direction === "vertical" && props.timePosition === "bottom" ? renderTime() : "", createVNode("div", {
|
|
175
160
|
"class": `${itemClass}-line ${itemClass}-line-style-${props.lineStyle}`,
|
|
176
161
|
"style": {
|
|
177
162
|
borderColor: props.lineColor
|
|
@@ -184,11 +169,11 @@ var TimeAxisItem = defineComponent({
|
|
|
184
169
|
};
|
|
185
170
|
}
|
|
186
171
|
});
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
name: "
|
|
172
|
+
var timeline = "";
|
|
173
|
+
var Timeline = defineComponent({
|
|
174
|
+
name: "DTimeline",
|
|
190
175
|
components: {
|
|
191
|
-
|
|
176
|
+
TimelineItem
|
|
192
177
|
},
|
|
193
178
|
props: timeAxisProps,
|
|
194
179
|
emits: [],
|
|
@@ -197,7 +182,7 @@ var TimeAxis = defineComponent({
|
|
|
197
182
|
ctx,
|
|
198
183
|
props
|
|
199
184
|
});
|
|
200
|
-
const
|
|
185
|
+
const timeAxis = ref();
|
|
201
186
|
const style = reactive({
|
|
202
187
|
marginLeft: "0px",
|
|
203
188
|
height: "auto"
|
|
@@ -208,11 +193,11 @@ var TimeAxis = defineComponent({
|
|
|
208
193
|
if (props.direction === "horizontal") {
|
|
209
194
|
nextTick(() => {
|
|
210
195
|
var _a;
|
|
211
|
-
const el =
|
|
196
|
+
const el = timeAxis.value;
|
|
212
197
|
if (props.center) {
|
|
213
198
|
style.marginLeft = (((_a = el == null ? void 0 : el.firstElementChild) == null ? void 0 : _a.clientWidth) || 0) / 2 + "px";
|
|
214
199
|
}
|
|
215
|
-
style.height = Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-
|
|
200
|
+
style.height = Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-timeline-item-data-top")).map((el2) => el2.clientHeight), ...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-timeline-item-data-bottom")).map((el2) => el2.clientHeight)) * 2 + Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-timeline-item-axis")).map((el2) => el2.clientHeight)) + "px";
|
|
216
201
|
});
|
|
217
202
|
}
|
|
218
203
|
};
|
|
@@ -252,16 +237,18 @@ var TimeAxis = defineComponent({
|
|
|
252
237
|
}, null);
|
|
253
238
|
}
|
|
254
239
|
if (props.direction === "horizontal") {
|
|
255
|
-
if (((_e = item.props) == null ? void 0 : _e.position) === "top" || ((_f = item.props) == null ? void 0 : _f.position) === "bottom")
|
|
240
|
+
if (((_e = item.props) == null ? void 0 : _e.position) === "top" || ((_f = item.props) == null ? void 0 : _f.position) === "bottom") {
|
|
256
241
|
return item;
|
|
242
|
+
}
|
|
257
243
|
if (props.mode === "alternative") {
|
|
258
244
|
return renderItemPosition(item, index2 % 2 == 0 ? "bottom" : "top");
|
|
259
245
|
} else {
|
|
260
246
|
return renderItemPosition(item, "bottom");
|
|
261
247
|
}
|
|
262
248
|
} else {
|
|
263
|
-
if (((_g = item.props) == null ? void 0 : _g.position) === "left" || ((_h = item.props) == null ? void 0 : _h.position) === "right")
|
|
249
|
+
if (((_g = item.props) == null ? void 0 : _g.position) === "left" || ((_h = item.props) == null ? void 0 : _h.position) === "right") {
|
|
264
250
|
return item;
|
|
251
|
+
}
|
|
265
252
|
if (props.mode === "alternative") {
|
|
266
253
|
return renderItemPosition(item, index2 % 2 == 0 ? "left" : "right");
|
|
267
254
|
} else {
|
|
@@ -274,26 +261,26 @@ var TimeAxis = defineComponent({
|
|
|
274
261
|
return props.direction === "horizontal" ? "horizontal" : "vertical";
|
|
275
262
|
};
|
|
276
263
|
return createVNode("div", {
|
|
277
|
-
"class": `devui-
|
|
278
|
-
"ref":
|
|
264
|
+
"class": `devui-timeline devui-timeline-${getDirection()} ${props.center ? "devui-timeline-" + getDirection() + "-center" : ""} `,
|
|
265
|
+
"ref": timeAxis,
|
|
279
266
|
"style": style
|
|
280
267
|
}, [renderItem()]);
|
|
281
268
|
};
|
|
282
269
|
}
|
|
283
270
|
});
|
|
284
|
-
|
|
285
|
-
app.component(
|
|
271
|
+
Timeline.install = function(app) {
|
|
272
|
+
app.component(Timeline.name, Timeline);
|
|
286
273
|
};
|
|
287
|
-
|
|
288
|
-
app.component(
|
|
274
|
+
TimelineItem.install = function(app) {
|
|
275
|
+
app.component(TimelineItem.name, TimelineItem);
|
|
289
276
|
};
|
|
290
277
|
var index = {
|
|
291
|
-
title: "
|
|
278
|
+
title: "Timeline \u65F6\u95F4\u8F74",
|
|
292
279
|
category: "\u6570\u636E\u5C55\u793A",
|
|
293
280
|
status: "100%",
|
|
294
281
|
install(app) {
|
|
295
|
-
app.use(
|
|
296
|
-
app.use(
|
|
282
|
+
app.use(Timeline);
|
|
283
|
+
app.use(TimelineItem);
|
|
297
284
|
}
|
|
298
285
|
};
|
|
299
|
-
export {
|
|
286
|
+
export { Timeline, TimelineItem, index as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(a,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(a=typeof globalThis!="undefined"?globalThis:a||self,e(a.index={},a.Vue))})(this,function(a,e){"use strict";const T={direction:{type:String,default:"vertical"},center:{type:Boolean,default:!1},mode:{type:String,default:"normal"},timePosition:{type:String,default:"left"}},b={name:{type:String,default:"",required:!0},size:{type:String,default:"inherit"},color:{type:String,default:"inherit"},classPrefix:{type:String,default:"icon"}};var I=e.defineComponent({name:"DIcon",props:b,setup(t){const{name:l,size:u,color:i,classPrefix:c}=e.toRefs(t);return()=>/^((https?):)?\/\//.test(l.value)?e.createVNode("img",{src:l.value,alt:l.value.split("/")[l.value.split("/").length-1],style:{width:u.value,verticalAlign:"text-bottom"}},null):e.createVNode("i",{class:`${c.value} ${c.value}-${l.value}`,style:{fontSize:u.value,color:i.value}},null)}});const z={time:{type:String},dotColor:{type:String},lineStyle:{type:String,default:"solid"},lineColor:{type:String},position:{type:String},timePosition:{type:String,default:"left"},type:{type:String,default:"primary"}};var p=e.defineComponent({name:"DTimelineItem",components:{DIcon:I},props:z,emits:[],setup(t,l){const u=e.inject("timeAxis"),i="devui-timeline-item",c=()=>{var n,s;return e.createVNode("div",{class:`${i}-time`},[l.slots.time?(s=(n=l.slots).time)==null?void 0:s.call(n):t.time])},o=()=>{var n,s;return e.createVNode("div",{class:`${i}-content`},[(s=(n=l.slots).default)==null?void 0:s.call(n,t)])},f=n=>n.includes(t.position)?o():u.props.direction==="horizontal"||t.timePosition==="left"?c():"",d=n=>n==="primary"?"":e.createVNode("i",{class:`icon-${n==="success"?"right":n}-o`},null),m=()=>{var n,s;return l.slots.dot?e.createVNode("div",{style:{color:t.dotColor},class:`${i}-dot`},[e.createTextVNode(" "),(s=(n=l.slots).dot)==null?void 0:s.call(n)]):e.createVNode("div",{class:`${i}-dot ${i}-type-${t.type}`,style:{borderColor:t.dotColor}},[d(t.type)])};return()=>e.createVNode("div",{class:i},[e.createVNode("div",{class:`${i}-data-left ${i}-data-top`},[f(["top","left"])]),e.createVNode("div",{class:`${i}-axis`},[m(),u.props.direction==="vertical"&&t.timePosition==="bottom"?c():"",e.createVNode("div",{class:`${i}-line ${i}-line-style-${t.lineStyle}`,style:{borderColor:t.lineColor}},[l.slots.extra?e.createVNode("div",{class:`${i}-line-extra`},[l.slots.extra()]):""])]),e.createVNode("div",{class:`${i}-data-right ${i}-data-bottom`},[f(["right","bottom"])])])}}),q="",y=e.defineComponent({name:"DTimeline",components:{TimelineItem:p},props:T,emits:[],setup(t,l){e.provide("timeAxis",{ctx:l,props:t});const u=e.ref(),i=e.reactive({marginLeft:"0px",height:"auto"}),c=()=>{i.height="auto",i.marginLeft="0px",t.direction==="horizontal"&&e.nextTick(()=>{var f;const o=u.value;t.center&&(i.marginLeft=(((f=o==null?void 0:o.firstElementChild)==null?void 0:f.clientWidth)||0)/2+"px"),i.height=Math.max(...Array.from(o==null?void 0:o.querySelectorAll(".devui-timeline-item-data-top")).map(d=>d.clientHeight),...Array.from(o==null?void 0:o.querySelectorAll(".devui-timeline-item-data-bottom")).map(d=>d.clientHeight))*2+Math.max(...Array.from(o==null?void 0:o.querySelectorAll(".devui-timeline-item-axis")).map(d=>d.clientHeight))+"px"})};return e.onMounted(()=>{c()}),e.watch(e.toRef(t,"direction"),()=>{c()}),()=>{const o=(m,n)=>n?e.createVNode(m,{position:n},null):e.createVNode(m,null,null),f=()=>{var s,h,S;const m=(S=(h=(s=l.slots).default)==null?void 0:h.call(s))!=null?S:[];let n;return m.length===1&&m[0].type===e.Fragment?n=m[0].children||[]:n=m,n.map((r,g)=>{var $,V,N,P,v,x,A,C;return g+1===n.length&&!(($=r.props)==null?void 0:$.lineStyle)&&!((V=r.props)==null?void 0:V["line-style"])&&(r=e.createVNode(r,{"line-style":"none"},null)),!((N=r.props)==null?void 0:N.timePosition)&&!((P=r.props)==null?void 0:P["time-position"])&&(r=e.createVNode(r,{"time-position":t.timePosition?t.timePosition:"left"},null)),t.direction==="horizontal"?((v=r.props)==null?void 0:v.position)==="top"||((x=r.props)==null?void 0:x.position)==="bottom"?r:t.mode==="alternative"?o(r,g%2==0?"bottom":"top"):o(r,"bottom"):((A=r.props)==null?void 0:A.position)==="left"||((C=r.props)==null?void 0:C.position)==="right"?r:t.mode==="alternative"?o(r,g%2==0?"left":"right"):o(r,"right")})},d=()=>t.direction==="horizontal"?"horizontal":"vertical";return e.createVNode("div",{class:`devui-timeline devui-timeline-${d()} ${t.center?"devui-timeline-"+d()+"-center":""} `,ref:u,style:i},[f()])}}});y.install=function(t){t.component(y.name,y)},p.install=function(t){t.component(p.name,p)};var D={title:"Timeline \u65F6\u95F4\u8F74",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(t){t.use(y),t.use(p)}};a.Timeline=y,a.TimelineItem=p,a.default=D,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.devui-timeline-vertical{display:flex;flex-direction:column;align-items:center;position:relative}.devui-timeline-vertical .devui-timeline-item{display:flex;flex-direction:row;width:100%}.devui-timeline-vertical .devui-timeline-item-axis{display:flex;flex-direction:column;align-items:center;padding:0 12px}.devui-timeline-vertical .devui-timeline-item-line{position:relative;height:calc(100% - 18px);min-height:20px;border-left-width:2px;border-left-color:var(--devui-dividing-line, #dfe1e6)}.devui-timeline-vertical .devui-timeline-item-line-extra{position:absolute;top:50%;transform:translate(-50%,-50%)}.devui-timeline-vertical .devui-timeline-item-line:first-child{display:none}.devui-timeline-vertical .devui-timeline-item-data-left{text-align:end}.devui-timeline-vertical .devui-timeline-item-data-left,.devui-timeline-vertical .devui-timeline-item-data-right{margin-bottom:24px;margin-top:-2px;flex:1}.devui-timeline-vertical .devui-timeline-item-line-style-dashed{border-left-style:dashed}.devui-timeline-vertical .devui-timeline-item-line-style-solid{border-left-style:solid}.devui-timeline-vertical .devui-timeline-item-line-style-dotted{border-left-style:dotted}.devui-timeline-vertical .devui-timeline-item-line-style-none{border-left-style:none}.devui-timeline-vertical .devui-timeline-item .devui-timeline-middle-zone{position:absolute;top:50%;transform:translate(-50%,-50%)}.devui-timeline-horizontal{display:flex;flex-direction:row;align-items:center;position:relative}.devui-timeline-horizontal-center .devui-timeline-item-data-top,.devui-timeline-horizontal-center .devui-timeline-item-data-bottom{text-align:center;padding:0 6px}.devui-timeline-horizontal-center .devui-timeline-item-data-top>div,.devui-timeline-horizontal-center .devui-timeline-item-data-bottom>div{transform:translate(-50%)}.devui-timeline-horizontal .devui-timeline-item{display:flex;flex-direction:column;height:100%}.devui-timeline-horizontal .devui-timeline-item-axis{display:flex;flex-direction:row;align-items:center;padding:12px 0}.devui-timeline-horizontal .devui-timeline-item-line{position:relative;min-width:60px;width:calc(100% - 18px);border-bottom-width:2px;border-bottom-color:var(--devui-dividing-line, #dfe1e6)}.devui-timeline-horizontal .devui-timeline-item-line-extra{position:absolute;left:50%;transform:translate(-50%,-50%)}.devui-timeline-horizontal .devui-timeline-item:first-child .devui-timeline-item-line:first-child{opacity:0}.devui-timeline-horizontal .devui-timeline-item-data-top,.devui-timeline-horizontal .devui-timeline-item-data-bottom{padding-right:12px;flex:1}.devui-timeline-horizontal .devui-timeline-item-line-style-dashed{border-bottom-style:dashed}.devui-timeline-horizontal .devui-timeline-item-line-style-solid{border-bottom-style:solid}.devui-timeline-horizontal .devui-timeline-item-line-style-dotted{border-bottom-style:dotted}.devui-timeline-horizontal .devui-timeline-item-line-style-none{border-bottom-style:none}.devui-timeline-horizontal .devui-timeline-item .devui-timeline-middle-zone{position:absolute;left:50%;transform:translate(-50%,-50%)}.devui-timeline-item-dot,.devui-timeline-item-dot>svg{width:18px;height:18px;flex-shrink:0}.devui-timeline-item-dot>i{font-size:18px;vertical-align:0}.devui-timeline-item-type-primary{border:2px solid var(--devui-placeholder, #8a8e99);border-radius:50%}.devui-timeline-item-type-success i{color:var(--devui-success, #50d4ab)}.devui-timeline-item-type-error i{color:var(--devui-danger, #f66f6a)}.devui-timeline-item-type-warning i{color:var(--devui-warning, #fac20a)}.devui-timeline-item-type-running{line-height:16px;text-align:center;animation:devui-timeline-running 1.5s linear infinite;border:2px solid var(--devui-success, #50d4ab);border-radius:50%}@keyframes devui-timeline-running{0%{transform:rotate(0);color:var(--devui-success, #50d4ab);border-color:var(--devui-success, #50d4ab)}50%{transform:rotate(180deg);color:var(--devui-success, #50d4ab);border-color:var(--devui-success, #50d4ab)}to{transform:rotate(360deg);color:var(--devui-success, #50d4ab);border-color:var(--devui-success, #50d4ab)}}
|