@web-utils/component 3.8.1 → 3.8.2
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/package.json +1 -1
- package/vue-cron/index.mjs +279 -223
- package/vue-cron/style.css +1 -1
- package/web-types.json +9 -1
package/package.json
CHANGED
package/vue-cron/index.mjs
CHANGED
|
@@ -1,69 +1,72 @@
|
|
|
1
1
|
var W = (n, e, t) => new Promise((s, a) => {
|
|
2
|
-
var r = (
|
|
2
|
+
var r = (o) => {
|
|
3
3
|
try {
|
|
4
|
-
|
|
4
|
+
c(t.next(o));
|
|
5
5
|
} catch (l) {
|
|
6
6
|
a(l);
|
|
7
7
|
}
|
|
8
|
-
}, i = (
|
|
8
|
+
}, i = (o) => {
|
|
9
9
|
try {
|
|
10
|
-
|
|
10
|
+
c(t.throw(o));
|
|
11
11
|
} catch (l) {
|
|
12
12
|
a(l);
|
|
13
13
|
}
|
|
14
|
-
},
|
|
15
|
-
|
|
14
|
+
}, c = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(r, i);
|
|
15
|
+
c((t = t.apply(n, e)).next());
|
|
16
16
|
});
|
|
17
17
|
import { formatDate as H } from "@web-utils/integrations/dayjs";
|
|
18
18
|
import { copy as L } from "@web-utils/core";
|
|
19
19
|
import { n as F } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
20
|
-
const
|
|
20
|
+
const Y = {
|
|
21
21
|
Seconds: {
|
|
22
22
|
name: "秒",
|
|
23
|
-
every: "每秒钟,允许的通配符[, -
|
|
23
|
+
every: "每秒钟,允许的通配符[* / , -]",
|
|
24
24
|
interval: ["从", "秒钟开始,每", "秒钟执行一次"],
|
|
25
25
|
specific: "指定",
|
|
26
26
|
cycle: ["周期从", " - ", "秒"]
|
|
27
27
|
},
|
|
28
28
|
Minutes: {
|
|
29
29
|
name: "分",
|
|
30
|
-
every: "每分钟,允许的通配符[, -
|
|
30
|
+
every: "每分钟,允许的通配符[* / , -]",
|
|
31
31
|
interval: ["从", "分钟开始,每", "分钟执行一次"],
|
|
32
32
|
specific: "指定",
|
|
33
33
|
cycle: ["周期从", " - ", "分"]
|
|
34
34
|
},
|
|
35
35
|
Hours: {
|
|
36
36
|
name: "时",
|
|
37
|
-
every: "每小时,允许的通配符[, -
|
|
37
|
+
every: "每小时,允许的通配符[* / , -]",
|
|
38
38
|
interval: ["从", "小时开始,每", "小时执行一次"],
|
|
39
39
|
specific: "指定",
|
|
40
40
|
cycle: ["周期从", " - ", "小时"]
|
|
41
41
|
},
|
|
42
42
|
Day: {
|
|
43
43
|
name: "天",
|
|
44
|
-
every: "
|
|
45
|
-
|
|
46
|
-
intervalDay: ["从", "天开始,每", "天执行一次"],
|
|
47
|
-
specificWeek: "指定星期",
|
|
44
|
+
every: "每一天,允许的通配符[* / , - L W]",
|
|
45
|
+
intervalDay: ["从第", "天开始,每", "天执行一次"],
|
|
48
46
|
specificDay: "指定天",
|
|
49
|
-
lastDay: "
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
lastDay: "每月的最后一天",
|
|
48
|
+
lastWorkday: "每月的最后一个工作日",
|
|
49
|
+
beforeEndMonth: ["每月倒数第", "天"],
|
|
50
|
+
nearestWorkday: ["距离本月", "号最近的一个工作日(周一至周五)"]
|
|
51
|
+
},
|
|
52
|
+
Week: {
|
|
53
|
+
name: "周",
|
|
54
|
+
every: "每周,允许的通配符[* / , - L #]",
|
|
55
|
+
intervalWeek: ["从", "开始,每", "天执行一次"],
|
|
56
|
+
specificWeek: "指定星期",
|
|
57
|
+
lastWeek: ["每月的最后一个"],
|
|
58
|
+
someWeekday: ["每月第", "周的"]
|
|
55
59
|
},
|
|
56
|
-
Week: ["天", "一", "二", "三", "四", "五", "六"].map((n) => `星期${n}`),
|
|
57
60
|
Month: {
|
|
58
61
|
name: "月",
|
|
59
|
-
every: "
|
|
62
|
+
every: "每个月,允许的通配符[* / , -]",
|
|
60
63
|
interval: ["从", "月开始,每", "月执行一次"],
|
|
61
64
|
specific: "指定",
|
|
62
65
|
cycle: ["周期从", " - ", "月"]
|
|
63
66
|
},
|
|
64
67
|
Year: {
|
|
65
68
|
name: "年",
|
|
66
|
-
every: "
|
|
69
|
+
every: "每一年,允许的通配符[* / , -]",
|
|
67
70
|
interval: ["从", "年开始,每", "年执行一次"],
|
|
68
71
|
specific: "指定",
|
|
69
72
|
cycle: ["周期从", " - ", "年"]
|
|
@@ -82,7 +85,7 @@ const T = {
|
|
|
82
85
|
"@daily": "0 0 0 * * * *",
|
|
83
86
|
"@midnight": "0 0 0 * * * *",
|
|
84
87
|
"@hourly": "0 0 * * * * *"
|
|
85
|
-
},
|
|
88
|
+
}, R = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], U = new RegExp(R.join("|"), "g"), M = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], B = new RegExp(M.join("|"), "g"), g = 275759;
|
|
86
89
|
var S;
|
|
87
90
|
(function(n) {
|
|
88
91
|
n.IncrementLargerThanRange = "IncrementLargerThanRange";
|
|
@@ -100,15 +103,15 @@ function C(n) {
|
|
|
100
103
|
t.push("*");
|
|
101
104
|
}
|
|
102
105
|
return [
|
|
103
|
-
new
|
|
104
|
-
new
|
|
106
|
+
new O(t[0]),
|
|
107
|
+
new O(t[1]),
|
|
105
108
|
new P(t[2]),
|
|
106
109
|
new V(t[3], t[5]),
|
|
107
110
|
new j(t[4]),
|
|
108
|
-
new
|
|
111
|
+
new G(t[6])
|
|
109
112
|
];
|
|
110
113
|
}
|
|
111
|
-
function
|
|
114
|
+
function E(n, e, t) {
|
|
112
115
|
const s = [];
|
|
113
116
|
for (let a of n) {
|
|
114
117
|
let r;
|
|
@@ -133,7 +136,7 @@ class y {
|
|
|
133
136
|
return y.getValues(this.items, this.first, this.last);
|
|
134
137
|
}
|
|
135
138
|
get warnings() {
|
|
136
|
-
return
|
|
139
|
+
return E(this.items, this.first, this.last);
|
|
137
140
|
}
|
|
138
141
|
static getValues(e, t, s) {
|
|
139
142
|
return Array.from(new Set(b(e, (a) => a.values(t, s)))).sort(w);
|
|
@@ -145,8 +148,8 @@ class f {
|
|
|
145
148
|
}
|
|
146
149
|
rangeLength(e, t) {
|
|
147
150
|
var s, a, r, i;
|
|
148
|
-
const
|
|
149
|
-
return
|
|
151
|
+
const c = (a = (s = this.range) === null || s === void 0 ? void 0 : s.from) !== null && a !== void 0 ? a : e, o = (i = (r = this.range) === null || r === void 0 ? void 0 : r.to) !== null && i !== void 0 ? i : t;
|
|
152
|
+
return o < c ? t - c + (o - e) + 1 : o - c;
|
|
150
153
|
}
|
|
151
154
|
values(e, t) {
|
|
152
155
|
const s = this.range ? this.range.from : e, a = this.rangeLength(e, t);
|
|
@@ -160,34 +163,34 @@ class f {
|
|
|
160
163
|
}
|
|
161
164
|
static parse(e, t, s, a = !1, r) {
|
|
162
165
|
var i;
|
|
163
|
-
const
|
|
164
|
-
if (!
|
|
166
|
+
const c = new f(e), [o, l, d, h, p] = (i = e.match(/^(?:(\*)|([0-9]+)|([0-9]+-[0-9]+))(?:\/([1-9][0-9]*))?$/)) !== null && i !== void 0 ? i : [];
|
|
167
|
+
if (!o)
|
|
165
168
|
throw new Error("Field item invalid format");
|
|
166
|
-
if (
|
|
169
|
+
if (p && (c.step = parseInt(p, 10)), d) {
|
|
167
170
|
let u = parseInt(d, 10);
|
|
168
171
|
if (u = r ? r(u) : u, u < t || u > s)
|
|
169
172
|
throw new Error("Field item out of valid value range");
|
|
170
|
-
|
|
173
|
+
c.range = {
|
|
171
174
|
from: u,
|
|
172
|
-
to:
|
|
175
|
+
to: p ? void 0 : u
|
|
173
176
|
};
|
|
174
177
|
} else if (h) {
|
|
175
|
-
const [u,
|
|
178
|
+
const [u, k] = h.split("-").map((N) => {
|
|
176
179
|
const I = parseInt(N, 10);
|
|
177
180
|
return r ? r(I) : I;
|
|
178
181
|
});
|
|
179
|
-
if (u < t || u > s ||
|
|
182
|
+
if (u < t || u > s || k < t || k > s || k < u && !a)
|
|
180
183
|
throw new Error("Field item range invalid, either value out of valid range or start greater than end in non wraparound field");
|
|
181
|
-
|
|
184
|
+
c.range = {
|
|
182
185
|
from: u,
|
|
183
|
-
to:
|
|
186
|
+
to: k
|
|
184
187
|
};
|
|
185
188
|
}
|
|
186
|
-
return
|
|
189
|
+
return c;
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
192
|
f.asterisk = new f("*");
|
|
190
|
-
class
|
|
193
|
+
class O extends y {
|
|
191
194
|
constructor() {
|
|
192
195
|
super(...arguments), this.first = 0, this.last = 59;
|
|
193
196
|
}
|
|
@@ -208,12 +211,12 @@ class V {
|
|
|
208
211
|
if (r.endsWith("l"))
|
|
209
212
|
this.lastDaysOfWeekItems.push(a(r.slice(0, -1)));
|
|
210
213
|
else if (i !== -1) {
|
|
211
|
-
const
|
|
212
|
-
if (!/^[1-5]$/.test(
|
|
214
|
+
const c = r.slice(i + 1);
|
|
215
|
+
if (!/^[1-5]$/.test(c))
|
|
213
216
|
throw new Error("Field item nth of month (#) invalid");
|
|
214
217
|
this.nthDaysOfWeekItems.push({
|
|
215
218
|
item: a(r.slice(0, i)),
|
|
216
|
-
nth: parseInt(
|
|
219
|
+
nth: parseInt(c, 10)
|
|
217
220
|
});
|
|
218
221
|
} else
|
|
219
222
|
this.daysOfWeekItems.push(a(r));
|
|
@@ -231,7 +234,7 @@ class V {
|
|
|
231
234
|
...this.lastDaysOfWeekItems,
|
|
232
235
|
...this.nthDaysOfWeekItems.map(({ item: a }) => a)
|
|
233
236
|
];
|
|
234
|
-
return e.push(...
|
|
237
|
+
return e.push(...E(t, 1, 31), ...E(s, 0, 6)), e;
|
|
235
238
|
}
|
|
236
239
|
get allDays() {
|
|
237
240
|
return !this.lastDay && !this.lastWeekday && !this.nearestWeekdayItems.length && !this.lastDaysOfWeekItems.length && !this.nthDaysOfWeekItems.length && this.daysItems.length === 1 && this.daysItems[0].any && this.daysOfWeekItems.length === 1 && this.daysOfWeekItems[0].any;
|
|
@@ -247,46 +250,46 @@ class D {
|
|
|
247
250
|
const a = /* @__PURE__ */ new Set();
|
|
248
251
|
for (let r of e.nthDaysOfWeekItems)
|
|
249
252
|
for (let i of r.item.values(0, 6)) {
|
|
250
|
-
let
|
|
251
|
-
a.has(
|
|
253
|
+
let c = i * 10 + r.nth;
|
|
254
|
+
a.has(c) || (a.add(c), t.nthDaysOfWeek.push([i, r.nth]));
|
|
252
255
|
}
|
|
253
256
|
return t;
|
|
254
257
|
}
|
|
255
258
|
getDays(e, t) {
|
|
256
|
-
const s = new Set(this.days), a = new Date(e, t, 0).getDate(), r = new Date(e, t - 1, 1).getDay(), i = (
|
|
257
|
-
|
|
258
|
-
const
|
|
259
|
-
let l =
|
|
259
|
+
const s = new Set(this.days), a = new Date(e, t, 0).getDate(), r = new Date(e, t - 1, 1).getDay(), i = (c) => {
|
|
260
|
+
c > a && (c = a);
|
|
261
|
+
const o = (c + r - 1) % 7;
|
|
262
|
+
let l = c + (o === 0 ? 1 : o === 6 ? -1 : 0);
|
|
260
263
|
return l + (l < 1 ? 3 : l > a ? -3 : 0);
|
|
261
264
|
};
|
|
262
265
|
this.lastDay && s.add(a), this.lastWeekday && s.add(i(a));
|
|
263
|
-
for (const
|
|
264
|
-
s.add(i(
|
|
266
|
+
for (const c of this.nearestWeekday)
|
|
267
|
+
s.add(i(c));
|
|
265
268
|
if (this.daysOfWeek.length || this.lastDaysOfWeek.length || this.nthDaysOfWeek.length) {
|
|
266
|
-
const
|
|
267
|
-
for (let
|
|
268
|
-
|
|
269
|
-
for (const
|
|
270
|
-
for (const l of o
|
|
269
|
+
const c = Array(7).fill(0).map(() => []);
|
|
270
|
+
for (let o = 1; o < 36; o++)
|
|
271
|
+
c[(o + r - 1) % 7].push(o);
|
|
272
|
+
for (const o of this.daysOfWeek)
|
|
273
|
+
for (const l of c[o])
|
|
271
274
|
s.add(l);
|
|
272
|
-
for (const
|
|
273
|
-
for (let l = o
|
|
274
|
-
if (o
|
|
275
|
-
s.add(o
|
|
275
|
+
for (const o of this.lastDaysOfWeek)
|
|
276
|
+
for (let l = c[o].length - 1; l >= 0; l--)
|
|
277
|
+
if (c[o][l] <= a) {
|
|
278
|
+
s.add(c[o][l]);
|
|
276
279
|
break;
|
|
277
280
|
}
|
|
278
|
-
for (const [
|
|
279
|
-
s.add(o
|
|
281
|
+
for (const [o, l] of this.nthDaysOfWeek)
|
|
282
|
+
s.add(c[o][l - 1]);
|
|
280
283
|
}
|
|
281
|
-
return Array.from(s).filter((
|
|
284
|
+
return Array.from(s).filter((c) => c <= a).sort(w);
|
|
282
285
|
}
|
|
283
286
|
}
|
|
284
287
|
class j extends y {
|
|
285
288
|
constructor(e) {
|
|
286
|
-
super(e.replace(
|
|
289
|
+
super(e.replace(U, (t) => R.indexOf(t) + 1 + "")), this.first = 1, this.last = 12;
|
|
287
290
|
}
|
|
288
291
|
}
|
|
289
|
-
class
|
|
292
|
+
class G extends y {
|
|
290
293
|
constructor(e) {
|
|
291
294
|
super(e), this.first = 1970, this.last = 2099, this.items;
|
|
292
295
|
}
|
|
@@ -294,12 +297,12 @@ class Z extends y {
|
|
|
294
297
|
return this.field.split(",").map((e) => f.parse(e, 0, g));
|
|
295
298
|
}
|
|
296
299
|
get warnings() {
|
|
297
|
-
return
|
|
300
|
+
return E(this.items, this.first, g);
|
|
298
301
|
}
|
|
299
302
|
nextYear(e) {
|
|
300
303
|
var t;
|
|
301
304
|
return (t = this.items.reduce((s, a) => {
|
|
302
|
-
var r, i,
|
|
305
|
+
var r, i, c, o;
|
|
303
306
|
if (a.any)
|
|
304
307
|
s.push(e);
|
|
305
308
|
else if (a.single) {
|
|
@@ -311,7 +314,7 @@ class Z extends y {
|
|
|
311
314
|
s.push(l);
|
|
312
315
|
else {
|
|
313
316
|
const d = l + Math.ceil((e - l) / a.step) * a.step;
|
|
314
|
-
d <= ((
|
|
317
|
+
d <= ((o = (c = a.range) === null || c === void 0 ? void 0 : c.to) !== null && o !== void 0 ? o : g) && s.push(d);
|
|
315
318
|
}
|
|
316
319
|
}
|
|
317
320
|
return s;
|
|
@@ -340,7 +343,7 @@ class m {
|
|
|
340
343
|
}
|
|
341
344
|
}
|
|
342
345
|
const _ = /* @__PURE__ */ new Map();
|
|
343
|
-
class
|
|
346
|
+
class z {
|
|
344
347
|
constructor(e) {
|
|
345
348
|
if (typeof e == "number") {
|
|
346
349
|
if (e > 840 || e < -840)
|
|
@@ -384,11 +387,11 @@ class O {
|
|
|
384
387
|
offset(e) {
|
|
385
388
|
if (!this.dateTimeFormat)
|
|
386
389
|
return this.fixedOffset || 0;
|
|
387
|
-
const t = new Date(e), { year: s, month: a, day: r, hour: i, minute:
|
|
390
|
+
const t = new Date(e), { year: s, month: a, day: r, hour: i, minute: c, second: o } = this.nativeDateToCronosDate(t), l = Date.UTC(s, a - 1, r, i, c, o), d = e - e % 1e3;
|
|
388
391
|
return (l - d) / 6e4;
|
|
389
392
|
}
|
|
390
393
|
nativeDateToCronosDate(e) {
|
|
391
|
-
return this.dateTimeFormat ? this.dateTimeFormat.formatToParts ?
|
|
394
|
+
return this.dateTimeFormat ? this.dateTimeFormat.formatToParts ? Q(this.dateTimeFormat, e) : q(this.dateTimeFormat, e) : m.fromUTCTimestamp(e.getTime() + (this.fixedOffset || 0) * 6e4);
|
|
392
395
|
}
|
|
393
396
|
cronosDateToNativeDate(e) {
|
|
394
397
|
if (!this.dateTimeFormat)
|
|
@@ -403,29 +406,29 @@ class O {
|
|
|
403
406
|
return r === i ? new Date(a) : new Date(s - Math.min(r, i) * 6e4);
|
|
404
407
|
}
|
|
405
408
|
}
|
|
406
|
-
function G(n, e) {
|
|
407
|
-
const t = n.format(e).replace(/\u200E/g, ""), s = t.match(/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/), [, a, r, i, o, c, l] = (s != null ? s : []).map((d) => parseInt(d, 10));
|
|
408
|
-
return new m(i, a, r, o % 24, c, l);
|
|
409
|
-
}
|
|
410
409
|
function q(n, e) {
|
|
410
|
+
const t = n.format(e).replace(/\u200E/g, ""), s = t.match(/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/), [, a, r, i, c, o, l] = (s != null ? s : []).map((d) => parseInt(d, 10));
|
|
411
|
+
return new m(i, a, r, c % 24, o, l);
|
|
412
|
+
}
|
|
413
|
+
function Q(n, e) {
|
|
411
414
|
const t = n.formatToParts(e);
|
|
412
415
|
return new m(parseInt(t[4].value, 10), parseInt(t[0].value, 10), parseInt(t[2].value, 10), parseInt(t[6].value, 10) % 24, parseInt(t[8].value, 10), parseInt(t[10].value, 10));
|
|
413
416
|
}
|
|
414
|
-
const
|
|
417
|
+
const v = 60 * 60 * 1e3, x = (n, e) => e.findIndex((t) => t >= n);
|
|
415
418
|
class $ {
|
|
416
|
-
constructor(e, t, s, a, r, i,
|
|
417
|
-
this.cronString = e, this.seconds = t, this.minutes = s, this.hours = a, this.days = r, this.months = i, this.years =
|
|
419
|
+
constructor(e, t, s, a, r, i, c) {
|
|
420
|
+
this.cronString = e, this.seconds = t, this.minutes = s, this.hours = a, this.days = r, this.months = i, this.years = c, this.skipRepeatedHour = !0, this.missingHour = "insert", this._warnings = null;
|
|
418
421
|
}
|
|
419
422
|
static parse(e, t = {}) {
|
|
420
423
|
var s;
|
|
421
424
|
const a = C(e);
|
|
422
425
|
if (t.strict) {
|
|
423
|
-
let i = b(a, (
|
|
424
|
-
if (typeof t.strict == "object" && (i = i.filter((
|
|
426
|
+
let i = b(a, (c) => c.warnings);
|
|
427
|
+
if (typeof t.strict == "object" && (i = i.filter((c) => !!t.strict[c.type])), i.length > 0)
|
|
425
428
|
throw new Error(`Strict mode: Parsing failed with ${i.length} warnings`);
|
|
426
429
|
}
|
|
427
430
|
const r = new $(e, a[0].values, a[1].values, a[2].values, a[3].values, a[4].values, a[5]);
|
|
428
|
-
return r.timezone = t.timezone instanceof
|
|
431
|
+
return r.timezone = t.timezone instanceof z ? t.timezone : t.timezone !== void 0 ? new z(t.timezone) : void 0, r.skipRepeatedHour = t.skipRepeatedHour !== void 0 ? t.skipRepeatedHour : r.skipRepeatedHour, r.missingHour = (s = t.missingHour) !== null && s !== void 0 ? s : r.missingHour, r;
|
|
429
432
|
}
|
|
430
433
|
get warnings() {
|
|
431
434
|
if (!this._warnings) {
|
|
@@ -448,7 +451,7 @@ class $ {
|
|
|
448
451
|
const s = m.fromDate(e, this.timezone);
|
|
449
452
|
if (((t = this.timezone) === null || t === void 0 ? void 0 : t.fixedOffset) !== void 0)
|
|
450
453
|
return this._next(s).date;
|
|
451
|
-
const a = e.getTime(), r = s.toUTCTimestamp(), i = m.fromDate(new Date(a -
|
|
454
|
+
const a = e.getTime(), r = s.toUTCTimestamp(), i = m.fromDate(new Date(a - v), this.timezone).toUTCTimestamp(), c = m.fromDate(new Date(a + v), this.timezone).toUTCTimestamp(), o = c - r === 0, l = r - i === 0, d = r - i === v * 2;
|
|
452
455
|
if (this.skipRepeatedHour && l)
|
|
453
456
|
return this._next(s.copyWith({ minute: 59, second: 60 }), !1).date;
|
|
454
457
|
if (this.missingHour === "offset" && d) {
|
|
@@ -456,8 +459,8 @@ class $ {
|
|
|
456
459
|
if (!u || u.getTime() > a)
|
|
457
460
|
return u;
|
|
458
461
|
}
|
|
459
|
-
let { date: h, cronosDate:
|
|
460
|
-
return this.missingHour !== "offset" &&
|
|
462
|
+
let { date: h, cronosDate: p } = this._next(s);
|
|
463
|
+
return this.missingHour !== "offset" && p && h && p.copyWith({ hour: p.hour + 1 }).toDate(this.timezone).getTime() === h.getTime() ? this.missingHour === "insert" ? p.copyWith({ minute: 0, second: 0 }).toDate(this.timezone) : this._next(p.copyWith({ minute: 59, second: 59 })).date : (this.skipRepeatedHour || (o && (!h || h.getTime() > a + v) && (h = this._next(s.copyWith({ minute: 0, second: 0 }), !1).date), h && h < e && (h = new Date(h.getTime() + v))), h);
|
|
461
464
|
}
|
|
462
465
|
_next(e, t = !0) {
|
|
463
466
|
const s = this._nextYear(t ? e.copyWith({ second: e.second + 1 }) : e);
|
|
@@ -487,7 +490,7 @@ class $ {
|
|
|
487
490
|
return s;
|
|
488
491
|
}
|
|
489
492
|
_nextMonth(e) {
|
|
490
|
-
let t =
|
|
493
|
+
let t = x(e.month, this.months), s = null;
|
|
491
494
|
for (; !s; ) {
|
|
492
495
|
const a = this.months[t];
|
|
493
496
|
if (a === void 0)
|
|
@@ -498,7 +501,7 @@ class $ {
|
|
|
498
501
|
}
|
|
499
502
|
_nextDay(e) {
|
|
500
503
|
const t = this.days.getDays(e.year, e.month);
|
|
501
|
-
let s =
|
|
504
|
+
let s = x(e.day, t), a = null;
|
|
502
505
|
for (; !a; ) {
|
|
503
506
|
const r = t[s];
|
|
504
507
|
if (r === void 0)
|
|
@@ -508,7 +511,7 @@ class $ {
|
|
|
508
511
|
return a;
|
|
509
512
|
}
|
|
510
513
|
_nextHour(e) {
|
|
511
|
-
let t =
|
|
514
|
+
let t = x(e.hour, this.hours), s = null;
|
|
512
515
|
for (; !s; ) {
|
|
513
516
|
const a = this.hours[t];
|
|
514
517
|
if (a === void 0)
|
|
@@ -518,7 +521,7 @@ class $ {
|
|
|
518
521
|
return s;
|
|
519
522
|
}
|
|
520
523
|
_nextMinute(e) {
|
|
521
|
-
let t =
|
|
524
|
+
let t = x(e.minute, this.minutes), s = null;
|
|
522
525
|
for (; !s; ) {
|
|
523
526
|
const a = this.minutes[t];
|
|
524
527
|
if (a === void 0)
|
|
@@ -528,16 +531,20 @@ class $ {
|
|
|
528
531
|
return s;
|
|
529
532
|
}
|
|
530
533
|
_nextSecond(e) {
|
|
531
|
-
const t =
|
|
534
|
+
const t = x(e.second, this.seconds), s = this.seconds[t];
|
|
532
535
|
return s === void 0 ? null : e.copyWith({ second: s });
|
|
533
536
|
}
|
|
534
537
|
}
|
|
535
|
-
const
|
|
538
|
+
const Z = {
|
|
536
539
|
name: "VueCron",
|
|
537
540
|
props: {
|
|
538
541
|
data: Object,
|
|
539
542
|
expression: String,
|
|
540
|
-
runsParser: Function
|
|
543
|
+
runsParser: Function,
|
|
544
|
+
quartz: {
|
|
545
|
+
type: Boolean,
|
|
546
|
+
default: !0
|
|
547
|
+
}
|
|
541
548
|
},
|
|
542
549
|
data() {
|
|
543
550
|
const n = (/* @__PURE__ */ new Date()).getFullYear();
|
|
@@ -565,7 +572,7 @@ const J = {
|
|
|
565
572
|
expression: ""
|
|
566
573
|
},
|
|
567
574
|
{
|
|
568
|
-
type: "
|
|
575
|
+
type: "week",
|
|
569
576
|
expression: ""
|
|
570
577
|
},
|
|
571
578
|
{
|
|
@@ -604,16 +611,16 @@ const J = {
|
|
|
604
611
|
rangeStart: "",
|
|
605
612
|
rangeEnd: "",
|
|
606
613
|
specificSpecific: [],
|
|
607
|
-
cronLastSpecificDomDay: 1,
|
|
608
614
|
cronDaysBeforeEomMinus: "",
|
|
609
615
|
cronDaysNearestWeekday: ""
|
|
610
616
|
},
|
|
611
617
|
week: {
|
|
612
618
|
cronEvery: "",
|
|
613
|
-
incrementStart: "
|
|
619
|
+
incrementStart: "0",
|
|
614
620
|
incrementIncrement: "1",
|
|
615
621
|
specificSpecific: [],
|
|
616
|
-
|
|
622
|
+
cronLastSpecificDomDay: "0",
|
|
623
|
+
cronNthDayDay: "0",
|
|
617
624
|
cronNthDayNth: "1"
|
|
618
625
|
},
|
|
619
626
|
month: {
|
|
@@ -638,16 +645,46 @@ const J = {
|
|
|
638
645
|
hour: "",
|
|
639
646
|
day: "",
|
|
640
647
|
month: "",
|
|
641
|
-
|
|
648
|
+
week: "",
|
|
642
649
|
year: ""
|
|
643
650
|
},
|
|
644
651
|
runs: [],
|
|
645
|
-
defaultStr: "0"
|
|
652
|
+
defaultStr: "0",
|
|
653
|
+
weekOptions: [
|
|
654
|
+
{
|
|
655
|
+
value: "0",
|
|
656
|
+
label: "星期天"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
value: "1",
|
|
660
|
+
label: "星期一"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
value: "2",
|
|
664
|
+
label: "星期二"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
value: "3",
|
|
668
|
+
label: "星期三"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
value: "4",
|
|
672
|
+
label: "星期四"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
value: "5",
|
|
676
|
+
label: "星期五"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
value: "6",
|
|
680
|
+
label: "星期六"
|
|
681
|
+
}
|
|
682
|
+
]
|
|
646
683
|
};
|
|
647
684
|
},
|
|
648
685
|
computed: {
|
|
649
686
|
text() {
|
|
650
|
-
return
|
|
687
|
+
return Y;
|
|
651
688
|
},
|
|
652
689
|
secondsText() {
|
|
653
690
|
let n = "";
|
|
@@ -710,70 +747,86 @@ const J = {
|
|
|
710
747
|
return n || this.defaultStr;
|
|
711
748
|
},
|
|
712
749
|
daysText() {
|
|
713
|
-
|
|
714
|
-
|
|
750
|
+
const n = this.day.cronEvery;
|
|
751
|
+
if (!n)
|
|
752
|
+
return "?";
|
|
753
|
+
let e = "";
|
|
754
|
+
switch (n.toString()) {
|
|
715
755
|
case "1":
|
|
716
|
-
|
|
717
|
-
break;
|
|
718
|
-
case "2":
|
|
719
|
-
case "4":
|
|
720
|
-
case "11":
|
|
721
|
-
n = "?";
|
|
756
|
+
e = "*";
|
|
722
757
|
break;
|
|
723
758
|
case "3":
|
|
724
|
-
|
|
759
|
+
e = `${this.day.incrementStart}/${this.day.incrementIncrement}`;
|
|
725
760
|
break;
|
|
726
761
|
case "5":
|
|
727
762
|
this.day.specificSpecific.forEach((t) => {
|
|
728
|
-
|
|
729
|
-
}),
|
|
763
|
+
e += `${t},`;
|
|
764
|
+
}), e = e.slice(0, -1);
|
|
730
765
|
break;
|
|
731
766
|
case "6":
|
|
732
|
-
|
|
767
|
+
e = "L";
|
|
733
768
|
break;
|
|
734
769
|
case "7":
|
|
735
|
-
|
|
736
|
-
break;
|
|
737
|
-
case "8":
|
|
738
|
-
n = `${this.day.cronLastSpecificDomDay}L`;
|
|
770
|
+
e = "LW";
|
|
739
771
|
break;
|
|
740
772
|
case "9":
|
|
741
|
-
|
|
773
|
+
e = `L-${this.day.cronDaysBeforeEomMinus}`;
|
|
742
774
|
break;
|
|
743
775
|
case "10":
|
|
744
|
-
|
|
776
|
+
e = `${this.day.cronDaysNearestWeekday}W`;
|
|
745
777
|
break;
|
|
746
778
|
}
|
|
747
|
-
return
|
|
779
|
+
return e;
|
|
748
780
|
},
|
|
749
781
|
weeksText() {
|
|
750
|
-
|
|
751
|
-
|
|
782
|
+
const n = this.week.cronEvery;
|
|
783
|
+
if (!n)
|
|
784
|
+
return "?";
|
|
785
|
+
let e = "";
|
|
786
|
+
switch (n.toString()) {
|
|
752
787
|
case "1":
|
|
753
|
-
|
|
754
|
-
case "5":
|
|
755
|
-
n = "?";
|
|
788
|
+
e = "*";
|
|
756
789
|
break;
|
|
757
790
|
case "2":
|
|
758
|
-
|
|
791
|
+
e = `${this.week.incrementStart}/${this.week.incrementIncrement}`;
|
|
759
792
|
break;
|
|
760
793
|
case "4":
|
|
761
794
|
this.week.specificSpecific.forEach((t) => {
|
|
762
|
-
|
|
763
|
-
}),
|
|
795
|
+
e += `${t},`;
|
|
796
|
+
}), e = e.slice(0, -1);
|
|
764
797
|
break;
|
|
765
|
-
case "6":
|
|
766
|
-
case "7":
|
|
767
798
|
case "8":
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
799
|
+
e = `${this.week.cronLastSpecificDomDay}L`;
|
|
800
|
+
break;
|
|
801
|
+
case "11":
|
|
802
|
+
e = `${this.week.cronNthDayDay}#${this.week.cronNthDayNth}`;
|
|
803
|
+
break;
|
|
804
|
+
}
|
|
805
|
+
return e;
|
|
806
|
+
},
|
|
807
|
+
weeksTextQuartz() {
|
|
808
|
+
const n = this.week.cronEvery;
|
|
809
|
+
if (!n)
|
|
810
|
+
return "?";
|
|
811
|
+
let e = "";
|
|
812
|
+
switch (n.toString()) {
|
|
813
|
+
case "1":
|
|
814
|
+
e = "*";
|
|
815
|
+
break;
|
|
816
|
+
case "2":
|
|
817
|
+
e = `${this.week.incrementStart}/${this.week.incrementIncrement}`;
|
|
818
|
+
break;
|
|
819
|
+
case "4":
|
|
820
|
+
e = this.week.specificSpecific.map((t) => Number(t) + 1).join(",");
|
|
821
|
+
break;
|
|
822
|
+
case "8":
|
|
823
|
+
e = `${Number(this.week.cronLastSpecificDomDay) + 1}L`;
|
|
771
824
|
break;
|
|
772
825
|
case "11":
|
|
773
|
-
|
|
826
|
+
e = `${Number(this.week.cronNthDayDay) + 1}#${this.week.cronNthDayNth}`;
|
|
774
827
|
break;
|
|
775
828
|
}
|
|
776
|
-
return
|
|
829
|
+
return e;
|
|
777
830
|
},
|
|
778
831
|
monthsText() {
|
|
779
832
|
let n = "";
|
|
@@ -816,7 +869,7 @@ const J = {
|
|
|
816
869
|
return n || "*";
|
|
817
870
|
},
|
|
818
871
|
cron() {
|
|
819
|
-
return `${this.secondsText} ${this.minutesText} ${this.hoursText} ${this.daysText} ${this.monthsText} ${this.weeksText} ${this.yearsText}`;
|
|
872
|
+
return `${this.secondsText} ${this.minutesText} ${this.hoursText} ${this.daysText} ${this.monthsText} ${this.quartz ? this.weeksTextQuartz : this.weeksText} ${this.yearsText}`;
|
|
820
873
|
}
|
|
821
874
|
},
|
|
822
875
|
watch: {
|
|
@@ -825,10 +878,11 @@ const J = {
|
|
|
825
878
|
},
|
|
826
879
|
cron: {
|
|
827
880
|
immediate: !0,
|
|
828
|
-
handler(
|
|
881
|
+
handler() {
|
|
829
882
|
return W(this, null, function* () {
|
|
883
|
+
const n = `${this.secondsText} ${this.minutesText} ${this.hoursText} ${this.daysText} ${this.monthsText} ${this.weeksText} ${this.yearsText}`;
|
|
830
884
|
try {
|
|
831
|
-
this.runsParser ? this.runs = yield this.runsParser(n) : this.runs = $.parse(n).nextNDates(/* @__PURE__ */ new Date(), 5).map((e) => H(e));
|
|
885
|
+
this.runsParser ? this.runs = yield this.runsParser(n) : this.runs = $.parse(n, { timezone: 1 }).nextNDates(/* @__PURE__ */ new Date(), 5).map((e) => H(e));
|
|
832
886
|
} catch (e) {
|
|
833
887
|
console.error(e), this.runs = [e.message];
|
|
834
888
|
}
|
|
@@ -893,7 +947,7 @@ const J = {
|
|
|
893
947
|
case "second":
|
|
894
948
|
this.commonParser(this[t.type], t.expression);
|
|
895
949
|
return;
|
|
896
|
-
case "
|
|
950
|
+
case "week":
|
|
897
951
|
this.resolveWeek(t.expression);
|
|
898
952
|
return;
|
|
899
953
|
case "day":
|
|
@@ -907,17 +961,19 @@ const J = {
|
|
|
907
961
|
},
|
|
908
962
|
resolveWeek(n) {
|
|
909
963
|
if (n.indexOf("/") >= 0)
|
|
910
|
-
this.
|
|
964
|
+
this.week.cronEvery = "2", this.resolveSlash(this.week, n);
|
|
911
965
|
else if (n.indexOf(",") >= 0)
|
|
912
|
-
this.
|
|
966
|
+
this.week.cronEvery = "4", this.resolveComma(this.week, n);
|
|
967
|
+
else if (n.indexOf("L") === n.length - 1)
|
|
968
|
+
this.week.cronEvery = "8", this.week.cronLastSpecificDomDay = n.slice(0, -1);
|
|
913
969
|
else if (n.indexOf("#") >= 0) {
|
|
914
|
-
this.
|
|
970
|
+
this.week.cronEvery = "11";
|
|
915
971
|
const e = n.split("#");
|
|
916
|
-
this.
|
|
972
|
+
this.week.cronNthDayDay = e[0], this.week.cronNthDayNth = e[1];
|
|
917
973
|
}
|
|
918
974
|
},
|
|
919
975
|
resolveDay(n) {
|
|
920
|
-
n === "*" ? this.resolveStar(this.day) : n.indexOf("/") >= 0 ? this.resolveSlash(this.day, n, "3") : n === "L" ? this.day.cronEvery = "6" : n === "LW" ? this.day.cronEvery = "7" :
|
|
976
|
+
n === "*" ? this.resolveStar(this.day) : n.indexOf("/") >= 0 ? this.resolveSlash(this.day, n, "3") : n === "L" ? this.day.cronEvery = "6" : n === "LW" ? this.day.cronEvery = "7" : /L-\d+/.test(n) ? (this.day.cronEvery = "9", this.day.cronDaysBeforeEomMinus = Number(n.match(/L-(\d+)/)[1])) : /\d+W/.test(n) ? (this.day.cronEvery = "10", this.day.cronDaysNearestWeekday = Number(n.match(/(\d+)W/))[1]) : n.indexOf(",") >= 0 && this.resolveComma(this.day, n, "5");
|
|
921
977
|
},
|
|
922
978
|
resolveStar(n, e = "1") {
|
|
923
979
|
n.cronEvery = e;
|
|
@@ -934,184 +990,184 @@ const J = {
|
|
|
934
990
|
},
|
|
935
991
|
resolveComma(n, e, t = "3") {
|
|
936
992
|
n.cronEvery = t, n.specificSpecific = e.split(",");
|
|
993
|
+
},
|
|
994
|
+
setDay(n) {
|
|
995
|
+
var e;
|
|
996
|
+
this.week.cronEvery = "", n === "5" ? (e = this.day.specificSpecific) != null && e.length || (this.day.specificSpecific = [1]) : this.day.specificSpecific = [];
|
|
997
|
+
},
|
|
998
|
+
setWeek(n) {
|
|
999
|
+
var e;
|
|
1000
|
+
this.day.cronEvery = "", n === "4" ? (e = this.week.specificSpecific) != null && e.length || (this.week.specificSpecific = ["1"]) : this.week.specificSpecific = [];
|
|
937
1001
|
}
|
|
938
1002
|
}
|
|
939
1003
|
};
|
|
940
|
-
var
|
|
1004
|
+
var J = function() {
|
|
941
1005
|
var e = this, t = e._self._c;
|
|
942
1006
|
return t("div", { staticClass: "vue-cron" }, [t("ElTabs", { attrs: { type: "border-card" } }, [t("ElTabPane", { scopedSlots: e._u([{ key: "label", fn: function() {
|
|
943
1007
|
return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Seconds.name))])];
|
|
944
|
-
}, proxy: !0 }]) }, [t("
|
|
945
|
-
e.$set(e.second, "cronEvery", s);
|
|
946
|
-
}, expression: "second.cronEvery" } }, [e._v(e._s(e.text.Seconds.every))])], 1), t("ElRow", [t("ElRadio", { attrs: { label: "4" }, model: { value: e.second.cronEvery, callback: function(s) {
|
|
1008
|
+
}, proxy: !0 }]) }, [t("ElRadioGroup", { staticClass: "tabBody", model: { value: e.second.cronEvery, callback: function(s) {
|
|
947
1009
|
e.$set(e.second, "cronEvery", s);
|
|
948
|
-
}, expression: "second.cronEvery" } }, [e._v(" " + e._s(e.text.Seconds.cycle[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 60 }, model: { value: e.second.rangeStart, callback: function(s) {
|
|
1010
|
+
}, expression: "second.cronEvery" } }, [t("ElRadio", { attrs: { label: "1" } }, [e._v(e._s(e.text.Seconds.every))]), t("ElRadio", { attrs: { label: "4" } }, [e._v(" " + e._s(e.text.Seconds.cycle[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 60 }, model: { value: e.second.rangeStart, callback: function(s) {
|
|
949
1011
|
e.$set(e.second, "rangeStart", s);
|
|
950
1012
|
}, expression: "second.rangeStart" } }), e._v(" " + e._s(e.text.Seconds.cycle[1] || "") + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 59 }, model: { value: e.second.rangeEnd, callback: function(s) {
|
|
951
1013
|
e.$set(e.second, "rangeEnd", s);
|
|
952
|
-
}, expression: "second.rangeEnd" } }), e._v(" " + e._s(e.text.Seconds.cycle[2] || "") + " ")], 1)
|
|
953
|
-
e.$set(e.second, "cronEvery", s);
|
|
954
|
-
}, expression: "second.cronEvery" } }, [e._v(" " + e._s(e.text.Seconds.interval[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 59 }, model: { value: e.second.incrementStart, callback: function(s) {
|
|
1014
|
+
}, expression: "second.rangeEnd" } }), e._v(" " + e._s(e.text.Seconds.cycle[2] || "") + " ")], 1), t("ElRadio", { attrs: { label: "2" } }, [e._v(" " + e._s(e.text.Seconds.interval[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 59 }, model: { value: e.second.incrementStart, callback: function(s) {
|
|
955
1015
|
e.$set(e.second, "incrementStart", s);
|
|
956
1016
|
}, expression: "second.incrementStart" } }), e._v(" " + e._s(e.text.Seconds.interval[1] || "") + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 60 }, model: { value: e.second.incrementIncrement, callback: function(s) {
|
|
957
1017
|
e.$set(e.second, "incrementIncrement", s);
|
|
958
|
-
}, expression: "second.incrementIncrement" } }), e._v(" " + e._s(e.text.Seconds.interval[2] || "") + " ")], 1)
|
|
959
|
-
e.$set(e.second, "cronEvery", s);
|
|
960
|
-
}, expression: "second.cronEvery" } }, [e._v(" " + e._s(e.text.Seconds.specific) + " "), t("ElSelect", { attrs: { size: "small", multiple: "" }, model: { value: e.second.specificSpecific, callback: function(s) {
|
|
1018
|
+
}, expression: "second.incrementIncrement" } }), e._v(" " + e._s(e.text.Seconds.interval[2] || "") + " ")], 1), t("ElRadio", { staticClass: "long", attrs: { label: "3" } }, [e._v(" " + e._s(e.text.Seconds.specific) + " "), t("ElSelect", { attrs: { size: "small", multiple: "" }, model: { value: e.second.specificSpecific, callback: function(s) {
|
|
961
1019
|
e.$set(e.second, "specificSpecific", s);
|
|
962
1020
|
}, expression: "second.specificSpecific" } }, e._l(60, function(s) {
|
|
963
1021
|
return t("ElOption", { key: s, attrs: { value: s - 1 } }, [e._v(e._s(s - 1))]);
|
|
964
|
-
}), 1)], 1)], 1)], 1)
|
|
1022
|
+
}), 1)], 1)], 1)], 1), t("ElTabPane", { scopedSlots: e._u([{ key: "label", fn: function() {
|
|
965
1023
|
return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Minutes.name))])];
|
|
966
|
-
}, proxy: !0 }]) }, [t("
|
|
1024
|
+
}, proxy: !0 }]) }, [t("ElRadioGroup", { staticClass: "tabBody", model: { value: e.minute.cronEvery, callback: function(s) {
|
|
967
1025
|
e.$set(e.minute, "cronEvery", s);
|
|
968
|
-
}, expression: "minute.cronEvery" } }, [e._v(e._s(e.text.Minutes.every))])
|
|
969
|
-
e.$set(e.minute, "cronEvery", s);
|
|
970
|
-
}, expression: "minute.cronEvery" } }, [e._v(" " + e._s(e.text.Minutes.cycle[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 60 }, model: { value: e.minute.rangeStart, callback: function(s) {
|
|
1026
|
+
}, expression: "minute.cronEvery" } }, [t("ElRadio", { attrs: { label: "1" } }, [e._v(e._s(e.text.Minutes.every))]), t("ElRadio", { attrs: { label: "4" } }, [e._v(" " + e._s(e.text.Minutes.cycle[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 60 }, model: { value: e.minute.rangeStart, callback: function(s) {
|
|
971
1027
|
e.$set(e.minute, "rangeStart", s);
|
|
972
1028
|
}, expression: "minute.rangeStart" } }), e._v(" " + e._s(e.text.Minutes.cycle[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 59 }, model: { value: e.minute.rangeEnd, callback: function(s) {
|
|
973
1029
|
e.$set(e.minute, "rangeEnd", s);
|
|
974
|
-
}, expression: "minute.rangeEnd" } }), e._v(" " + e._s(e.text.Minutes.cycle[2]) + " ")], 1)
|
|
975
|
-
e.$set(e.minute, "cronEvery", s);
|
|
976
|
-
}, expression: "minute.cronEvery" } }, [e._v(" " + e._s(e.text.Minutes.interval[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 59 }, model: { value: e.minute.incrementStart, callback: function(s) {
|
|
1030
|
+
}, expression: "minute.rangeEnd" } }), e._v(" " + e._s(e.text.Minutes.cycle[2]) + " ")], 1), t("ElRadio", { attrs: { label: "2" } }, [e._v(" " + e._s(e.text.Minutes.interval[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 59 }, model: { value: e.minute.incrementStart, callback: function(s) {
|
|
977
1031
|
e.$set(e.minute, "incrementStart", s);
|
|
978
1032
|
}, expression: "minute.incrementStart" } }), e._v(" " + e._s(e.text.Minutes.interval[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 60 }, model: { value: e.minute.incrementIncrement, callback: function(s) {
|
|
979
1033
|
e.$set(e.minute, "incrementIncrement", s);
|
|
980
|
-
}, expression: "minute.incrementIncrement" } }), e._v(" " + e._s(e.text.Minutes.interval[2] || "") + " ")], 1)
|
|
981
|
-
e.$set(e.minute, "cronEvery", s);
|
|
982
|
-
}, expression: "minute.cronEvery" } }, [e._v(" " + e._s(e.text.Minutes.specific) + " "), t("ElSelect", { attrs: { size: "small", multiple: "" }, model: { value: e.minute.specificSpecific, callback: function(s) {
|
|
1034
|
+
}, expression: "minute.incrementIncrement" } }), e._v(" " + e._s(e.text.Minutes.interval[2] || "") + " ")], 1), t("ElRadio", { staticClass: "long", attrs: { label: "3" } }, [e._v(" " + e._s(e.text.Minutes.specific) + " "), t("ElSelect", { attrs: { size: "small", multiple: "" }, model: { value: e.minute.specificSpecific, callback: function(s) {
|
|
983
1035
|
e.$set(e.minute, "specificSpecific", s);
|
|
984
1036
|
}, expression: "minute.specificSpecific" } }, e._l(60, function(s) {
|
|
985
1037
|
return t("ElOption", { key: s, attrs: { value: s - 1 } }, [e._v(e._s(s - 1))]);
|
|
986
|
-
}), 1)], 1)], 1)], 1)
|
|
1038
|
+
}), 1)], 1)], 1)], 1), t("ElTabPane", { scopedSlots: e._u([{ key: "label", fn: function() {
|
|
987
1039
|
return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Hours.name))])];
|
|
988
|
-
}, proxy: !0 }]) }, [t("
|
|
1040
|
+
}, proxy: !0 }]) }, [t("ElRadioGroup", { staticClass: "tabBody", model: { value: e.hour.cronEvery, callback: function(s) {
|
|
989
1041
|
e.$set(e.hour, "cronEvery", s);
|
|
990
|
-
}, expression: "hour.cronEvery" } }, [
|
|
1042
|
+
}, expression: "hour.cronEvery" } }, [t("ElRadio", { attrs: { label: "1" }, model: { value: e.hour.cronEvery, callback: function(s) {
|
|
1043
|
+
e.$set(e.hour, "cronEvery", s);
|
|
1044
|
+
}, expression: "hour.cronEvery" } }, [e._v(e._s(e.text.Hours.every))]), t("ElRadio", { attrs: { label: "4" }, model: { value: e.hour.cronEvery, callback: function(s) {
|
|
991
1045
|
e.$set(e.hour, "cronEvery", s);
|
|
992
1046
|
}, expression: "hour.cronEvery" } }, [e._v(" " + e._s(e.text.Hours.cycle[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 23 }, model: { value: e.hour.rangeStart, callback: function(s) {
|
|
993
1047
|
e.$set(e.hour, "rangeStart", s);
|
|
994
1048
|
}, expression: "hour.rangeStart" } }), e._v(" " + e._s(e.text.Hours.cycle[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 23 }, model: { value: e.hour.rangeEnd, callback: function(s) {
|
|
995
1049
|
e.$set(e.hour, "rangeEnd", s);
|
|
996
|
-
}, expression: "hour.rangeEnd" } }), e._v(" " + e._s(e.text.Hours.cycle[2]) + " ")], 1)
|
|
1050
|
+
}, expression: "hour.rangeEnd" } }), e._v(" " + e._s(e.text.Hours.cycle[2]) + " ")], 1), t("ElRadio", { attrs: { label: "2" }, model: { value: e.hour.cronEvery, callback: function(s) {
|
|
997
1051
|
e.$set(e.hour, "cronEvery", s);
|
|
998
1052
|
}, expression: "hour.cronEvery" } }, [e._v(" " + e._s(e.text.Hours.interval[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 23 }, model: { value: e.hour.incrementStart, callback: function(s) {
|
|
999
1053
|
e.$set(e.hour, "incrementStart", s);
|
|
1000
1054
|
}, expression: "hour.incrementStart" } }), e._v(" " + e._s(e.text.Hours.interval[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 23 }, model: { value: e.hour.incrementIncrement, callback: function(s) {
|
|
1001
1055
|
e.$set(e.hour, "incrementIncrement", s);
|
|
1002
|
-
}, expression: "hour.incrementIncrement" } }), e._v(" " + e._s(e.text.Hours.interval[2]) + " ")], 1)
|
|
1056
|
+
}, expression: "hour.incrementIncrement" } }), e._v(" " + e._s(e.text.Hours.interval[2]) + " ")], 1), t("ElRadio", { staticClass: "long", attrs: { label: "3" }, model: { value: e.hour.cronEvery, callback: function(s) {
|
|
1003
1057
|
e.$set(e.hour, "cronEvery", s);
|
|
1004
1058
|
}, expression: "hour.cronEvery" } }, [e._v(" " + e._s(e.text.Hours.specific) + " "), t("ElSelect", { attrs: { size: "small", multiple: "" }, model: { value: e.hour.specificSpecific, callback: function(s) {
|
|
1005
1059
|
e.$set(e.hour, "specificSpecific", s);
|
|
1006
1060
|
}, expression: "hour.specificSpecific" } }, e._l(24, function(s) {
|
|
1007
1061
|
return t("ElOption", { key: s, attrs: { value: s - 1 } }, [e._v(e._s(s - 1))]);
|
|
1008
|
-
}), 1)], 1)], 1)], 1)
|
|
1062
|
+
}), 1)], 1)], 1)], 1), t("ElTabPane", { scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1009
1063
|
return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Day.name))])];
|
|
1010
|
-
}, proxy: !0 }]) }, [t("
|
|
1064
|
+
}, proxy: !0 }]) }, [t("ElRadioGroup", { staticClass: "tabBody", on: { input: e.setDay }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1011
1065
|
e.$set(e.day, "cronEvery", s);
|
|
1012
|
-
}, expression: "day.cronEvery" } }, [
|
|
1066
|
+
}, expression: "day.cronEvery" } }, [t("ElRadio", { attrs: { label: "1" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1013
1067
|
e.$set(e.day, "cronEvery", s);
|
|
1014
|
-
}, expression: "day.cronEvery" } }, [e._v(
|
|
1015
|
-
e.$set(e.week, "incrementStart", s);
|
|
1016
|
-
}, expression: "week.incrementStart" } }, e._l(7, function(s) {
|
|
1017
|
-
return t("ElOption", { key: s, attrs: { label: e.text.Week[s - 1], value: s } });
|
|
1018
|
-
}), 1), e._v(" " + e._s(e.text.Day.intervalWeek[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 7 }, model: { value: e.week.incrementIncrement, callback: function(s) {
|
|
1019
|
-
e.$set(e.week, "incrementIncrement", s);
|
|
1020
|
-
}, expression: "week.incrementIncrement" } }), e._v(" " + e._s(e.text.Day.intervalWeek[2]) + " ")], 1)], 1), t("ElRow", [t("ElRadio", { attrs: { label: "3" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1068
|
+
}, expression: "day.cronEvery" } }, [e._v(e._s(e.text.Day.every))]), t("ElRadio", { attrs: { label: "3" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1021
1069
|
e.$set(e.day, "cronEvery", s);
|
|
1022
1070
|
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.intervalDay[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 31 }, model: { value: e.day.incrementStart, callback: function(s) {
|
|
1023
1071
|
e.$set(e.day, "incrementStart", s);
|
|
1024
1072
|
}, expression: "day.incrementStart" } }), e._v(" " + e._s(e.text.Day.intervalDay[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 31 }, model: { value: e.day.incrementIncrement, callback: function(s) {
|
|
1025
1073
|
e.$set(e.day, "incrementIncrement", s);
|
|
1026
|
-
}, expression: "day.incrementIncrement" } }), e._v(" " + e._s(e.text.Day.intervalDay[2]) + " ")], 1)
|
|
1027
|
-
e.$set(e.day, "cronEvery", s);
|
|
1028
|
-
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.specificWeek) + " "), t("ElSelect", { attrs: { size: "small", multiple: "" }, model: { value: e.week.specificSpecific, callback: function(s) {
|
|
1029
|
-
e.$set(e.week, "specificSpecific", s);
|
|
1030
|
-
}, expression: "week.specificSpecific" } }, e._l(7, function(s) {
|
|
1031
|
-
return t("ElOption", { key: s, attrs: { label: e.text.Week[s - 1], value: ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"][s - 1] } });
|
|
1032
|
-
}), 1)], 1)], 1), t("ElRow", [t("ElRadio", { staticClass: "long", attrs: { label: "5" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1074
|
+
}, expression: "day.incrementIncrement" } }), e._v(" " + e._s(e.text.Day.intervalDay[2]) + " ")], 1), t("ElRadio", { staticClass: "long", attrs: { label: "5" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1033
1075
|
e.$set(e.day, "cronEvery", s);
|
|
1034
1076
|
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.specificDay) + " "), t("ElSelect", { attrs: { size: "small", multiple: "" }, model: { value: e.day.specificSpecific, callback: function(s) {
|
|
1035
1077
|
e.$set(e.day, "specificSpecific", s);
|
|
1036
1078
|
}, expression: "day.specificSpecific" } }, e._l(31, function(s) {
|
|
1037
1079
|
return t("ElOption", { key: s, attrs: { value: s } }, [e._v(e._s(s))]);
|
|
1038
|
-
}), 1)], 1)
|
|
1080
|
+
}), 1)], 1), t("ElRadio", { attrs: { label: "6" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1039
1081
|
e.$set(e.day, "cronEvery", s);
|
|
1040
|
-
}, expression: "day.cronEvery" } }, [e._v(e._s(e.text.Day.lastDay)
|
|
1082
|
+
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.lastDay) + " ")]), t("ElRadio", { attrs: { label: "7" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1041
1083
|
e.$set(e.day, "cronEvery", s);
|
|
1042
|
-
}, expression: "day.cronEvery" } }, [e._v(e._s(e.text.Day.
|
|
1084
|
+
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.lastWorkday) + " ")]), t("ElRadio", { attrs: { label: "9" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1043
1085
|
e.$set(e.day, "cronEvery", s);
|
|
1044
|
-
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.
|
|
1045
|
-
e.$set(e.day, "cronLastSpecificDomDay", s);
|
|
1046
|
-
}, expression: "day.cronLastSpecificDomDay" } }, e._l(7, function(s) {
|
|
1047
|
-
return t("ElOption", { key: s, attrs: { label: e.text.Week[s - 1], value: s } });
|
|
1048
|
-
}), 1), e._v(" " + e._s(e.text.Day.lastWeek[1] || "") + " ")], 1)], 1), t("ElRow", [t("ElRadio", { attrs: { label: "9" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1049
|
-
e.$set(e.day, "cronEvery", s);
|
|
1050
|
-
}, expression: "day.cronEvery" } }, [t("ElInputNumber", { attrs: { size: "small", min: 1, max: 31 }, model: { value: e.day.cronDaysBeforeEomMinus, callback: function(s) {
|
|
1086
|
+
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.beforeEndMonth[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 31 }, model: { value: e.day.cronDaysBeforeEomMinus, callback: function(s) {
|
|
1051
1087
|
e.$set(e.day, "cronDaysBeforeEomMinus", s);
|
|
1052
|
-
}, expression: "day.cronDaysBeforeEomMinus" } }), e._v(" " + e._s(e.text.Day.beforeEndMonth[
|
|
1088
|
+
}, expression: "day.cronDaysBeforeEomMinus" } }), e._v(" " + e._s(e.text.Day.beforeEndMonth[1]) + " ")], 1), t("ElRadio", { attrs: { label: "10" }, model: { value: e.day.cronEvery, callback: function(s) {
|
|
1053
1089
|
e.$set(e.day, "cronEvery", s);
|
|
1054
|
-
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.
|
|
1090
|
+
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.nearestWorkday[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 31 }, model: { value: e.day.cronDaysNearestWeekday, callback: function(s) {
|
|
1055
1091
|
e.$set(e.day, "cronDaysNearestWeekday", s);
|
|
1056
|
-
}, expression: "day.cronDaysNearestWeekday" } }), e._v(" " + e._s(e.text.Day.
|
|
1057
|
-
e.$set(e.day, "cronEvery", s);
|
|
1058
|
-
}, expression: "day.cronEvery" } }, [e._v(" " + e._s(e.text.Day.someWeekday[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 5 }, model: { value: e.week.cronNthDayNth, callback: function(s) {
|
|
1059
|
-
e.$set(e.week, "cronNthDayNth", s);
|
|
1060
|
-
}, expression: "week.cronNthDayNth" } }), e._v(" " + e._s(e.text.Day.someWeekday[1]) + " "), t("ElSelect", { attrs: { size: "small" }, model: { value: e.week.cronNthDayDay, callback: function(s) {
|
|
1061
|
-
e.$set(e.week, "cronNthDayDay", s);
|
|
1062
|
-
}, expression: "week.cronNthDayDay" } }, e._l(7, function(s) {
|
|
1063
|
-
return t("ElOption", { key: s, attrs: { label: e.text.Week[s - 1], value: s } });
|
|
1064
|
-
}), 1)], 1)], 1)], 1)]), t("ElTabPane", { scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1092
|
+
}, expression: "day.cronDaysNearestWeekday" } }), e._v(" " + e._s(e.text.Day.nearestWorkday[1]) + " ")], 1)], 1)], 1), t("ElTabPane", { scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1065
1093
|
return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Month.name))])];
|
|
1066
|
-
}, proxy: !0 }]) }, [t("
|
|
1094
|
+
}, proxy: !0 }]) }, [t("ElRadioGroup", { staticClass: "tabBody", model: { value: e.month.cronEvery, callback: function(s) {
|
|
1095
|
+
e.$set(e.month, "cronEvery", s);
|
|
1096
|
+
}, expression: "month.cronEvery" } }, [t("ElRadio", { attrs: { label: "1" }, model: { value: e.month.cronEvery, callback: function(s) {
|
|
1067
1097
|
e.$set(e.month, "cronEvery", s);
|
|
1068
|
-
}, expression: "month.cronEvery" } }, [e._v(e._s(e.text.Month.every))])
|
|
1098
|
+
}, expression: "month.cronEvery" } }, [e._v(e._s(e.text.Month.every))]), t("ElRadio", { attrs: { label: "4" }, model: { value: e.month.cronEvery, callback: function(s) {
|
|
1069
1099
|
e.$set(e.month, "cronEvery", s);
|
|
1070
1100
|
}, expression: "month.cronEvery" } }, [e._v(" " + e._s(e.text.Month.cycle[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 12 }, model: { value: e.month.rangeStart, callback: function(s) {
|
|
1071
1101
|
e.$set(e.month, "rangeStart", s);
|
|
1072
1102
|
}, expression: "month.rangeStart" } }), e._v(" " + e._s(e.text.Month.cycle[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 12 }, model: { value: e.month.rangeEnd, callback: function(s) {
|
|
1073
1103
|
e.$set(e.month, "rangeEnd", s);
|
|
1074
|
-
}, expression: "month.rangeEnd" } }), e._v(" " + e._s(e.text.Month.cycle[2]) + " ")], 1)
|
|
1104
|
+
}, expression: "month.rangeEnd" } }), e._v(" " + e._s(e.text.Month.cycle[2]) + " ")], 1), t("ElRadio", { attrs: { label: "2" }, model: { value: e.month.cronEvery, callback: function(s) {
|
|
1075
1105
|
e.$set(e.month, "cronEvery", s);
|
|
1076
1106
|
}, expression: "month.cronEvery" } }, [e._v(" " + e._s(e.text.Month.interval[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 0, max: 12 }, model: { value: e.month.incrementStart, callback: function(s) {
|
|
1077
1107
|
e.$set(e.month, "incrementStart", s);
|
|
1078
1108
|
}, expression: "month.incrementStart" } }), e._v(" " + e._s(e.text.Month.interval[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 12 }, model: { value: e.month.incrementIncrement, callback: function(s) {
|
|
1079
1109
|
e.$set(e.month, "incrementIncrement", s);
|
|
1080
|
-
}, expression: "month.incrementIncrement" } }), e._v(" " + e._s(e.text.Month.interval[2]) + " ")], 1)
|
|
1110
|
+
}, expression: "month.incrementIncrement" } }), e._v(" " + e._s(e.text.Month.interval[2]) + " ")], 1), t("ElRadio", { staticClass: "long", attrs: { label: "3" }, model: { value: e.month.cronEvery, callback: function(s) {
|
|
1081
1111
|
e.$set(e.month, "cronEvery", s);
|
|
1082
1112
|
}, expression: "month.cronEvery" } }, [e._v(" " + e._s(e.text.Month.specific) + " "), t("ElSelect", { attrs: { size: "small", multiple: "" }, model: { value: e.month.specificSpecific, callback: function(s) {
|
|
1083
1113
|
e.$set(e.month, "specificSpecific", s);
|
|
1084
1114
|
}, expression: "month.specificSpecific" } }, e._l(12, function(s) {
|
|
1085
1115
|
return t("ElOption", { key: s, attrs: { label: s, value: s } });
|
|
1086
|
-
}), 1)], 1)], 1)], 1)
|
|
1116
|
+
}), 1)], 1)], 1)], 1), t("ElTabPane", { scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1117
|
+
return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Week.name))])];
|
|
1118
|
+
}, proxy: !0 }]) }, [t("ElRadioGroup", { staticClass: "tabBody", on: { input: e.setWeek }, model: { value: e.week.cronEvery, callback: function(s) {
|
|
1119
|
+
e.$set(e.week, "cronEvery", s);
|
|
1120
|
+
}, expression: "week.cronEvery" } }, [t("ElRadio", { attrs: { label: "1" } }, [e._v(e._s(e.text.Week.every))]), t("ElRadio", { attrs: { label: "2" } }, [e._v(" " + e._s(e.text.Week.intervalWeek[0]) + " "), t("ElSelect", { attrs: { size: "small" }, model: { value: e.week.incrementStart, callback: function(s) {
|
|
1121
|
+
e.$set(e.week, "incrementStart", s);
|
|
1122
|
+
}, expression: "week.incrementStart" } }, e._l(e.weekOptions, function(s) {
|
|
1123
|
+
return t("ElOption", { key: s.value, attrs: { label: s.label, value: s.value } });
|
|
1124
|
+
}), 1), e._v(" " + e._s(e.text.Week.intervalWeek[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 7 }, model: { value: e.week.incrementIncrement, callback: function(s) {
|
|
1125
|
+
e.$set(e.week, "incrementIncrement", s);
|
|
1126
|
+
}, expression: "week.incrementIncrement" } }), e._v(" " + e._s(e.text.Week.intervalWeek[2]) + " ")], 1), t("ElRadio", { staticClass: "long", attrs: { label: "4" } }, [e._v(" " + e._s(e.text.Week.specificWeek) + " "), t("ElSelect", { attrs: { size: "small", multiple: "" }, model: { value: e.week.specificSpecific, callback: function(s) {
|
|
1127
|
+
e.$set(e.week, "specificSpecific", s);
|
|
1128
|
+
}, expression: "week.specificSpecific" } }, e._l(e.weekOptions, function(s) {
|
|
1129
|
+
return t("ElOption", { key: s.value, attrs: { label: s.label, value: s.value } });
|
|
1130
|
+
}), 1)], 1), t("ElRadio", { attrs: { label: "8" } }, [e._v(" " + e._s(e.text.Week.lastWeek[0]) + " "), t("ElSelect", { attrs: { size: "small" }, model: { value: e.week.cronLastSpecificDomDay, callback: function(s) {
|
|
1131
|
+
e.$set(e.week, "cronLastSpecificDomDay", s);
|
|
1132
|
+
}, expression: "week.cronLastSpecificDomDay" } }, e._l(e.weekOptions, function(s) {
|
|
1133
|
+
return t("ElOption", { key: s.value, attrs: { value: s.value, label: s.label } });
|
|
1134
|
+
}), 1)], 1), t("ElRadio", { attrs: { label: "11" } }, [e._v(" " + e._s(e.text.Week.someWeekday[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 5 }, model: { value: e.week.cronNthDayNth, callback: function(s) {
|
|
1135
|
+
e.$set(e.week, "cronNthDayNth", s);
|
|
1136
|
+
}, expression: "week.cronNthDayNth" } }), e._v(" " + e._s(e.text.Week.someWeekday[1]) + " "), t("ElSelect", { attrs: { size: "small" }, model: { value: e.week.cronNthDayDay, callback: function(s) {
|
|
1137
|
+
e.$set(e.week, "cronNthDayDay", s);
|
|
1138
|
+
}, expression: "week.cronNthDayDay" } }, e._l(e.weekOptions, function(s) {
|
|
1139
|
+
return t("ElOption", { key: s.value, attrs: { label: s.label, value: s.value } });
|
|
1140
|
+
}), 1)], 1)], 1)], 1), t("ElTabPane", { scopedSlots: e._u([{ key: "label", fn: function() {
|
|
1087
1141
|
return [t("span", [t("i", { staticClass: "el-icon-date" }), e._v(" " + e._s(e.text.Year.name))])];
|
|
1088
|
-
}, proxy: !0 }]) }, [t("
|
|
1142
|
+
}, proxy: !0 }]) }, [t("ElRadioGroup", { staticClass: "tabBody", model: { value: e.year.cronEvery, callback: function(s) {
|
|
1143
|
+
e.$set(e.year, "cronEvery", s);
|
|
1144
|
+
}, expression: "year.cronEvery" } }, [t("ElRadio", { attrs: { label: "1" }, model: { value: e.year.cronEvery, callback: function(s) {
|
|
1089
1145
|
e.$set(e.year, "cronEvery", s);
|
|
1090
|
-
}, expression: "year.cronEvery" } }, [e._v(e._s(e.text.Year.every))])
|
|
1146
|
+
}, expression: "year.cronEvery" } }, [e._v(e._s(e.text.Year.every))]), t("ElRadio", { attrs: { label: "4" }, model: { value: e.year.cronEvery, callback: function(s) {
|
|
1091
1147
|
e.$set(e.year, "cronEvery", s);
|
|
1092
1148
|
}, expression: "year.cronEvery" } }, [e._v(" " + e._s(e.text.Year.cycle[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: e.currentYear, max: 2118 }, model: { value: e.year.rangeStart, callback: function(s) {
|
|
1093
1149
|
e.$set(e.year, "rangeStart", s);
|
|
1094
1150
|
}, expression: "year.rangeStart" } }), e._v(" " + e._s(e.text.Year.cycle[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: e.currentYear, max: 2118 }, model: { value: e.year.rangeEnd, callback: function(s) {
|
|
1095
1151
|
e.$set(e.year, "rangeEnd", s);
|
|
1096
|
-
}, expression: "year.rangeEnd" } }), e._v(" " + e._s(e.text.Year.cycle[2]) + " ")], 1)
|
|
1152
|
+
}, expression: "year.rangeEnd" } }), e._v(" " + e._s(e.text.Year.cycle[2]) + " ")], 1), t("ElRadio", { attrs: { label: "2" }, model: { value: e.year.cronEvery, callback: function(s) {
|
|
1097
1153
|
e.$set(e.year, "cronEvery", s);
|
|
1098
1154
|
}, expression: "year.cronEvery" } }, [e._v(" " + e._s(e.text.Year.interval[0]) + " "), t("ElInputNumber", { attrs: { size: "small", min: e.currentYear, max: 2118 }, model: { value: e.year.incrementStart, callback: function(s) {
|
|
1099
1155
|
e.$set(e.year, "incrementStart", s);
|
|
1100
1156
|
}, expression: "year.incrementStart" } }), e._v(" " + e._s(e.text.Year.interval[1]) + " "), t("ElInputNumber", { attrs: { size: "small", min: 1, max: 99 }, model: { value: e.year.incrementIncrement, callback: function(s) {
|
|
1101
1157
|
e.$set(e.year, "incrementIncrement", s);
|
|
1102
|
-
}, expression: "year.incrementIncrement" } }), e._v(" " + e._s(e.text.Year.interval[2]) + " ")], 1)
|
|
1158
|
+
}, expression: "year.incrementIncrement" } }), e._v(" " + e._s(e.text.Year.interval[2]) + " ")], 1), t("ElRadio", { staticClass: "long", attrs: { label: "3" }, model: { value: e.year.cronEvery, callback: function(s) {
|
|
1103
1159
|
e.$set(e.year, "cronEvery", s);
|
|
1104
1160
|
}, expression: "year.cronEvery" } }, [e._v(" " + e._s(e.text.Year.specific) + " "), t("ElSelect", { attrs: { size: "small", filterable: "", multiple: "" }, model: { value: e.year.specificSpecific, callback: function(s) {
|
|
1105
1161
|
e.$set(e.year, "specificSpecific", s);
|
|
1106
1162
|
}, expression: "year.specificSpecific" } }, e._l(100, function(s) {
|
|
1107
|
-
return t("ElOption", { key: s, attrs: { label: 2017 + s
|
|
1108
|
-
}), 1)], 1)], 1)], 1)]
|
|
1109
|
-
return t("ul", { key: s, staticStyle: { "padding-left": "18px" } }, [t("li", { staticStyle: { "margin-bottom": "4px"
|
|
1163
|
+
return t("ElOption", { key: s, attrs: { label: `${2017 + s}`, value: 2017 + s } });
|
|
1164
|
+
}), 1)], 1)], 1)], 1)], 1), t("div", { staticStyle: { padding: "0 0 10px" } }, [t("div", { staticClass: "cron-expression", staticStyle: { "padding-top": "20px" } }, [t("p", { staticClass: "title" }, [e._v("Cron 表达式")]), t("div", { staticClass: "flex-row" }, [t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("秒")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.secondsText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v(" 分钟")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.minutesText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("小时")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.hoursText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("天")]), t("span", { staticClass: "field-value highlight" }, [e._v(e._s(e.daysText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("月")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.monthsText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("周")]), t("span", { staticClass: "field-value highlight" }, [e._v(e._s(e.quartz ? e.weeksTextQuartz : e.weeksText))])]), t("div", { staticClass: "flex-column field" }, [t("span", { staticClass: "field-name" }, [e._v("年")]), t("span", { staticClass: "field-value" }, [e._v(e._s(e.yearsText))])]), t("div", { staticClass: "flex-column flex-item", staticStyle: { padding: "0 10px" } }, [t("span", { staticClass: "field-name" }, [e._v("cron 完整表达式")]), t("span", { staticClass: "field-value", staticStyle: { width: "auto", cursor: "copy" }, on: { click: e.copyCron } }, [e._v(e._s(e.cron))])])])]), t("div", { staticClass: "cron-expression", staticStyle: { "margin-top": "10px" } }, [t("div", { staticStyle: { "margin-bottom": "10px" } }, [e._v("最近 5 次运行时间")]), e._l(e.runs, function(s) {
|
|
1165
|
+
return t("ul", { key: s, staticStyle: { "padding-left": "18px" } }, [t("li", { staticStyle: { "margin-bottom": "4px" } }, [e._v(e._s(s))])]);
|
|
1110
1166
|
})], 2)]), t("div", { staticClass: "bottom" }, [t("ElButton", { attrs: { type: "primary" }, on: { click: e.change } }, [e._v(e._s(e.text.Save))]), t("ElButton", { attrs: { type: "primary" }, on: { click: e.close } }, [e._v(e._s(e.text.Close))])], 1)], 1);
|
|
1111
|
-
},
|
|
1167
|
+
}, K = [], X = /* @__PURE__ */ F(
|
|
1168
|
+
Z,
|
|
1112
1169
|
J,
|
|
1113
1170
|
K,
|
|
1114
|
-
Q,
|
|
1115
1171
|
!1,
|
|
1116
1172
|
null,
|
|
1117
1173
|
null
|
package/vue-cron/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vue-cron{min-width:600px}.vue-cron .language{z-index:1;position:absolute;right:25px}.vue-cron .el-tabs{box-shadow:none}.vue-cron .el-tabs .el-tabs__content{padding:0 14px}.vue-cron .tabBody
|
|
1
|
+
.vue-cron{min-width:600px}.vue-cron .language{z-index:1;position:absolute;right:25px}.vue-cron .el-tabs{box-shadow:none}.vue-cron .el-tabs .el-tabs__content{padding:0 14px}.vue-cron .tabBody{display:block}.vue-cron .tabBody .long .el-select{width:350px}.vue-cron .tabBody .el-input-number{width:110px}.vue-cron .tabBody .el-radio{margin-top:10px;display:block}.vue-cron .tabBody .el-radio:last-child{margin-bottom:10px}.vue-cron .bottom{text-align:center;width:100%;margin-top:5px;position:relative}.vue-cron .cron-expression{border:1px solid #ccc;border-radius:4px;margin-top:20px;padding:14px;position:relative}.vue-cron .cron-expression .title{background:#fff;padding:10px 40px;position:absolute;top:-50%;left:50%;transform:translate(-50%,60%)}.vue-cron .cron-expression .field-name{text-align:center;margin-bottom:6px}.vue-cron .cron-expression .field-value{text-align:center;border:1px solid #ccc;border-radius:4px;min-width:20px;padding:6px}.vue-cron .cron-expression .field-value.highlight{color:#ff8100;border-color:#ff8100}.vue-cron .cron-expression .field{justify-content:center;align-items:center;padding-left:10px;padding-right:10px}
|
package/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@web-utils/component",
|
|
5
|
-
"version": "3.8.
|
|
5
|
+
"version": "3.8.2",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"description-markup": "markdown",
|
|
@@ -20074,6 +20074,14 @@
|
|
|
20074
20074
|
"type": "func"
|
|
20075
20075
|
},
|
|
20076
20076
|
"default": ""
|
|
20077
|
+
},
|
|
20078
|
+
{
|
|
20079
|
+
"name": "quartz",
|
|
20080
|
+
"value": {
|
|
20081
|
+
"kind": "expression",
|
|
20082
|
+
"type": "boolean"
|
|
20083
|
+
},
|
|
20084
|
+
"default": "true"
|
|
20077
20085
|
}
|
|
20078
20086
|
],
|
|
20079
20087
|
"events": [
|