vue-devui 1.0.0-beta.1 → 1.0.0-beta.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/accordion/index.d.ts +7 -0
- package/accordion/index.es.js +186 -139
- 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 +2 -3
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/anchor/index.d.ts +7 -0
- package/avatar/index.d.ts +7 -0
- package/avatar/index.es.js +1 -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 +1 -1
- package/badge/index.umd.js +1 -1
- package/breadcrumb/index.d.ts +7 -0
- package/button/index.d.ts +7 -0
- package/button/index.es.js +9 -8
- package/button/index.umd.js +1 -1
- package/card/index.d.ts +7 -0
- package/card/index.es.js +1 -1
- package/card/index.umd.js +1 -1
- package/carousel/index.d.ts +7 -0
- package/carousel/index.es.js +5 -4
- package/carousel/index.umd.js +1 -1
- package/cascader/index.d.ts +7 -0
- package/cascader/index.es.js +1239 -83
- 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 +43 -8
- 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 +32 -21
- 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 +161 -41
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- 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 +5718 -469
- 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 +14 -4
- 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 +6 -5
- package/icon/index.umd.js +1 -1
- package/image-preview/index.d.ts +7 -0
- package/image-preview/index.es.js +72 -11
- 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 +24 -13
- 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 +5 -4
- package/input-number/index.umd.js +1 -1
- package/layout/index.d.ts +7 -0
- package/layout/index.es.js +1 -1
- package/layout/index.umd.js +1 -1
- package/loading/index.d.ts +7 -0
- package/loading/index.es.js +1 -1
- package/loading/index.umd.js +1 -1
- package/modal/index.d.ts +7 -0
- package/modal/index.es.js +117 -99
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/nav-sprite/index.d.ts +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/MultiUpload.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 +110 -93
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +6 -33
- package/pagination/index.d.ts +7 -0
- package/pagination/index.es.js +3 -3
- package/pagination/index.umd.js +1 -1
- package/panel/index.d.ts +7 -0
- package/panel/index.es.js +25 -22
- 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 +5 -2
- package/popover/index.umd.js +1 -1
- package/progress/index.d.ts +7 -0
- package/progress/index.es.js +1 -1
- package/progress/index.umd.js +2 -2
- package/quadrant-diagram/index.d.ts +7 -0
- package/radio/index.d.ts +7 -0
- package/radio/index.es.js +1 -1
- package/radio/index.umd.js +1 -1
- package/rate/index.d.ts +7 -0
- package/rate/index.es.js +1 -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 +5 -2
- package/ripple/index.umd.js +1 -1
- package/search/index.d.ts +7 -0
- package/search/index.es.js +35 -21
- package/search/index.umd.js +1 -1
- package/select/index.d.ts +7 -0
- package/select/index.es.js +47 -11
- package/select/index.umd.js +1 -1
- package/skeleton/index.d.ts +7 -0
- package/skeleton/index.es.js +148 -26
- 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 +30 -177
- 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 +107 -89
- 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 +2 -2
- package/status/index.umd.js +1 -1
- package/steps-guide/index.d.ts +7 -0
- package/steps-guide/index.es.js +101 -73
- package/steps-guide/index.umd.js +1 -1
- package/steps-guide/style.css +1 -1
- package/sticky/index.d.ts +7 -0
- package/style.css +1 -1
- package/switch/index.d.ts +7 -0
- package/switch/index.es.js +1 -1
- package/switch/index.umd.js +1 -1
- package/table/index.d.ts +7 -0
- package/table/index.es.js +1498 -156
- 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 +6 -3
- package/tabs/index.umd.js +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 +1 -13
- 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 +241 -21
- package/time-axis/index.umd.js +1 -1
- package/time-axis/style.css +1 -1
- package/time-picker/index.d.ts +7 -0
- package/time-picker/index.es.js +50 -26
- 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 +8 -7
- package/toast/index.umd.js +1 -1
- package/toast/style.css +1 -1
- package/tooltip/index.d.ts +7 -0
- package/transfer/index.d.ts +7 -0
- package/transfer/index.es.js +368 -79
- 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 +171 -35
- package/tree/index.umd.js +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 +8 -7
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +19214 -7637
- package/vue-devui.umd.js +29 -3
package/time-axis/index.es.js
CHANGED
|
@@ -1,51 +1,186 @@
|
|
|
1
|
-
|
|
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";
|
|
2
18
|
const timeAxisProps = {
|
|
3
19
|
direction: {
|
|
4
20
|
type: String,
|
|
5
21
|
default: "vertical"
|
|
6
22
|
},
|
|
7
|
-
|
|
8
|
-
type:
|
|
9
|
-
default:
|
|
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"
|
|
10
34
|
}
|
|
11
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
|
+
});
|
|
12
82
|
const timeAxisItemProps = {
|
|
13
83
|
time: {
|
|
14
84
|
type: String
|
|
15
85
|
},
|
|
16
|
-
|
|
86
|
+
dotColor: {
|
|
17
87
|
type: String
|
|
18
88
|
},
|
|
19
|
-
|
|
89
|
+
lineStyle: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: "solid"
|
|
92
|
+
},
|
|
93
|
+
lineColor: {
|
|
20
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"
|
|
21
106
|
}
|
|
22
107
|
};
|
|
23
|
-
var index$1 = "";
|
|
24
108
|
var TimeAxisItem = defineComponent({
|
|
25
109
|
name: "DTimeAxisItem",
|
|
110
|
+
components: {
|
|
111
|
+
DIcon
|
|
112
|
+
},
|
|
26
113
|
props: timeAxisItemProps,
|
|
27
114
|
emits: [],
|
|
28
115
|
setup(props, ctx) {
|
|
116
|
+
const timeAxis2 = inject("timeAxis");
|
|
29
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
|
+
};
|
|
30
167
|
return () => {
|
|
31
168
|
return createVNode("div", {
|
|
32
169
|
"class": itemClass
|
|
33
170
|
}, [createVNode("div", {
|
|
34
171
|
"class": `${itemClass}-data-left ${itemClass}-data-top`
|
|
35
|
-
}, [
|
|
172
|
+
}, [renderPosition(["top", "left"])]), createVNode("div", {
|
|
36
173
|
"class": `${itemClass}-axis`
|
|
37
|
-
}, [createVNode("div", {
|
|
38
|
-
"class": `${itemClass}-line ${itemClass}-line-style
|
|
39
|
-
}, null), createVNode("div", {
|
|
40
|
-
"class": `${itemClass}-dot ${itemClass}-type-primary`,
|
|
174
|
+
}, [renderDot(), timeAxis2.props.direction === "vertical" && props.timePosition === "bottom" ? renderTime() : "", createVNode("div", {
|
|
175
|
+
"class": `${itemClass}-line ${itemClass}-line-style-${props.lineStyle}`,
|
|
41
176
|
"style": {
|
|
42
|
-
borderColor: props.
|
|
177
|
+
borderColor: props.lineColor
|
|
43
178
|
}
|
|
44
|
-
},
|
|
45
|
-
"class": `${itemClass}-line
|
|
46
|
-
},
|
|
179
|
+
}, [ctx.slots.extra ? createVNode("div", {
|
|
180
|
+
"class": `${itemClass}-line-extra`
|
|
181
|
+
}, [ctx.slots.extra()]) : ""])]), createVNode("div", {
|
|
47
182
|
"class": `${itemClass}-data-right ${itemClass}-data-bottom`
|
|
48
|
-
}, [
|
|
183
|
+
}, [renderPosition(["right", "bottom"])])]);
|
|
49
184
|
};
|
|
50
185
|
}
|
|
51
186
|
});
|
|
@@ -58,22 +193,107 @@ var TimeAxis = defineComponent({
|
|
|
58
193
|
props: timeAxisProps,
|
|
59
194
|
emits: [],
|
|
60
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
|
+
});
|
|
61
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
|
+
};
|
|
62
276
|
return createVNode("div", {
|
|
63
|
-
"class": `devui-time-axis-${props.
|
|
64
|
-
|
|
277
|
+
"class": `devui-time-axis devui-time-axis-${getDirection()} ${props.center ? "devui-time-axis-" + getDirection() + "-center" : ""} `,
|
|
278
|
+
"ref": timeAxis2,
|
|
279
|
+
"style": style
|
|
280
|
+
}, [renderItem()]);
|
|
65
281
|
};
|
|
66
282
|
}
|
|
67
283
|
});
|
|
68
284
|
TimeAxis.install = function(app) {
|
|
69
285
|
app.component(TimeAxis.name, TimeAxis);
|
|
70
286
|
};
|
|
287
|
+
TimeAxisItem.install = function(app) {
|
|
288
|
+
app.component(TimeAxisItem.name, TimeAxisItem);
|
|
289
|
+
};
|
|
71
290
|
var index = {
|
|
72
291
|
title: "TimeAxis \u65F6\u95F4\u8F74",
|
|
73
292
|
category: "\u6570\u636E\u5C55\u793A",
|
|
74
|
-
status: "
|
|
293
|
+
status: "100%",
|
|
75
294
|
install(app) {
|
|
76
295
|
app.use(TimeAxis);
|
|
296
|
+
app.use(TimeAxisItem);
|
|
77
297
|
}
|
|
78
298
|
};
|
|
79
|
-
export { TimeAxis, index as default };
|
|
299
|
+
export { TimeAxis, TimeAxisItem, index as default };
|
package/time-axis/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
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"});
|
package/time-axis/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-time-axis-
|
|
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)}}
|
package/time-picker/index.es.js
CHANGED
|
@@ -14,7 +14,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import { defineComponent, createVNode,
|
|
17
|
+
import { defineComponent, createVNode, reactive, ref, onMounted, onBeforeUnmount, onUnmounted, Fragment, computed, withDirectives, mergeProps, resolveDirective, watch, createTextVNode } from "vue";
|
|
18
18
|
const timePickerProps = {
|
|
19
19
|
modelValue: {
|
|
20
20
|
type: String,
|
|
@@ -47,6 +47,10 @@ const timePickerProps = {
|
|
|
47
47
|
autoOpen: {
|
|
48
48
|
type: Boolean,
|
|
49
49
|
default: false
|
|
50
|
+
},
|
|
51
|
+
showAnimation: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: true
|
|
50
54
|
}
|
|
51
55
|
};
|
|
52
56
|
var Icon = defineComponent({
|
|
@@ -79,11 +83,12 @@ var Icon = defineComponent({
|
|
|
79
83
|
color,
|
|
80
84
|
classPrefix
|
|
81
85
|
} = this;
|
|
82
|
-
return
|
|
86
|
+
return /^((https?):)?\/\//.test(name) ? createVNode("img", {
|
|
83
87
|
"src": name,
|
|
84
88
|
"alt": name.split("/")[name.split("/").length - 1],
|
|
85
89
|
"style": {
|
|
86
|
-
width: size
|
|
90
|
+
width: size,
|
|
91
|
+
verticalAlign: "text-bottom"
|
|
87
92
|
}
|
|
88
93
|
}, null) : createVNode("i", {
|
|
89
94
|
"class": `${classPrefix} ${classPrefix}-${name}`,
|
|
@@ -91,7 +96,7 @@ var Icon = defineComponent({
|
|
|
91
96
|
fontSize: size,
|
|
92
97
|
color
|
|
93
98
|
}
|
|
94
|
-
}, null)
|
|
99
|
+
}, null);
|
|
95
100
|
}
|
|
96
101
|
});
|
|
97
102
|
Icon.install = function(app) {
|
|
@@ -156,7 +161,7 @@ const setTimeAstrict = (hourList, minuteList, secondList, minTime, maxTime, form
|
|
|
156
161
|
}
|
|
157
162
|
});
|
|
158
163
|
};
|
|
159
|
-
function useTimePicker(hh, mm, ss, minTime, format, autoOpen, disabled, value) {
|
|
164
|
+
function useTimePicker(hh, mm, ss, minTime, maxTime, format, autoOpen, disabled, value) {
|
|
160
165
|
const isActive = ref(false);
|
|
161
166
|
const showPopup = ref(false);
|
|
162
167
|
const devuiTimePicker = ref();
|
|
@@ -183,13 +188,29 @@ function useTimePicker(hh, mm, ss, minTime, format, autoOpen, disabled, value) {
|
|
|
183
188
|
};
|
|
184
189
|
const mouseInIputFun = () => {
|
|
185
190
|
if (firsthandActiveTime.value == "00:00:00") {
|
|
191
|
+
const vModelValueArr = value.split(":");
|
|
192
|
+
const minTimeValueArr = minTime.split(":");
|
|
186
193
|
vModeValue.value == "" ? vModeValue.value = "00:00:00" : "";
|
|
187
|
-
vModeValue.value > minTime
|
|
194
|
+
if (vModeValue.value > minTime) {
|
|
195
|
+
firsthandActiveTime.value = value;
|
|
196
|
+
setInputValue(vModelValueArr[0], vModelValueArr[1], vModelValueArr[2]);
|
|
197
|
+
} else {
|
|
198
|
+
firsthandActiveTime.value = minTime;
|
|
199
|
+
setInputValue(minTimeValueArr[0], minTimeValueArr[1], minTimeValueArr[2]);
|
|
200
|
+
}
|
|
188
201
|
}
|
|
189
|
-
setInputValue();
|
|
190
202
|
isActive.value = true;
|
|
191
203
|
showPopup.value = true;
|
|
192
204
|
};
|
|
205
|
+
const vModelIsBeyond = () => {
|
|
206
|
+
if (vModeValue.value != "" && vModeValue.value < minTime) {
|
|
207
|
+
vModeValue.value = minTime;
|
|
208
|
+
} else if (vModeValue.value != "" && vModeValue.value > maxTime) {
|
|
209
|
+
vModeValue.value = maxTime;
|
|
210
|
+
}
|
|
211
|
+
const vModelValueArr = vModeValue.value.split(":");
|
|
212
|
+
vModeValue.value && setInputValue(vModelValueArr[0], vModelValueArr[1], vModelValueArr[2]);
|
|
213
|
+
};
|
|
193
214
|
const getTimeValue = (e) => {
|
|
194
215
|
e.stopPropagation();
|
|
195
216
|
if (showPopup.value) {
|
|
@@ -197,18 +218,18 @@ function useTimePicker(hh, mm, ss, minTime, format, autoOpen, disabled, value) {
|
|
|
197
218
|
mm.value = timePopupDom.value.changTimeData().activeMinute.value;
|
|
198
219
|
ss.value = timePopupDom.value.changTimeData().activeSecond.value;
|
|
199
220
|
firsthandActiveTime.value = `${hh.value}:${mm.value}:${ss.value}`;
|
|
200
|
-
setInputValue();
|
|
221
|
+
setInputValue(hh.value, mm.value, ss.value);
|
|
201
222
|
}
|
|
202
223
|
};
|
|
203
|
-
const setInputValue = () => {
|
|
224
|
+
const setInputValue = (hh2, mm2, ss2) => {
|
|
204
225
|
if (format == "hh:mm:ss") {
|
|
205
|
-
vModeValue.value = `${
|
|
226
|
+
vModeValue.value = `${hh2}:${mm2}:${ss2}`;
|
|
206
227
|
} else if (format == "mm:hh:ss") {
|
|
207
|
-
vModeValue.value = `${
|
|
228
|
+
vModeValue.value = `${mm2}:${hh2}:${ss2}`;
|
|
208
229
|
} else if (format == "hh:mm") {
|
|
209
|
-
vModeValue.value = `${
|
|
230
|
+
vModeValue.value = `${hh2}:${mm2}`;
|
|
210
231
|
} else if (format == "mm:ss") {
|
|
211
|
-
vModeValue.value = `${
|
|
232
|
+
vModeValue.value = `${mm2}:${ss2}`;
|
|
212
233
|
}
|
|
213
234
|
};
|
|
214
235
|
const clearAll = (e) => {
|
|
@@ -225,7 +246,7 @@ function useTimePicker(hh, mm, ss, minTime, format, autoOpen, disabled, value) {
|
|
|
225
246
|
ss.value = "00";
|
|
226
247
|
}
|
|
227
248
|
firsthandActiveTime.value = `${hh.value}:${mm.value}:${ss.value}`;
|
|
228
|
-
setInputValue();
|
|
249
|
+
setInputValue(hh.value, mm.value, ss.value);
|
|
229
250
|
};
|
|
230
251
|
const isOutOpen = () => {
|
|
231
252
|
if (autoOpen) {
|
|
@@ -234,7 +255,7 @@ function useTimePicker(hh, mm, ss, minTime, format, autoOpen, disabled, value) {
|
|
|
234
255
|
mm.value = timeArr[1];
|
|
235
256
|
ss.value = timeArr[2];
|
|
236
257
|
firsthandActiveTime.value = vModeValue.value;
|
|
237
|
-
setInputValue();
|
|
258
|
+
setInputValue(hh.value, mm.value, ss.value);
|
|
238
259
|
isActive.value = true;
|
|
239
260
|
showPopup.value = autoOpen;
|
|
240
261
|
}
|
|
@@ -249,14 +270,14 @@ function useTimePicker(hh, mm, ss, minTime, format, autoOpen, disabled, value) {
|
|
|
249
270
|
ss.value = slotTime.time;
|
|
250
271
|
}
|
|
251
272
|
firsthandActiveTime.value = `${hh.value}:${mm.value}:${ss.value}`;
|
|
252
|
-
setInputValue();
|
|
273
|
+
setInputValue(hh.value, mm.value, ss.value);
|
|
253
274
|
} else {
|
|
254
275
|
const timeArr = slotTime.time.split(":");
|
|
255
276
|
hh.value = timeArr[0];
|
|
256
277
|
mm.value = timeArr[1];
|
|
257
278
|
ss.value = timeArr[2];
|
|
258
279
|
firsthandActiveTime.value = `${hh.value}:${mm.value}:${ss.value}`;
|
|
259
|
-
setInputValue();
|
|
280
|
+
setInputValue(hh.value, mm.value, ss.value);
|
|
260
281
|
}
|
|
261
282
|
};
|
|
262
283
|
return {
|
|
@@ -272,10 +293,10 @@ function useTimePicker(hh, mm, ss, minTime, format, autoOpen, disabled, value) {
|
|
|
272
293
|
firsthandActiveTime,
|
|
273
294
|
vModeValue,
|
|
274
295
|
getPopupPosition,
|
|
275
|
-
setInputValue,
|
|
276
296
|
getTimeValue,
|
|
277
297
|
clickVerifyFun,
|
|
278
298
|
isOutOpen,
|
|
299
|
+
vModelIsBeyond,
|
|
279
300
|
clearAll,
|
|
280
301
|
chooseTime
|
|
281
302
|
};
|
|
@@ -552,6 +573,7 @@ function useTimeScroll() {
|
|
|
552
573
|
var index$3 = "";
|
|
553
574
|
var TimeScroll = defineComponent({
|
|
554
575
|
name: "DTimeScroll",
|
|
576
|
+
props: timePickerProps,
|
|
555
577
|
setup(props, ctx) {
|
|
556
578
|
const {
|
|
557
579
|
scrollBoxDom,
|
|
@@ -593,7 +615,7 @@ var TimeScroll = defineComponent({
|
|
|
593
615
|
"class": "devui-scroll-box"
|
|
594
616
|
}, [createVNode("div", {
|
|
595
617
|
"ref": scrollContentDom,
|
|
596
|
-
"class": `box-content ${isDown.value ? "box-content-behavior-auto" : ""}`,
|
|
618
|
+
"class": `box-content ${isDown.value || !props.showAnimation ? "box-content-behavior-auto" : ""}`,
|
|
597
619
|
"style": {
|
|
598
620
|
"margin-right": marginRight + "px"
|
|
599
621
|
}
|
|
@@ -665,7 +687,7 @@ var TimeList = defineComponent({
|
|
|
665
687
|
return createVNode("div", {
|
|
666
688
|
"class": "time-item",
|
|
667
689
|
"style": {
|
|
668
|
-
"
|
|
690
|
+
"flex": 1
|
|
669
691
|
}
|
|
670
692
|
}, [createVNode(TimeScroll, null, {
|
|
671
693
|
default: () => [createVNode("ul", {
|
|
@@ -789,7 +811,7 @@ var Button = defineComponent({
|
|
|
789
811
|
showLoading,
|
|
790
812
|
width
|
|
791
813
|
} = props;
|
|
792
|
-
return createVNode("div", mergeProps({
|
|
814
|
+
return withDirectives(createVNode("div", mergeProps({
|
|
793
815
|
"class": "devui-btn-host"
|
|
794
816
|
}, ctx.attrs), [createVNode("button", {
|
|
795
817
|
"class": btnClass.value,
|
|
@@ -800,12 +822,12 @@ var Button = defineComponent({
|
|
|
800
822
|
},
|
|
801
823
|
"onClick": onClick
|
|
802
824
|
}, [!!icon ? createVNode(Icon, {
|
|
803
|
-
"name":
|
|
825
|
+
"name": icon,
|
|
804
826
|
"class": iconClass.value
|
|
805
827
|
}, null) : null, createVNode("span", {
|
|
806
828
|
"class": "button-content",
|
|
807
829
|
"ref": buttonContent
|
|
808
|
-
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])])]);
|
|
830
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])])]), [[resolveDirective("dLoading"), showLoading]]);
|
|
809
831
|
};
|
|
810
832
|
}
|
|
811
833
|
});
|
|
@@ -938,11 +960,12 @@ var TimePicker = defineComponent({
|
|
|
938
960
|
getTimeValue,
|
|
939
961
|
clickVerifyFun,
|
|
940
962
|
isOutOpen,
|
|
963
|
+
vModelIsBeyond,
|
|
941
964
|
clearAll,
|
|
942
965
|
timePopupDom,
|
|
943
966
|
vModeValue,
|
|
944
967
|
getPopupPosition
|
|
945
|
-
} = useTimePicker(activeHour, activeMinute, activeSecond, props.minTime, format, props.autoOpen, props.disabled, props.modelValue);
|
|
968
|
+
} = useTimePicker(activeHour, activeMinute, activeSecond, props.minTime, props.maxTime, format, props.autoOpen, props.disabled, props.modelValue);
|
|
946
969
|
const selectedTimeChage = (e) => {
|
|
947
970
|
isActive.value = false;
|
|
948
971
|
showPopup.value = false;
|
|
@@ -951,6 +974,7 @@ var TimePicker = defineComponent({
|
|
|
951
974
|
onMounted(() => {
|
|
952
975
|
getPopupPosition();
|
|
953
976
|
isOutOpen();
|
|
977
|
+
vModelIsBeyond();
|
|
954
978
|
document.addEventListener("click", clickVerifyFun);
|
|
955
979
|
document.addEventListener("click", getTimeValue);
|
|
956
980
|
document.addEventListener("scroll", getPopupPosition);
|
|
@@ -964,7 +988,7 @@ var TimePicker = defineComponent({
|
|
|
964
988
|
});
|
|
965
989
|
watch(vModeValue, (newValue) => {
|
|
966
990
|
ctx.emit("update:modelValue", vModeValue.value);
|
|
967
|
-
if (newValue != props.minTime) {
|
|
991
|
+
if (newValue != props.minTime && newValue != "00:00") {
|
|
968
992
|
showClearIcon.value = true;
|
|
969
993
|
} else {
|
|
970
994
|
showClearIcon.value = false;
|
|
@@ -1021,7 +1045,7 @@ TimePicker.install = function(app) {
|
|
|
1021
1045
|
var index = {
|
|
1022
1046
|
title: "TimePicker \u65F6\u95F4\u9009\u62E9\u5668",
|
|
1023
1047
|
category: "\u6570\u636E\u5F55\u5165",
|
|
1024
|
-
status: "
|
|
1048
|
+
status: "90%",
|
|
1025
1049
|
install(app) {
|
|
1026
1050
|
app.use(TimePicker);
|
|
1027
1051
|
}
|