@simsustech/quasar-components 0.11.13 → 0.11.15
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/CHANGELOG.md +12 -0
- package/dist/{LocaleSelect.vue_vue_type_script_setup_true_lang-Du4fNbTV.js → LocaleSelect.vue_vue_type_script_setup_true_lang-DmbnGyqQ.js} +5 -21
- package/dist/form.js +147 -110
- package/dist/general.js +1 -1
- package/package.json +1 -1
- package/src/ui/form/CronScheduleInput.vue +145 -108
- package/src/ui/form/LocaleSelect.vue +2 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @simsustech/quasar-components
|
|
2
2
|
|
|
3
|
+
## 0.11.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 138a828: fix(components): fix CronScheduleInput style
|
|
8
|
+
|
|
9
|
+
## 0.11.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 7bc307d: fix(components): fix localeSelect selectedItems slot
|
|
14
|
+
|
|
3
15
|
## 0.11.13
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -502,37 +502,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
502
502
|
return (_ctx, _cache) => {
|
|
503
503
|
const _component_q_icon = QIcon;
|
|
504
504
|
const _component_q_item_section = QItemSection;
|
|
505
|
-
const _component_q_item = QItem;
|
|
506
505
|
const _component_q_item_label = QItemLabel;
|
|
506
|
+
const _component_q_item = QItem;
|
|
507
507
|
return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
|
|
508
508
|
options: languageOptions.value,
|
|
509
509
|
"model-value": unref(modelValue),
|
|
510
510
|
filled: false,
|
|
511
|
-
borderless: "",
|
|
512
511
|
"emit-value": "",
|
|
513
512
|
"map-options": ""
|
|
514
513
|
}), {
|
|
515
514
|
"selected-item": withCtx((scope) => [
|
|
516
515
|
scope.opt ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
517
|
-
createVNode(
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
createVNode(_component_q_icon, {
|
|
522
|
-
name: scope.opt.icon
|
|
523
|
-
}, null, 8, ["name"])
|
|
524
|
-
]),
|
|
525
|
-
_: 2
|
|
526
|
-
}, 1024),
|
|
527
|
-
createVNode(_component_q_item_section, { label: "" }, {
|
|
528
|
-
default: withCtx(() => [
|
|
529
|
-
createTextVNode(toDisplayString(scope.opt.label), 1)
|
|
530
|
-
]),
|
|
531
|
-
_: 2
|
|
532
|
-
}, 1024)
|
|
533
|
-
]),
|
|
534
|
-
_: 2
|
|
535
|
-
}, 1024)
|
|
516
|
+
createVNode(_component_q_icon, {
|
|
517
|
+
name: scope.opt.icon
|
|
518
|
+
}, null, 8, ["name"]),
|
|
519
|
+
createTextVNode(" " + toDisplayString(scope.opt.label), 1)
|
|
536
520
|
])) : createCommentVNode("", true)
|
|
537
521
|
]),
|
|
538
522
|
option: withCtx((scope) => [
|
package/dist/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useAttrs, withAsyncContext, watch, ref, createBlock, openBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, toRefs, computed, useSlots, createCommentVNode, renderSlot, createSlots, renderList, resolveDirective, createElementVNode, withDirectives, createElementBlock, Fragment, resolveDynamicComponent } from "vue";
|
|
2
2
|
import { useQuasar, QSelect, QItem, QItemSection, QItemLabel, QInput, QField, QIcon, QTooltip, QPopupProxy, QDate, QBtn, QEditor } from "quasar";
|
|
3
|
-
import { u as useLang, l as loadLang } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { _ } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { u as useLang, l as loadLang } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-DmbnGyqQ.js";
|
|
4
|
+
import { _ } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-DmbnGyqQ.js";
|
|
5
5
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "GenderSelect",
|
|
7
7
|
props: {
|
|
@@ -266,8 +266,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
|
-
const _hoisted_1 = { class: "row" };
|
|
270
|
-
const _hoisted_2 = {
|
|
269
|
+
const _hoisted_1$1 = { class: "row" };
|
|
270
|
+
const _hoisted_2$1 = {
|
|
271
271
|
key: 0,
|
|
272
272
|
style: { "margin-top": "1em", "width": "1ch" }
|
|
273
273
|
};
|
|
@@ -440,7 +440,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
440
440
|
"stack-label": ""
|
|
441
441
|
}, createSlots({
|
|
442
442
|
control: withCtx(() => [
|
|
443
|
-
createElementVNode("div", _hoisted_1, [
|
|
443
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
444
444
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(format).split("-"), (part, index) => {
|
|
445
445
|
return openBlock(), createBlock(resolveDynamicComponent(unref(QInput)), mergeProps({
|
|
446
446
|
key: part,
|
|
@@ -456,7 +456,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
456
456
|
dense: ""
|
|
457
457
|
}), {
|
|
458
458
|
after: withCtx(() => [
|
|
459
|
-
index < 2 ? (openBlock(), createElementBlock("a", _hoisted_2, "-")) : createCommentVNode("", true)
|
|
459
|
+
index < 2 ? (openBlock(), createElementBlock("a", _hoisted_2$1, "-")) : createCommentVNode("", true)
|
|
460
460
|
]),
|
|
461
461
|
_: 2
|
|
462
462
|
}, 1040);
|
|
@@ -900,6 +900,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
900
900
|
};
|
|
901
901
|
}
|
|
902
902
|
});
|
|
903
|
+
const _hoisted_1 = { class: "row" };
|
|
904
|
+
const _hoisted_2 = {
|
|
905
|
+
key: 0,
|
|
906
|
+
class: "row"
|
|
907
|
+
};
|
|
903
908
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
904
909
|
__name: "CronScheduleInput",
|
|
905
910
|
props: {
|
|
@@ -939,7 +944,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
939
944
|
}))
|
|
940
945
|
]);
|
|
941
946
|
const dayOfWeekOptions = ref(
|
|
942
|
-
[...Array(
|
|
947
|
+
[...Array(7).keys()].map((day) => ({
|
|
943
948
|
label: $q.lang.date.days[day],
|
|
944
949
|
value: String(day)
|
|
945
950
|
}))
|
|
@@ -965,6 +970,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
965
970
|
dayOfWeek.value = newDayOfWeek.split(",").filter((val) => val !== "*");
|
|
966
971
|
}
|
|
967
972
|
}
|
|
973
|
+
const smallStyle = {
|
|
974
|
+
"margin-top": "-1.75em",
|
|
975
|
+
"margin-bottom": "-0.5em",
|
|
976
|
+
background: "transparent",
|
|
977
|
+
border: 0
|
|
978
|
+
};
|
|
979
|
+
const largeStyle = {
|
|
980
|
+
"margin-bottom": "-0.5em",
|
|
981
|
+
background: "transparent",
|
|
982
|
+
border: 0
|
|
983
|
+
};
|
|
984
|
+
const dayOfWeekStyle = {
|
|
985
|
+
"margin-bottom": "-0.5em",
|
|
986
|
+
background: "transparent",
|
|
987
|
+
border: 0
|
|
988
|
+
};
|
|
968
989
|
watch(modelValue, (newVal) => {
|
|
969
990
|
if (newVal) setInternalCron(newVal);
|
|
970
991
|
else if (newVal === null) {
|
|
@@ -983,109 +1004,125 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
983
1004
|
borderless: ""
|
|
984
1005
|
}, {
|
|
985
1006
|
control: withCtx(() => [
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
modelValue:
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
"
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
hint:
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
"
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
"
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1007
|
+
createElementVNode("div", _hoisted_1, [
|
|
1008
|
+
_ctx.showHour ? (openBlock(), createBlock(_component_q_select, {
|
|
1009
|
+
key: 0,
|
|
1010
|
+
modelValue: hour.value,
|
|
1011
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hour.value = $event),
|
|
1012
|
+
class: "col-auto",
|
|
1013
|
+
options: hourOptions.value,
|
|
1014
|
+
hint: unref(lang).cron.hour,
|
|
1015
|
+
"bottom-slots": "",
|
|
1016
|
+
borderless: "",
|
|
1017
|
+
filled: false,
|
|
1018
|
+
outlined: false,
|
|
1019
|
+
standout: false,
|
|
1020
|
+
rounded: false,
|
|
1021
|
+
style: smallStyle,
|
|
1022
|
+
"map-options": "",
|
|
1023
|
+
"emit-value": "",
|
|
1024
|
+
multiple: ""
|
|
1025
|
+
}, {
|
|
1026
|
+
selected: withCtx(() => [
|
|
1027
|
+
createTextVNode(toDisplayString(hour.value.length ? hour.value.join(",") : unref(lang).cron.every.hour), 1)
|
|
1028
|
+
]),
|
|
1029
|
+
_: 1
|
|
1030
|
+
}, 8, ["modelValue", "options", "hint"])) : createCommentVNode("", true),
|
|
1031
|
+
_ctx.showMinute ? (openBlock(), createBlock(_component_q_select, {
|
|
1032
|
+
key: 1,
|
|
1033
|
+
modelValue: minute.value,
|
|
1034
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => minute.value = $event),
|
|
1035
|
+
class: "col-auto",
|
|
1036
|
+
options: minuteOptions.value,
|
|
1037
|
+
hint: unref(lang).cron.minute,
|
|
1038
|
+
"bottom-slots": "",
|
|
1039
|
+
borderless: "",
|
|
1040
|
+
filled: false,
|
|
1041
|
+
outlined: false,
|
|
1042
|
+
standout: false,
|
|
1043
|
+
rounded: false,
|
|
1044
|
+
style: smallStyle,
|
|
1045
|
+
"map-options": "",
|
|
1046
|
+
"emit-value": "",
|
|
1047
|
+
multiple: ""
|
|
1048
|
+
}, {
|
|
1049
|
+
selected: withCtx(() => [
|
|
1050
|
+
createTextVNode(toDisplayString(minute.value.length ? minute.value.join(",") : unref(lang).cron.every.minute), 1)
|
|
1051
|
+
]),
|
|
1052
|
+
_: 1
|
|
1053
|
+
}, 8, ["modelValue", "options", "hint"])) : createCommentVNode("", true),
|
|
1054
|
+
createVNode(_component_q_select, {
|
|
1055
|
+
modelValue: dayOfMonth.value,
|
|
1056
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dayOfMonth.value = $event),
|
|
1057
|
+
class: "col-auto",
|
|
1058
|
+
options: dayOfMonthOptions.value,
|
|
1059
|
+
hint: unref(lang).cron.dayOfMonth,
|
|
1060
|
+
"bottom-slots": "",
|
|
1061
|
+
borderless: "",
|
|
1062
|
+
filled: false,
|
|
1063
|
+
outlined: false,
|
|
1064
|
+
standout: false,
|
|
1065
|
+
rounded: false,
|
|
1066
|
+
style: smallStyle,
|
|
1067
|
+
"map-options": "",
|
|
1068
|
+
"emit-value": "",
|
|
1069
|
+
multiple: ""
|
|
1070
|
+
}, {
|
|
1071
|
+
selected: withCtx(() => [
|
|
1072
|
+
createTextVNode(toDisplayString(dayOfMonth.value.length ? dayOfMonth.value.join(",") : unref(lang).cron.every.dayOfMonth), 1)
|
|
1073
|
+
]),
|
|
1074
|
+
_: 1
|
|
1075
|
+
}, 8, ["modelValue", "options", "hint"]),
|
|
1076
|
+
createVNode(_component_q_select, {
|
|
1077
|
+
modelValue: month.value,
|
|
1078
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => month.value = $event),
|
|
1079
|
+
class: "col-auto",
|
|
1080
|
+
options: monthOptions.value,
|
|
1081
|
+
hint: unref(lang).cron.month,
|
|
1082
|
+
placeholder: unref(lang).cron.month,
|
|
1083
|
+
"bottom-slots": "",
|
|
1084
|
+
borderless: "",
|
|
1085
|
+
filled: false,
|
|
1086
|
+
outlined: false,
|
|
1087
|
+
standout: false,
|
|
1088
|
+
rounded: false,
|
|
1089
|
+
style: largeStyle,
|
|
1090
|
+
"map-options": "",
|
|
1091
|
+
"emit-value": "",
|
|
1092
|
+
multiple: ""
|
|
1093
|
+
}, {
|
|
1094
|
+
selected: withCtx(() => [
|
|
1095
|
+
createTextVNode(toDisplayString(month.value.length ? month.value.map((val) => unref($q).lang.date.months[Number(val) - 1]).join(",") : unref(lang).cron.every.month), 1)
|
|
1096
|
+
]),
|
|
1097
|
+
_: 1
|
|
1098
|
+
}, 8, ["modelValue", "options", "hint", "placeholder"])
|
|
1099
|
+
]),
|
|
1100
|
+
_ctx.showDayOfWeek ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
1101
|
+
_ctx.showDayOfWeek ? (openBlock(), createBlock(_component_q_select, {
|
|
1102
|
+
key: 0,
|
|
1103
|
+
modelValue: dayOfWeek.value,
|
|
1104
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => dayOfWeek.value = $event),
|
|
1105
|
+
class: "col-auto",
|
|
1106
|
+
options: dayOfWeekOptions.value,
|
|
1107
|
+
placeholder: unref(lang).cron.dayOfWeek,
|
|
1108
|
+
hint: unref(lang).cron.dayOfWeek,
|
|
1109
|
+
style: dayOfWeekStyle,
|
|
1110
|
+
"bottom-slots": "",
|
|
1111
|
+
borderless: "",
|
|
1112
|
+
filled: false,
|
|
1113
|
+
outlined: false,
|
|
1114
|
+
standout: false,
|
|
1115
|
+
rounded: false,
|
|
1116
|
+
"map-options": "",
|
|
1117
|
+
"emit-value": "",
|
|
1118
|
+
multiple: ""
|
|
1119
|
+
}, {
|
|
1120
|
+
selected: withCtx(() => [
|
|
1121
|
+
createTextVNode(toDisplayString(dayOfWeek.value.length ? dayOfWeek.value.map((val) => unref($q).lang.date.days[Number(val)]).join(",") : unref(lang).cron.every.dayOfWeek), 1)
|
|
1122
|
+
]),
|
|
1123
|
+
_: 1
|
|
1124
|
+
}, 8, ["modelValue", "options", "placeholder", "hint"])) : createCommentVNode("", true)
|
|
1125
|
+
])) : createCommentVNode("", true)
|
|
1089
1126
|
]),
|
|
1090
1127
|
_: 1
|
|
1091
1128
|
}, 8, ["model-value", "rules", "label"]);
|
package/dist/general.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { u as useLang, l as loadLang, _ as _sfc_main$5 } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-UtpXkOh7.js";
|
|
2
2
|
import { useQuasar, QCard, QCardSection, QCardActions, QDialog, QLayout, QHeader, QToolbar, QBtn, QToolbarTitle, QPageContainer, QPage, QPageSticky, QSpace, QList } from "quasar";
|
|
3
3
|
import { defineComponent, watch, ref, createBlock, openBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeProps, guardReactiveProps, createCommentVNode, toRefs, normalizeClass, createElementBlock } from "vue";
|
|
4
|
-
import { _ as _sfc_main$6 } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as _sfc_main$6 } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-DmbnGyqQ.js";
|
|
5
5
|
const _hoisted_1$1 = { class: "text-h6" };
|
|
6
6
|
const _hoisted_2$1 = { class: "text-subtitle2" };
|
|
7
7
|
const __default__$2 = {
|
package/package.json
CHANGED
|
@@ -7,113 +7,131 @@
|
|
|
7
7
|
borderless
|
|
8
8
|
>
|
|
9
9
|
<template #control>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
10
|
+
<div class="row">
|
|
11
|
+
<q-select
|
|
12
|
+
v-if="showHour"
|
|
13
|
+
v-model="hour"
|
|
14
|
+
class="col-auto"
|
|
15
|
+
:options="hourOptions"
|
|
16
|
+
:hint="lang.cron.hour"
|
|
17
|
+
bottom-slots
|
|
18
|
+
borderless
|
|
19
|
+
:filled="false"
|
|
20
|
+
:outlined="false"
|
|
21
|
+
:standout="false"
|
|
22
|
+
:rounded="false"
|
|
23
|
+
:style="smallStyle"
|
|
24
|
+
map-options
|
|
25
|
+
emit-value
|
|
26
|
+
multiple
|
|
27
|
+
>
|
|
28
|
+
<template #selected>
|
|
29
|
+
{{ hour.length ? hour.join(',') : lang.cron.every.hour }}
|
|
30
|
+
</template>
|
|
31
|
+
</q-select>
|
|
32
|
+
<q-select
|
|
33
|
+
v-if="showMinute"
|
|
34
|
+
v-model="minute"
|
|
35
|
+
class="col-auto"
|
|
36
|
+
:options="minuteOptions"
|
|
37
|
+
:hint="lang.cron.minute"
|
|
38
|
+
bottom-slots
|
|
39
|
+
borderless
|
|
40
|
+
:filled="false"
|
|
41
|
+
:outlined="false"
|
|
42
|
+
:standout="false"
|
|
43
|
+
:rounded="false"
|
|
44
|
+
:style="smallStyle"
|
|
45
|
+
map-options
|
|
46
|
+
emit-value
|
|
47
|
+
multiple
|
|
48
|
+
>
|
|
49
|
+
<template #selected>
|
|
50
|
+
{{ minute.length ? minute.join(',') : lang.cron.every.minute }}
|
|
51
|
+
</template>
|
|
52
|
+
</q-select>
|
|
53
|
+
<q-select
|
|
54
|
+
v-model="dayOfMonth"
|
|
55
|
+
class="col-auto"
|
|
56
|
+
:options="dayOfMonthOptions"
|
|
57
|
+
:hint="lang.cron.dayOfMonth"
|
|
58
|
+
bottom-slots
|
|
59
|
+
borderless
|
|
60
|
+
:filled="false"
|
|
61
|
+
:outlined="false"
|
|
62
|
+
:standout="false"
|
|
63
|
+
:rounded="false"
|
|
64
|
+
:style="smallStyle"
|
|
65
|
+
map-options
|
|
66
|
+
emit-value
|
|
67
|
+
multiple
|
|
68
|
+
>
|
|
69
|
+
<template #selected>
|
|
70
|
+
{{
|
|
71
|
+
dayOfMonth.length
|
|
72
|
+
? dayOfMonth.join(',')
|
|
73
|
+
: lang.cron.every.dayOfMonth
|
|
74
|
+
}}
|
|
75
|
+
</template>
|
|
76
|
+
</q-select>
|
|
77
|
+
<q-select
|
|
78
|
+
v-model="month"
|
|
79
|
+
class="col-auto"
|
|
80
|
+
:options="monthOptions"
|
|
81
|
+
:hint="lang.cron.month"
|
|
82
|
+
:placeholder="lang.cron.month"
|
|
83
|
+
bottom-slots
|
|
84
|
+
borderless
|
|
85
|
+
:filled="false"
|
|
86
|
+
:outlined="false"
|
|
87
|
+
:standout="false"
|
|
88
|
+
:rounded="false"
|
|
89
|
+
:style="largeStyle"
|
|
90
|
+
map-options
|
|
91
|
+
emit-value
|
|
92
|
+
multiple
|
|
93
|
+
>
|
|
94
|
+
<template #selected>
|
|
95
|
+
{{
|
|
96
|
+
month.length
|
|
97
|
+
? month
|
|
98
|
+
.map((val) => $q.lang.date.months[Number(val) - 1])
|
|
99
|
+
.join(',')
|
|
100
|
+
: lang.cron.every.month
|
|
101
|
+
}}
|
|
102
|
+
</template>
|
|
103
|
+
</q-select>
|
|
104
|
+
</div>
|
|
105
|
+
<div v-if="showDayOfWeek" class="row">
|
|
106
|
+
<q-select
|
|
107
|
+
v-if="showDayOfWeek"
|
|
108
|
+
v-model="dayOfWeek"
|
|
109
|
+
class="col-auto"
|
|
110
|
+
:options="dayOfWeekOptions"
|
|
111
|
+
:placeholder="lang.cron.dayOfWeek"
|
|
112
|
+
:hint="lang.cron.dayOfWeek"
|
|
113
|
+
:style="dayOfWeekStyle"
|
|
114
|
+
bottom-slots
|
|
115
|
+
borderless
|
|
116
|
+
:filled="false"
|
|
117
|
+
:outlined="false"
|
|
118
|
+
:standout="false"
|
|
119
|
+
:rounded="false"
|
|
120
|
+
map-options
|
|
121
|
+
emit-value
|
|
122
|
+
multiple
|
|
123
|
+
>
|
|
124
|
+
<template #selected>
|
|
125
|
+
{{
|
|
126
|
+
dayOfWeek.length
|
|
127
|
+
? dayOfWeek
|
|
128
|
+
.map((val) => $q.lang.date.days[Number(val)])
|
|
129
|
+
.join(',')
|
|
130
|
+
: lang.cron.every.dayOfWeek
|
|
131
|
+
}}
|
|
132
|
+
</template>
|
|
133
|
+
</q-select>
|
|
134
|
+
</div>
|
|
117
135
|
</template>
|
|
118
136
|
</q-field>
|
|
119
137
|
</template>
|
|
@@ -163,7 +181,7 @@ const monthOptions = ref([
|
|
|
163
181
|
}))
|
|
164
182
|
])
|
|
165
183
|
const dayOfWeekOptions = ref(
|
|
166
|
-
[...Array(
|
|
184
|
+
[...Array(7).keys()].map((day) => ({
|
|
167
185
|
label: $q.lang.date.days[day],
|
|
168
186
|
value: String(day)
|
|
169
187
|
}))
|
|
@@ -195,6 +213,25 @@ function setInternalCron(cronString: string) {
|
|
|
195
213
|
}
|
|
196
214
|
}
|
|
197
215
|
|
|
216
|
+
const smallStyle = {
|
|
217
|
+
'margin-top': '-1.75em',
|
|
218
|
+
'margin-bottom': '-0.5em',
|
|
219
|
+
background: 'transparent',
|
|
220
|
+
border: 0
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const largeStyle = {
|
|
224
|
+
'margin-bottom': '-0.5em',
|
|
225
|
+
background: 'transparent',
|
|
226
|
+
border: 0
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const dayOfWeekStyle = {
|
|
230
|
+
'margin-bottom': '-0.5em',
|
|
231
|
+
background: 'transparent',
|
|
232
|
+
border: 0
|
|
233
|
+
}
|
|
234
|
+
|
|
198
235
|
watch(modelValue, (newVal) => {
|
|
199
236
|
if (newVal) setInternalCron(newVal)
|
|
200
237
|
else if (newVal === null) {
|
|
@@ -4,20 +4,13 @@
|
|
|
4
4
|
:options="languageOptions"
|
|
5
5
|
:model-value="modelValue"
|
|
6
6
|
:filled="false"
|
|
7
|
-
borderless
|
|
8
7
|
emit-value
|
|
9
8
|
map-options
|
|
10
9
|
>
|
|
11
10
|
<template #selected-item="scope">
|
|
12
11
|
<div v-if="scope.opt">
|
|
13
|
-
<q-
|
|
14
|
-
|
|
15
|
-
<q-icon :name="scope.opt.icon" />
|
|
16
|
-
</q-item-section>
|
|
17
|
-
<q-item-section label>
|
|
18
|
-
{{ scope.opt.label }}
|
|
19
|
-
</q-item-section>
|
|
20
|
-
</q-item>
|
|
12
|
+
<q-icon :name="scope.opt.icon" />
|
|
13
|
+
{{ scope.opt.label }}
|
|
21
14
|
</div>
|
|
22
15
|
</template>
|
|
23
16
|
<template #option="scope">
|