vue-devui 1.0.0-alpha.5 → 1.0.0-beta.11
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 +31 -36
- 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 +175 -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 +527 -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 +480 -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 +8 -34
- 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 +1828 -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 +1255 -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 +27743 -1
- package/vue-devui.umd.js +29 -1
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
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";
|
|
18
|
+
const timeAxisProps = {
|
|
19
|
+
direction: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "vertical"
|
|
22
|
+
},
|
|
23
|
+
center: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
mode: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "normal"
|
|
30
|
+
},
|
|
31
|
+
timePosition: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "left"
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var DIcon = defineComponent({
|
|
37
|
+
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
|
+
},
|
|
56
|
+
setup(props) {
|
|
57
|
+
return __spreadValues({}, props);
|
|
58
|
+
},
|
|
59
|
+
render() {
|
|
60
|
+
const {
|
|
61
|
+
name,
|
|
62
|
+
size,
|
|
63
|
+
color,
|
|
64
|
+
classPrefix
|
|
65
|
+
} = this;
|
|
66
|
+
return /^((https?):)?\/\//.test(name) ? createVNode("img", {
|
|
67
|
+
"src": name,
|
|
68
|
+
"alt": name.split("/")[name.split("/").length - 1],
|
|
69
|
+
"style": {
|
|
70
|
+
width: size,
|
|
71
|
+
verticalAlign: "text-bottom"
|
|
72
|
+
}
|
|
73
|
+
}, null) : createVNode("i", {
|
|
74
|
+
"class": `${classPrefix} ${classPrefix}-${name}`,
|
|
75
|
+
"style": {
|
|
76
|
+
fontSize: size,
|
|
77
|
+
color
|
|
78
|
+
}
|
|
79
|
+
}, null);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const timeAxisItemProps = {
|
|
83
|
+
time: {
|
|
84
|
+
type: String
|
|
85
|
+
},
|
|
86
|
+
dotColor: {
|
|
87
|
+
type: String
|
|
88
|
+
},
|
|
89
|
+
lineStyle: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: "solid"
|
|
92
|
+
},
|
|
93
|
+
lineColor: {
|
|
94
|
+
type: String
|
|
95
|
+
},
|
|
96
|
+
position: {
|
|
97
|
+
type: String
|
|
98
|
+
},
|
|
99
|
+
timePosition: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: "left"
|
|
102
|
+
},
|
|
103
|
+
type: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: "primary"
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var TimeAxisItem = defineComponent({
|
|
109
|
+
name: "DTimeAxisItem",
|
|
110
|
+
components: {
|
|
111
|
+
DIcon
|
|
112
|
+
},
|
|
113
|
+
props: timeAxisItemProps,
|
|
114
|
+
emits: [],
|
|
115
|
+
setup(props, ctx) {
|
|
116
|
+
const timeAxis2 = inject("timeAxis");
|
|
117
|
+
const itemClass = "devui-time-axis-item";
|
|
118
|
+
const renderTime = () => {
|
|
119
|
+
var _a, _b;
|
|
120
|
+
return createVNode("div", {
|
|
121
|
+
"class": `${itemClass}-time`
|
|
122
|
+
}, [ctx.slots.time ? (_b = (_a = ctx.slots).time) == null ? void 0 : _b.call(_a) : props.time]);
|
|
123
|
+
};
|
|
124
|
+
const renderContent = () => {
|
|
125
|
+
var _a, _b;
|
|
126
|
+
return createVNode("div", {
|
|
127
|
+
"class": `${itemClass}-content`
|
|
128
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a, props)]);
|
|
129
|
+
};
|
|
130
|
+
const renderPosition = (types) => {
|
|
131
|
+
if (types.includes(props.position)) {
|
|
132
|
+
return renderContent();
|
|
133
|
+
} else {
|
|
134
|
+
if (timeAxis2.props.direction === "horizontal") {
|
|
135
|
+
return renderTime();
|
|
136
|
+
} else {
|
|
137
|
+
return props.timePosition === "left" ? renderTime() : "";
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
const setTypeIcon = (type) => {
|
|
142
|
+
if (type === "primary") {
|
|
143
|
+
return "";
|
|
144
|
+
}
|
|
145
|
+
return createVNode("i", {
|
|
146
|
+
"class": `icon-${type === "success" ? "right" : type}-o`
|
|
147
|
+
}, null);
|
|
148
|
+
};
|
|
149
|
+
const renderDot = () => {
|
|
150
|
+
var _a, _b;
|
|
151
|
+
if (ctx.slots.dot) {
|
|
152
|
+
return createVNode("div", {
|
|
153
|
+
"style": {
|
|
154
|
+
color: props.dotColor
|
|
155
|
+
},
|
|
156
|
+
"class": `${itemClass}-dot`
|
|
157
|
+
}, [createTextVNode(" "), (_b = (_a = ctx.slots).dot) == null ? void 0 : _b.call(_a)]);
|
|
158
|
+
} else {
|
|
159
|
+
return createVNode("div", {
|
|
160
|
+
"class": `${itemClass}-dot ${itemClass}-type-${props.type}`,
|
|
161
|
+
"style": {
|
|
162
|
+
borderColor: props.dotColor
|
|
163
|
+
}
|
|
164
|
+
}, [setTypeIcon(props.type)]);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
return () => {
|
|
168
|
+
return createVNode("div", {
|
|
169
|
+
"class": itemClass
|
|
170
|
+
}, [createVNode("div", {
|
|
171
|
+
"class": `${itemClass}-data-left ${itemClass}-data-top`
|
|
172
|
+
}, [renderPosition(["top", "left"])]), createVNode("div", {
|
|
173
|
+
"class": `${itemClass}-axis`
|
|
174
|
+
}, [renderDot(), timeAxis2.props.direction === "vertical" && props.timePosition === "bottom" ? renderTime() : "", createVNode("div", {
|
|
175
|
+
"class": `${itemClass}-line ${itemClass}-line-style-${props.lineStyle}`,
|
|
176
|
+
"style": {
|
|
177
|
+
borderColor: props.lineColor
|
|
178
|
+
}
|
|
179
|
+
}, [ctx.slots.extra ? createVNode("div", {
|
|
180
|
+
"class": `${itemClass}-line-extra`
|
|
181
|
+
}, [ctx.slots.extra()]) : ""])]), createVNode("div", {
|
|
182
|
+
"class": `${itemClass}-data-right ${itemClass}-data-bottom`
|
|
183
|
+
}, [renderPosition(["right", "bottom"])])]);
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
var timeAxis = "";
|
|
188
|
+
var TimeAxis = defineComponent({
|
|
189
|
+
name: "DTimeAxis",
|
|
190
|
+
components: {
|
|
191
|
+
TimeAxisItem
|
|
192
|
+
},
|
|
193
|
+
props: timeAxisProps,
|
|
194
|
+
emits: [],
|
|
195
|
+
setup(props, ctx) {
|
|
196
|
+
provide("timeAxis", {
|
|
197
|
+
ctx,
|
|
198
|
+
props
|
|
199
|
+
});
|
|
200
|
+
const timeAxis2 = ref();
|
|
201
|
+
const style = reactive({
|
|
202
|
+
marginLeft: "0px",
|
|
203
|
+
height: "auto"
|
|
204
|
+
});
|
|
205
|
+
const setStyle = () => {
|
|
206
|
+
style.height = "auto";
|
|
207
|
+
style.marginLeft = "0px";
|
|
208
|
+
if (props.direction === "horizontal") {
|
|
209
|
+
nextTick(() => {
|
|
210
|
+
var _a;
|
|
211
|
+
const el = timeAxis2.value;
|
|
212
|
+
if (props.center) {
|
|
213
|
+
style.marginLeft = (((_a = el == null ? void 0 : el.firstElementChild) == null ? void 0 : _a.clientWidth) || 0) / 2 + "px";
|
|
214
|
+
}
|
|
215
|
+
style.height = Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-data-top")).map((el2) => el2.clientHeight), ...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-data-bottom")).map((el2) => el2.clientHeight)) * 2 + Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-axis")).map((el2) => el2.clientHeight)) + "px";
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
onMounted(() => {
|
|
220
|
+
setStyle();
|
|
221
|
+
});
|
|
222
|
+
watch(toRef(props, "direction"), () => {
|
|
223
|
+
setStyle();
|
|
224
|
+
});
|
|
225
|
+
return () => {
|
|
226
|
+
const renderItemPosition = (item, position) => {
|
|
227
|
+
return position ? createVNode(item, {
|
|
228
|
+
"position": position
|
|
229
|
+
}, null) : createVNode(item, null, null);
|
|
230
|
+
};
|
|
231
|
+
const renderItem = () => {
|
|
232
|
+
var _a, _b, _c;
|
|
233
|
+
const slots = (_c = (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)) != null ? _c : [];
|
|
234
|
+
let children;
|
|
235
|
+
if (slots.length === 1 && slots[0].type === Fragment) {
|
|
236
|
+
children = slots[0].children || [];
|
|
237
|
+
} else {
|
|
238
|
+
children = slots;
|
|
239
|
+
}
|
|
240
|
+
return children.map((item, index2) => {
|
|
241
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h;
|
|
242
|
+
if (index2 + 1 === children.length) {
|
|
243
|
+
if (!((_a2 = item.props) == null ? void 0 : _a2.lineStyle) && !((_b2 = item.props) == null ? void 0 : _b2["line-style"])) {
|
|
244
|
+
item = createVNode(item, {
|
|
245
|
+
"line-style": "none"
|
|
246
|
+
}, null);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (!((_c2 = item.props) == null ? void 0 : _c2.timePosition) && !((_d = item.props) == null ? void 0 : _d["time-position"])) {
|
|
250
|
+
item = createVNode(item, {
|
|
251
|
+
"time-position": props.timePosition ? props.timePosition : "left"
|
|
252
|
+
}, null);
|
|
253
|
+
}
|
|
254
|
+
if (props.direction === "horizontal") {
|
|
255
|
+
if (((_e = item.props) == null ? void 0 : _e.position) === "top" || ((_f = item.props) == null ? void 0 : _f.position) === "bottom")
|
|
256
|
+
return item;
|
|
257
|
+
if (props.mode === "alternative") {
|
|
258
|
+
return renderItemPosition(item, index2 % 2 == 0 ? "bottom" : "top");
|
|
259
|
+
} else {
|
|
260
|
+
return renderItemPosition(item, "bottom");
|
|
261
|
+
}
|
|
262
|
+
} else {
|
|
263
|
+
if (((_g = item.props) == null ? void 0 : _g.position) === "left" || ((_h = item.props) == null ? void 0 : _h.position) === "right")
|
|
264
|
+
return item;
|
|
265
|
+
if (props.mode === "alternative") {
|
|
266
|
+
return renderItemPosition(item, index2 % 2 == 0 ? "left" : "right");
|
|
267
|
+
} else {
|
|
268
|
+
return renderItemPosition(item, "right");
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
const getDirection = () => {
|
|
274
|
+
return props.direction === "horizontal" ? "horizontal" : "vertical";
|
|
275
|
+
};
|
|
276
|
+
return createVNode("div", {
|
|
277
|
+
"class": `devui-time-axis devui-time-axis-${getDirection()} ${props.center ? "devui-time-axis-" + getDirection() + "-center" : ""} `,
|
|
278
|
+
"ref": timeAxis2,
|
|
279
|
+
"style": style
|
|
280
|
+
}, [renderItem()]);
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
TimeAxis.install = function(app) {
|
|
285
|
+
app.component(TimeAxis.name, TimeAxis);
|
|
286
|
+
};
|
|
287
|
+
TimeAxisItem.install = function(app) {
|
|
288
|
+
app.component(TimeAxisItem.name, TimeAxisItem);
|
|
289
|
+
};
|
|
290
|
+
var index = {
|
|
291
|
+
title: "TimeAxis \u65F6\u95F4\u8F74",
|
|
292
|
+
category: "\u6570\u636E\u5C55\u793A",
|
|
293
|
+
status: "100%",
|
|
294
|
+
install(app) {
|
|
295
|
+
app.use(TimeAxis);
|
|
296
|
+
app.use(TimeAxisItem);
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
export { TimeAxis, TimeAxisItem, index as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var F=Object.defineProperty;var I=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var z=(r,t,a)=>t in r?F(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,D=(r,t)=>{for(var a in t||(t={}))j.call(t,a)&&z(r,a,t[a]);if(I)for(var a of I(t))H.call(t,a)&&z(r,a,t[a]);return r};(function(r,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(r=typeof globalThis!="undefined"?globalThis:r||self,t(r.index={},r.Vue))})(this,function(r,t){"use strict";const a={direction:{type:String,default:"vertical"},center:{type:Boolean,default:!1},mode:{type:String,default:"normal"},timePosition:{type:String,default:"left"}};var q=t.defineComponent({name:"DIcon",props:{name:{type:String,required:!0},size:{type:String,default:"inherit"},color:{type:String,default:"inherit"},classPrefix:{type:String,default:"icon"}},setup(e){return D({},e)},render(){const{name:e,size:l,color:f,classPrefix:i}=this;return/^((https?):)?\/\//.test(e)?t.createVNode("img",{src:e,alt:e.split("/")[e.split("/").length-1],style:{width:l,verticalAlign:"text-bottom"}},null):t.createVNode("i",{class:`${i} ${i}-${e}`,style:{fontSize:l,color:f}},null)}});const v={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=t.defineComponent({name:"DTimeAxisItem",components:{DIcon:q},props:v,emits:[],setup(e,l){const f=t.inject("timeAxis"),i="devui-time-axis-item",y=()=>{var o,d;return t.createVNode("div",{class:`${i}-time`},[l.slots.time?(d=(o=l.slots).time)==null?void 0:d.call(o):e.time])},n=()=>{var o,d;return t.createVNode("div",{class:`${i}-content`},[(d=(o=l.slots).default)==null?void 0:d.call(o,e)])},u=o=>o.includes(e.position)?n():f.props.direction==="horizontal"||e.timePosition==="left"?y():"",c=o=>o==="primary"?"":t.createVNode("i",{class:`icon-${o==="success"?"right":o}-o`},null),m=()=>{var o,d;return l.slots.dot?t.createVNode("div",{style:{color:e.dotColor},class:`${i}-dot`},[t.createTextVNode(" "),(d=(o=l.slots).dot)==null?void 0:d.call(o)]):t.createVNode("div",{class:`${i}-dot ${i}-type-${e.type}`,style:{borderColor:e.dotColor}},[c(e.type)])};return()=>t.createVNode("div",{class:i},[t.createVNode("div",{class:`${i}-data-left ${i}-data-top`},[u(["top","left"])]),t.createVNode("div",{class:`${i}-axis`},[m(),f.props.direction==="vertical"&&e.timePosition==="bottom"?y():"",t.createVNode("div",{class:`${i}-line ${i}-line-style-${e.lineStyle}`,style:{borderColor:e.lineColor}},[l.slots.extra?t.createVNode("div",{class:`${i}-line-extra`},[l.slots.extra()]):""])]),t.createVNode("div",{class:`${i}-data-right ${i}-data-bottom`},[u(["right","bottom"])])])}}),L="",g=t.defineComponent({name:"DTimeAxis",components:{TimeAxisItem:p},props:a,emits:[],setup(e,l){t.provide("timeAxis",{ctx:l,props:e});const f=t.ref(),i=t.reactive({marginLeft:"0px",height:"auto"}),y=()=>{i.height="auto",i.marginLeft="0px",e.direction==="horizontal"&&t.nextTick(()=>{var u;const n=f.value;e.center&&(i.marginLeft=(((u=n==null?void 0:n.firstElementChild)==null?void 0:u.clientWidth)||0)/2+"px"),i.height=Math.max(...Array.from(n==null?void 0:n.querySelectorAll(".devui-time-axis-item-data-top")).map(c=>c.clientHeight),...Array.from(n==null?void 0:n.querySelectorAll(".devui-time-axis-item-data-bottom")).map(c=>c.clientHeight))*2+Math.max(...Array.from(n==null?void 0:n.querySelectorAll(".devui-time-axis-item-axis")).map(c=>c.clientHeight))+"px"})};return t.onMounted(()=>{y()}),t.watch(t.toRef(e,"direction"),()=>{y()}),()=>{const n=(m,o)=>o?t.createVNode(m,{position:o},null):t.createVNode(m,null,null),u=()=>{var d,x,S;const m=(S=(x=(d=l.slots).default)==null?void 0:x.call(d))!=null?S:[];let o;return m.length===1&&m[0].type===t.Fragment?o=m[0].children||[]:o=m,o.map((s,h)=>{var A,$,V,N,C,P,T,b;return h+1===o.length&&!((A=s.props)==null?void 0:A.lineStyle)&&!(($=s.props)==null?void 0:$["line-style"])&&(s=t.createVNode(s,{"line-style":"none"},null)),!((V=s.props)==null?void 0:V.timePosition)&&!((N=s.props)==null?void 0:N["time-position"])&&(s=t.createVNode(s,{"time-position":e.timePosition?e.timePosition:"left"},null)),e.direction==="horizontal"?((C=s.props)==null?void 0:C.position)==="top"||((P=s.props)==null?void 0:P.position)==="bottom"?s:e.mode==="alternative"?n(s,h%2==0?"bottom":"top"):n(s,"bottom"):((T=s.props)==null?void 0:T.position)==="left"||((b=s.props)==null?void 0:b.position)==="right"?s:e.mode==="alternative"?n(s,h%2==0?"left":"right"):n(s,"right")})},c=()=>e.direction==="horizontal"?"horizontal":"vertical";return t.createVNode("div",{class:`devui-time-axis devui-time-axis-${c()} ${e.center?"devui-time-axis-"+c()+"-center":""} `,ref:f,style:i},[u()])}}});g.install=function(e){e.component(g.name,g)},p.install=function(e){e.component(p.name,p)};var M={title:"TimeAxis \u65F6\u95F4\u8F74",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(e){e.use(g),e.use(p)}};r.TimeAxis=g,r.TimeAxisItem=p,r.default=M,Object.defineProperty(r,"__esModule",{value:!0}),r[Symbol.toStringTag]="Module"});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.devui-time-axis-vertical{display:flex;flex-direction:column;align-items:center;position:relative}.devui-time-axis-vertical .devui-time-axis-item{display:flex;flex-direction:row;width:100%}.devui-time-axis-vertical .devui-time-axis-item-axis{display:flex;flex-direction:column;align-items:center;padding:0 12px}.devui-time-axis-vertical .devui-time-axis-item-line{position:relative;height:calc(100% - 18px);min-height:20px;border-left-width:2px;border-left-color:var(--devui-dividing-line, #dfe1e6)}.devui-time-axis-vertical .devui-time-axis-item-line-extra{position:absolute;top:50%;transform:translate(-50%,-50%)}.devui-time-axis-vertical .devui-time-axis-item-line:first-child{display:none}.devui-time-axis-vertical .devui-time-axis-item-data-left{text-align:end}.devui-time-axis-vertical .devui-time-axis-item-data-left,.devui-time-axis-vertical .devui-time-axis-item-data-right{margin-bottom:24px;margin-top:-2px;flex:1}.devui-time-axis-vertical .devui-time-axis-item-line-style-dashed{border-left-style:dashed}.devui-time-axis-vertical .devui-time-axis-item-line-style-solid{border-left-style:solid}.devui-time-axis-vertical .devui-time-axis-item-line-style-dotted{border-left-style:dotted}.devui-time-axis-vertical .devui-time-axis-item-line-style-none{border-left-style:none}.devui-time-axis-vertical .devui-time-axis-item .devui-time-axis-middle-zone{position:absolute;top:50%;transform:translate(-50%,-50%)}.devui-time-axis-horizontal{display:flex;flex-direction:row;align-items:center;position:relative}.devui-time-axis-horizontal-center .devui-time-axis-item-data-top,.devui-time-axis-horizontal-center .devui-time-axis-item-data-bottom{text-align:center;padding:0 6px}.devui-time-axis-horizontal-center .devui-time-axis-item-data-top>div,.devui-time-axis-horizontal-center .devui-time-axis-item-data-bottom>div{transform:translate(-50%)}.devui-time-axis-horizontal .devui-time-axis-item{display:flex;flex-direction:column;height:100%}.devui-time-axis-horizontal .devui-time-axis-item-axis{display:flex;flex-direction:row;align-items:center;padding:12px 0}.devui-time-axis-horizontal .devui-time-axis-item-line{position:relative;min-width:60px;width:calc(100% - 18px);border-bottom-width:2px;border-bottom-color:var(--devui-dividing-line, #dfe1e6)}.devui-time-axis-horizontal .devui-time-axis-item-line-extra{position:absolute;left:50%;transform:translate(-50%,-50%)}.devui-time-axis-horizontal .devui-time-axis-item:first-child .devui-time-axis-item-line:first-child{opacity:0}.devui-time-axis-horizontal .devui-time-axis-item-data-top,.devui-time-axis-horizontal .devui-time-axis-item-data-bottom{padding-right:12px;flex:1}.devui-time-axis-horizontal .devui-time-axis-item-line-style-dashed{border-bottom-style:dashed}.devui-time-axis-horizontal .devui-time-axis-item-line-style-solid{border-bottom-style:solid}.devui-time-axis-horizontal .devui-time-axis-item-line-style-dotted{border-bottom-style:dotted}.devui-time-axis-horizontal .devui-time-axis-item-line-style-none{border-bottom-style:none}.devui-time-axis-horizontal .devui-time-axis-item .devui-time-axis-middle-zone{position:absolute;left:50%;transform:translate(-50%,-50%)}.devui-time-axis-item-dot,.devui-time-axis-item-dot>svg{width:18px;height:18px;flex-shrink:0}.devui-time-axis-item-dot>i{font-size:18px;vertical-align:0}.devui-time-axis-item-type-primary{border:2px solid var(--devui-placeholder, #8a8e99);border-radius:50%}.devui-time-axis-item-type-success i{color:var(--devui-success, #50d4ab)}.devui-time-axis-item-type-error i{color:var(--devui-danger, #f66f6a)}.devui-time-axis-item-type-warning i{color:var(--devui-warning, #fac20a)}.devui-time-axis-item-type-running{line-height:16px;text-align:center;animation:devui-time-axis-running 1.5s linear infinite;border:2px solid var(--devui-success, #50d4ab);border-radius:50%}@keyframes devui-time-axis-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)}}
|