vue3-time-duration 0.0.7 → 0.0.9
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
CHANGED
|
@@ -21,7 +21,6 @@ npm install --save vue3-time-duration
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import "vue3-time-duration/dist/vue3-time-duration.css";
|
|
23
23
|
import Vue3TimeDuration from "vue3-time-duration";
|
|
24
|
-
import { IVue3TimeDuration } from "vue3-time-duration/types/IVue3TimeDuration";
|
|
25
24
|
|
|
26
25
|
export default defineComponent({
|
|
27
26
|
name: "FormLogin",
|
|
@@ -33,7 +32,7 @@ npm install --save vue3-time-duration
|
|
|
33
32
|
duration: {
|
|
34
33
|
start: "10:00",
|
|
35
34
|
end: "10:05"
|
|
36
|
-
}
|
|
35
|
+
}
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
});
|
|
@@ -45,9 +44,8 @@ npm install --save vue3-time-duration
|
|
|
45
44
|
<script setup lang="ts">
|
|
46
45
|
import "vue3-time-duration/dist/vue3-time-duration.css";
|
|
47
46
|
import Vue3TimeDuration from "vue3-time-duration";
|
|
48
|
-
import { IVue3TimeDuration } from "vue3-time-duration/types/IVue3TimeDuration";
|
|
49
47
|
|
|
50
|
-
const duration
|
|
48
|
+
const duration = ref({ start: "10:00", end: "10:05" });
|
|
51
49
|
</script>
|
|
52
50
|
|
|
53
51
|
<template>
|
|
@@ -67,6 +65,7 @@ npm install --save vue3-time-duration
|
|
|
67
65
|
--bg-selected: #f3f3f3;
|
|
68
66
|
--color-font: #333;
|
|
69
67
|
--color-border: rgb(223, 230, 238);
|
|
68
|
+
--size-font: '14px';
|
|
70
69
|
}
|
|
71
70
|
```
|
|
72
71
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.icon-x-mark[data-v-7f1f4e49]{display:flex}.ui-widget-time[data-v-
|
|
1
|
+
.icon-x-mark[data-v-7f1f4e49]{display:flex}.ui-widget-time[data-v-157c9b55]{position:relative}.ui-widget-time__w[data-v-157c9b55]{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--color-border);border-radius:12px;padding:8px 8px 8px 2px;background-color:var(--bg-element);height:24px}.ui-widget-time__w-input[data-v-157c9b55]{background-color:var(--bg-element);border:1px solid var(--bg-element);color:var(--color-font);font-size:var(--size-font);margin-left:3px;width:100%}.ui-widget-time__w-input[data-v-157c9b55]:focus{outline-color:var(--bg-element);outline-style:solid}.ui-widget-time__w-icon[data-v-157c9b55]{cursor:pointer}.ui-widget-time__dropdown[data-v-157c9b55]{position:absolute;left:0;right:0;max-height:150px;margin:4px;padding:6px;background:#fff;z-index:1;border:1px solid #f5f5f5;border-radius:6px;box-shadow:0 0 8px 4px #0000000a;overflow-y:auto}.ui-widget-time__dropdown-item[data-v-157c9b55]{padding:6px 4px;cursor:pointer;font-size:var(--size-font)}.ui-widget-time__dropdown-item_selected[data-v-157c9b55]{background:var(--bg-selected);border-radius:6px}body{margin:0;padding:0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vue3-time-duration{--bg-element: #ffffff;--bg-selected: #f3f3f3;--color-border: rgb(223, 230, 238);--color-font: #333;--size-font: "14px"}.vue3-time-duration__t{display:flex;align-items:center}.vue3-time-duration__t-left{margin-right:6px}.vue3-time-duration__t-right{margin-left:6px}
|
|
@@ -1,135 +1,142 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
const
|
|
3
|
-
const c =
|
|
4
|
-
for (const [
|
|
5
|
-
c[
|
|
1
|
+
import { createElementBlock as C, openBlock as x, createStaticVNode as M, defineComponent as B, ref as v, computed as V, watch as b, createElementVNode as S, createCommentVNode as P, withDirectives as R, createVNode as T, vModelText as U, Fragment as W, renderList as A, normalizeClass as E, toDisplayString as D, onMounted as H, vShow as O } from "vue";
|
|
2
|
+
const F = (g, _) => {
|
|
3
|
+
const c = g.__vccOpts || g;
|
|
4
|
+
for (const [I, r] of _)
|
|
5
|
+
c[I] = r;
|
|
6
6
|
return c;
|
|
7
|
-
},
|
|
8
|
-
function
|
|
9
|
-
return
|
|
10
|
-
|
|
7
|
+
}, z = {}, X = { class: "icon-x-mark" };
|
|
8
|
+
function Z(g, _) {
|
|
9
|
+
return x(), C("div", X, _[0] || (_[0] = [
|
|
10
|
+
M('<svg width="20.000000" height="20.000000" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" data-v-7f1f4e49><desc data-v-7f1f4e49>Created with Pixso.</desc><defs data-v-7f1f4e49><clipPath id="clip131_5974" data-v-7f1f4e49><rect id="user-time" width="20.000000" height="20.000000" fill="white" fill-opacity="0" data-v-7f1f4e49></rect></clipPath></defs><g clip-path="url(#clip131_5974)" data-v-7f1f4e49><path id="path (Border)" d="M3.72 3.72C3.47 3.97 3.47 4.36 3.72 4.6L9.11 10L3.72 15.39C3.47 15.63 3.47 16.02 3.72 16.27C3.97 16.52 4.36 16.52 4.6 16.27L10 10.88L15.39 16.27C15.63 16.52 16.02 16.52 16.27 16.27C16.52 16.02 16.52 15.63 16.27 15.39L10.88 10L16.27 4.6C16.39 4.48 16.45 4.33 16.45 4.16C16.45 3.99 16.39 3.84 16.27 3.72C16.15 3.6 16 3.54 15.83 3.54C15.66 3.54 15.51 3.6 15.39 3.72L10 9.11L4.6 3.72C4.36 3.47 3.97 3.47 3.72 3.72Z" fill="#77797C" fill-opacity="1.000000" fill-rule="evenodd" data-v-7f1f4e49></path></g></svg>', 1)
|
|
11
11
|
]));
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const j = /* @__PURE__ */ F(z, [["render", Z], ["__scopeId", "data-v-7f1f4e49"]]), q = { class: "ui-widget-time" }, G = { class: "ui-widget-time__w" }, J = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "ui-widget-time__dropdown"
|
|
16
|
-
},
|
|
16
|
+
}, K = ["onClick"], Q = /* @__PURE__ */ B({
|
|
17
17
|
__name: "UiWidgetTime",
|
|
18
18
|
props: {
|
|
19
19
|
timeListId: { type: Number, default: 0 },
|
|
20
20
|
timeList: { type: Array, default: [] }
|
|
21
21
|
},
|
|
22
22
|
emits: ["selectedId"],
|
|
23
|
-
setup(
|
|
24
|
-
const c =
|
|
23
|
+
setup(g, { emit: _ }) {
|
|
24
|
+
const c = g, I = _, r = v([]), a = v(!1), e = v(0), n = v(void 0), p = v(), f = v(!1), k = v(), L = v(0), w = V(() => r.value.length > 0 ? r.value : c.timeList), y = V(() => c.timeListId), h = V({
|
|
25
25
|
get() {
|
|
26
|
-
var
|
|
27
|
-
return n.value === void 0 ? (
|
|
26
|
+
var l;
|
|
27
|
+
return n.value === void 0 ? (l = c.timeList.find((s) => s.id === y.value)) == null ? void 0 : l.time : n.value;
|
|
28
28
|
},
|
|
29
|
-
set(
|
|
30
|
-
n.value =
|
|
29
|
+
set(l) {
|
|
30
|
+
n.value = l;
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
|
|
33
|
+
b(y, (l) => {
|
|
34
|
+
var s;
|
|
35
|
+
e.value = l, h.value = (s = c.timeList.find((o) => o.id === l)) == null ? void 0 : s.time;
|
|
36
36
|
});
|
|
37
|
-
const
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
}, t = () => {
|
|
41
|
-
a.value = !0;
|
|
37
|
+
const t = (l) => {
|
|
38
|
+
var s;
|
|
39
|
+
e.value = l, h.value = (s = w.value.find((o) => o.id === e.value)) == null ? void 0 : s.time, a.value = !1, I("selectedId", e.value);
|
|
42
40
|
}, u = () => {
|
|
41
|
+
a.value = !0, setTimeout(() => {
|
|
42
|
+
var s;
|
|
43
|
+
const l = k.value;
|
|
44
|
+
l !== null && (L.value = w.value.findIndex((o) => Number(o.id) === e.value), (s = l[L.value]) == null || s.scrollIntoView());
|
|
45
|
+
}, 250);
|
|
46
|
+
}, i = () => {
|
|
43
47
|
setTimeout(() => {
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
}, 200),
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
r.value = c.timeList.filter((
|
|
48
|
+
var l, s;
|
|
49
|
+
f.value || (h.value = (l = w.value.find((o) => o.id === e.value)) == null ? void 0 : l.time, I("selectedId", (s = w.value.find((o) => o.id === e.value)) == null ? void 0 : s.id), a.value = !1);
|
|
50
|
+
}, 200), f.value = !1;
|
|
51
|
+
}, d = () => {
|
|
52
|
+
e.value = 0, r.value = [], h.value = "", p.value.focus(), f.value = !0, a.value = !0;
|
|
53
|
+
}, m = () => {
|
|
54
|
+
r.value = c.timeList.filter((l) => l.time.startsWith(n.value));
|
|
51
55
|
};
|
|
52
|
-
return (
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
return (l, s) => (x(), C("div", q, [
|
|
57
|
+
S("div", G, [
|
|
58
|
+
R(S("input", {
|
|
55
59
|
ref_key: "inputRef",
|
|
56
|
-
ref:
|
|
57
|
-
"onUpdate:modelValue":
|
|
60
|
+
ref: p,
|
|
61
|
+
"onUpdate:modelValue": s[0] || (s[0] = (o) => h.value = o),
|
|
58
62
|
type: "text",
|
|
59
63
|
class: "ui-widget-time__w-input",
|
|
60
|
-
onClick:
|
|
61
|
-
onFocusout:
|
|
62
|
-
onInput:
|
|
64
|
+
onClick: u,
|
|
65
|
+
onFocusout: i,
|
|
66
|
+
onInput: m
|
|
63
67
|
}, null, 544), [
|
|
64
|
-
[U,
|
|
68
|
+
[U, h.value]
|
|
65
69
|
]),
|
|
66
|
-
|
|
70
|
+
T(j, {
|
|
67
71
|
class: "ui-widget-time__w-icon",
|
|
68
|
-
onClick:
|
|
72
|
+
onClick: d
|
|
69
73
|
})
|
|
70
74
|
]),
|
|
71
|
-
a.value ? (
|
|
72
|
-
(
|
|
73
|
-
|
|
75
|
+
a.value ? (x(), C("div", J, [
|
|
76
|
+
(x(!0), C(W, null, A(w.value, (o, N) => (x(), C("div", { key: N }, [
|
|
77
|
+
S("div", {
|
|
78
|
+
ref_for: !0,
|
|
79
|
+
ref_key: "refItemList",
|
|
80
|
+
ref: k,
|
|
74
81
|
class: E({
|
|
75
82
|
"ui-widget-time__dropdown-item": !0,
|
|
76
|
-
"ui-widget-time__dropdown-item_selected":
|
|
83
|
+
"ui-widget-time__dropdown-item_selected": L.value === N
|
|
77
84
|
}),
|
|
78
|
-
onClick: (
|
|
79
|
-
},
|
|
85
|
+
onClick: (te) => t(o.id)
|
|
86
|
+
}, D(o.time), 11, K)
|
|
80
87
|
]))), 128))
|
|
81
88
|
])) : P("", !0)
|
|
82
89
|
]));
|
|
83
90
|
}
|
|
84
|
-
}), $ = /* @__PURE__ */
|
|
91
|
+
}), $ = /* @__PURE__ */ F(Q, [["__scopeId", "data-v-157c9b55"]]), Y = { class: "vue3-time-duration" }, ee = { class: "vue3-time-duration__t" }, le = /* @__PURE__ */ B({
|
|
85
92
|
__name: "App",
|
|
86
93
|
props: {
|
|
87
94
|
modelValue: { default: () => ({ start: "00:00", end: "00:05" }) }
|
|
88
95
|
},
|
|
89
96
|
emits: ["update:modelValue"],
|
|
90
|
-
setup(
|
|
91
|
-
const c =
|
|
97
|
+
setup(g, { emit: _ }) {
|
|
98
|
+
const c = g, I = _, r = v(0), a = v([]), e = v(), n = v(), p = v(), f = v();
|
|
92
99
|
H(() => {
|
|
93
|
-
var t, u,
|
|
94
|
-
|
|
100
|
+
var t, u, i, d;
|
|
101
|
+
w(), r.value = a.value.length - 1, e.value = L((t = c.modelValue) == null ? void 0 : t.start), n.value = L((u = c.modelValue) == null ? void 0 : u.end), p.value = (i = a.value.find((m) => m.id === e.value)) == null ? void 0 : i.time, f.value = (d = a.value.find((m) => m.id === n.value)) == null ? void 0 : d.time;
|
|
95
102
|
});
|
|
96
|
-
const k =
|
|
97
|
-
() => (
|
|
98
|
-
),
|
|
103
|
+
const k = V(
|
|
104
|
+
() => (I("update:modelValue", { start: p.value, end: f.value }), { start: p.value, end: f.value })
|
|
105
|
+
), L = (t) => {
|
|
99
106
|
var u;
|
|
100
|
-
return (u = a.value.find((
|
|
101
|
-
},
|
|
102
|
-
let t = -1, u = "",
|
|
103
|
-
for (let
|
|
104
|
-
|
|
105
|
-
}, p = (t) => {
|
|
106
|
-
var u, l;
|
|
107
|
-
i.value = t, n.value = t >= n.value ? t + 1 : n.value, n.value > r.value && (n.value = 0), _.value = (u = a.value.find((s) => s.id === i.value)) == null ? void 0 : u.time, m.value = (l = a.value.find((s) => s.id === n.value)) == null ? void 0 : l.time;
|
|
107
|
+
return (u = a.value.find((i) => i.time === t)) == null ? void 0 : u.id;
|
|
108
|
+
}, w = () => {
|
|
109
|
+
let t = -1, u = "", i = 0, d = "";
|
|
110
|
+
for (let m = 0; m < 288; m++)
|
|
111
|
+
i >= 60 && (i = 0), m % 12 === 0 && (t += 1), u = t.toString().length === 1 ? "0" + t.toString() : t.toString(), d = i.toString().length === 1 ? "0" + i.toString() : i.toString(), a.value.push({ id: m, time: u + ":" + d }), i += 5;
|
|
108
112
|
}, y = (t) => {
|
|
109
|
-
var u,
|
|
110
|
-
|
|
113
|
+
var u, i;
|
|
114
|
+
e.value = t, n.value = t >= n.value ? t + 1 : n.value, n.value > r.value && (n.value = 0), p.value = (u = a.value.find((d) => d.id === e.value)) == null ? void 0 : u.time, f.value = (i = a.value.find((d) => d.id === n.value)) == null ? void 0 : i.time;
|
|
115
|
+
}, h = (t) => {
|
|
116
|
+
var u, i;
|
|
117
|
+
n.value = t, e.value = t <= e.value ? t - 1 : e.value, e.value < 0 && (e.value = r.value), p.value = (u = a.value.find((d) => d.id === e.value)) == null ? void 0 : u.time, f.value = (i = a.value.find((d) => d.id === n.value)) == null ? void 0 : i.time;
|
|
111
118
|
};
|
|
112
|
-
return (t, u) => (
|
|
113
|
-
|
|
119
|
+
return (t, u) => (x(), C("div", Y, [
|
|
120
|
+
R(S("div", null, D(k.value), 513), [
|
|
114
121
|
[O, !1]
|
|
115
122
|
]),
|
|
116
|
-
|
|
117
|
-
|
|
123
|
+
S("div", ee, [
|
|
124
|
+
T($, {
|
|
118
125
|
class: "vue3-time-duration__t-left",
|
|
119
126
|
"time-list": a.value,
|
|
120
|
-
"time-list-id":
|
|
121
|
-
onSelectedId:
|
|
127
|
+
"time-list-id": e.value,
|
|
128
|
+
onSelectedId: y
|
|
122
129
|
}, null, 8, ["time-list", "time-list-id"]),
|
|
123
|
-
|
|
130
|
+
T($, {
|
|
124
131
|
class: "vue3-time-duration__t-right",
|
|
125
132
|
"time-list": a.value,
|
|
126
133
|
"time-list-id": n.value,
|
|
127
|
-
onSelectedId:
|
|
134
|
+
onSelectedId: h
|
|
128
135
|
}, null, 8, ["time-list", "time-list-id"])
|
|
129
136
|
])
|
|
130
137
|
]));
|
|
131
138
|
}
|
|
132
139
|
});
|
|
133
140
|
export {
|
|
134
|
-
|
|
141
|
+
le as default
|
|
135
142
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,k){typeof exports=="object"&&typeof module<"u"?module.exports=k(require("vue")):typeof define=="function"&&define.amd?define(["vue"],k):(e=typeof globalThis<"u"?globalThis:e||self,e["vue3-time-duration"]=k(e.Vue))})(this,function(e){"use strict";const k=(g,p)=>{const u=g.__vccOpts||g;for(const[I,m]of p)u[I]=m;return u},y={},B={class:"icon-x-mark"};function N(g,p){return e.openBlock(),e.createElementBlock("div",B,p[0]||(p[0]=[e.createStaticVNode('<svg width="20.000000" height="20.000000" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" data-v-7f1f4e49><desc data-v-7f1f4e49>Created with Pixso.</desc><defs data-v-7f1f4e49><clipPath id="clip131_5974" data-v-7f1f4e49><rect id="user-time" width="20.000000" height="20.000000" fill="white" fill-opacity="0" data-v-7f1f4e49></rect></clipPath></defs><g clip-path="url(#clip131_5974)" data-v-7f1f4e49><path id="path (Border)" d="M3.72 3.72C3.47 3.97 3.47 4.36 3.72 4.6L9.11 10L3.72 15.39C3.47 15.63 3.47 16.02 3.72 16.27C3.97 16.52 4.36 16.52 4.6 16.27L10 10.88L15.39 16.27C15.63 16.52 16.02 16.52 16.27 16.27C16.52 16.02 16.52 15.63 16.27 15.39L10.88 10L16.27 4.6C16.39 4.48 16.45 4.33 16.45 4.16C16.45 3.99 16.39 3.84 16.27 3.72C16.15 3.6 16 3.54 15.83 3.54C15.66 3.54 15.51 3.6 15.39 3.72L10 9.11L4.6 3.72C4.36 3.47 3.97 3.47 3.72 3.72Z" fill="#77797C" fill-opacity="1.000000" fill-rule="evenodd" data-v-7f1f4e49></path></g></svg>',1)]))}const E=k(y,[["render",N],["__scopeId","data-v-7f1f4e49"]]),T={class:"ui-widget-time"},$={class:"ui-widget-time__w"},D={key:0,class:"ui-widget-time__dropdown"},R=["onClick"],V=k(e.defineComponent({__name:"UiWidgetTime",props:{timeListId:{type:Number,default:0},timeList:{type:Array,default:[]}},emits:["selectedId"],setup(g,{emit:p}){const u=g,I=p,m=e.ref([]),o=e.ref(!1),t=e.ref(0),d=e.ref(void 0),_=e.ref(),v=e.ref(!1),C=e.ref(),L=e.ref(0),w=e.computed(()=>m.value.length>0?m.value:u.timeList),x=e.computed(()=>u.timeListId),h=e.computed({get(){var n;return d.value===void 0?(n=u.timeList.find(s=>s.id===x.value))==null?void 0:n.time:d.value},set(n){d.value=n}});e.watch(x,n=>{var s;t.value=n,h.value=(s=u.timeList.find(r=>r.id===n))==null?void 0:s.time});const i=n=>{var s;t.value=n,h.value=(s=w.value.find(r=>r.id===t.value))==null?void 0:s.time,o.value=!1,I("selectedId",t.value)},a=()=>{o.value=!0,setTimeout(()=>{var s;const n=C.value;n!==null&&(L.value=w.value.findIndex(r=>Number(r.id)===t.value),(s=n[L.value])==null||s.scrollIntoView())},250)},l=()=>{setTimeout(()=>{var n,s;v.value||(h.value=(n=w.value.find(r=>r.id===t.value))==null?void 0:n.time,I("selectedId",(s=w.value.find(r=>r.id===t.value))==null?void 0:s.id),o.value=!1)},200),v.value=!1},c=()=>{t.value=0,m.value=[],h.value="",_.value.focus(),v.value=!0,o.value=!0},f=()=>{m.value=u.timeList.filter(n=>n.time.startsWith(d.value))};return(n,s)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("div",$,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:_,"onUpdate:modelValue":s[0]||(s[0]=r=>h.value=r),type:"text",class:"ui-widget-time__w-input",onClick:a,onFocusout:l,onInput:f},null,544),[[e.vModelText,h.value]]),e.createVNode(E,{class:"ui-widget-time__w-icon",onClick:c})]),o.value?(e.openBlock(),e.createElementBlock("div",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(r,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",{ref_for:!0,ref_key:"refItemList",ref:C,class:e.normalizeClass({"ui-widget-time__dropdown-item":!0,"ui-widget-time__dropdown-item_selected":L.value===S}),onClick:U=>i(r.id)},e.toDisplayString(r.time),11,R)]))),128))])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-157c9b55"]]),F={class:"vue3-time-duration"},M={class:"vue3-time-duration__t"};return e.defineComponent({__name:"App",props:{modelValue:{default:()=>({start:"00:00",end:"00:05"})}},emits:["update:modelValue"],setup(g,{emit:p}){const u=g,I=p,m=e.ref(0),o=e.ref([]),t=e.ref(),d=e.ref(),_=e.ref(),v=e.ref();e.onMounted(()=>{var i,a,l,c;w(),m.value=o.value.length-1,t.value=L((i=u.modelValue)==null?void 0:i.start),d.value=L((a=u.modelValue)==null?void 0:a.end),_.value=(l=o.value.find(f=>f.id===t.value))==null?void 0:l.time,v.value=(c=o.value.find(f=>f.id===d.value))==null?void 0:c.time});const C=e.computed(()=>(I("update:modelValue",{start:_.value,end:v.value}),{start:_.value,end:v.value})),L=i=>{var a;return(a=o.value.find(l=>l.time===i))==null?void 0:a.id},w=()=>{let i=-1,a="",l=0,c="";for(let f=0;f<288;f++)l>=60&&(l=0),f%12===0&&(i+=1),a=i.toString().length===1?"0"+i.toString():i.toString(),c=l.toString().length===1?"0"+l.toString():l.toString(),o.value.push({id:f,time:a+":"+c}),l+=5},x=i=>{var a,l;t.value=i,d.value=i>=d.value?i+1:d.value,d.value>m.value&&(d.value=0),_.value=(a=o.value.find(c=>c.id===t.value))==null?void 0:a.time,v.value=(l=o.value.find(c=>c.id===d.value))==null?void 0:l.time},h=i=>{var a,l;d.value=i,t.value=i<=t.value?i-1:t.value,t.value<0&&(t.value=m.value),_.value=(a=o.value.find(c=>c.id===t.value))==null?void 0:a.time,v.value=(l=o.value.find(c=>c.id===d.value))==null?void 0:l.time};return(i,a)=>(e.openBlock(),e.createElementBlock("div",F,[e.withDirectives(e.createElementVNode("div",null,e.toDisplayString(C.value),513),[[e.vShow,!1]]),e.createElementVNode("div",M,[e.createVNode(V,{class:"vue3-time-duration__t-left","time-list":o.value,"time-list-id":t.value,onSelectedId:x},null,8,["time-list","time-list-id"]),e.createVNode(V,{class:"vue3-time-duration__t-right","time-list":o.value,"time-list-id":d.value,onSelectedId:h},null,8,["time-list","time-list-id"])])]))}})});
|