ele-admin-plus 1.4.1-beta.1 → 1.4.1

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.
Files changed (224) hide show
  1. package/es/core-components.d.ts +2 -0
  2. package/es/core-components.js +104 -100
  3. package/es/ele-app/plus.d.ts +9 -1
  4. package/es/ele-app/plusx.d.ts +26 -13
  5. package/es/ele-backtop/index.js +7 -1
  6. package/es/ele-basic-select/components/select-view.d.ts +53 -22
  7. package/es/ele-basic-select/components/select-view.js +57 -20
  8. package/es/ele-basic-select/index.d.ts +39 -19
  9. package/es/ele-basic-select/index.js +62 -13
  10. package/es/ele-basic-select/props.d.ts +33 -21
  11. package/es/ele-basic-select/props.js +33 -21
  12. package/es/ele-basic-select/style/index.js +2 -0
  13. package/es/ele-basic-select/types.d.ts +1 -1
  14. package/es/ele-config-provider/components/receiver-view.d.ts +2 -0
  15. package/es/ele-config-provider/components/receiver-view.js +74 -72
  16. package/es/ele-config-provider/receiver.d.ts +2 -2
  17. package/es/ele-config-provider/receiver.js +5 -1
  18. package/es/ele-config-provider/types.d.ts +10 -1
  19. package/es/ele-copyable/index.d.ts +2 -4
  20. package/es/ele-cron-builder/index.d.ts +24 -0
  21. package/es/ele-cron-builder/index.js +81 -0
  22. package/es/ele-cron-builder/props.d.ts +31 -0
  23. package/es/ele-cron-builder/props.js +24 -0
  24. package/es/ele-cron-builder/style/index.d.ts +1 -0
  25. package/es/ele-cron-builder/style/index.js +4 -0
  26. package/es/ele-cron-builder/style/index.scss +6 -0
  27. package/es/ele-cron-builder/types.d.ts +8 -0
  28. package/es/ele-cron-panel/components/cron-day.d.ts +25 -0
  29. package/es/ele-cron-panel/components/cron-day.js +232 -0
  30. package/es/ele-cron-panel/components/cron-hour.d.ts +25 -0
  31. package/es/ele-cron-panel/components/cron-hour.js +174 -0
  32. package/es/ele-cron-panel/components/cron-minute.d.ts +25 -0
  33. package/es/ele-cron-panel/components/cron-minute.js +174 -0
  34. package/es/ele-cron-panel/components/cron-month.d.ts +25 -0
  35. package/es/ele-cron-panel/components/cron-month.js +174 -0
  36. package/es/ele-cron-panel/components/cron-second.d.ts +25 -0
  37. package/es/ele-cron-panel/components/cron-second.js +174 -0
  38. package/es/ele-cron-panel/components/cron-week.d.ts +25 -0
  39. package/es/ele-cron-panel/components/cron-week.js +229 -0
  40. package/es/ele-cron-panel/components/cron-year.d.ts +25 -0
  41. package/es/ele-cron-panel/components/cron-year.js +186 -0
  42. package/es/ele-cron-panel/index.d.ts +14 -0
  43. package/es/ele-cron-panel/index.js +348 -0
  44. package/es/ele-cron-panel/props.d.ts +20 -0
  45. package/es/ele-cron-panel/props.js +14 -0
  46. package/es/ele-cron-panel/style/index.d.ts +1 -0
  47. package/es/ele-cron-panel/style/index.js +7 -0
  48. package/es/ele-cron-panel/style/index.scss +282 -0
  49. package/es/ele-cron-panel/types.d.ts +118 -0
  50. package/es/ele-cron-panel/util.d.ts +23 -0
  51. package/es/ele-cron-panel/util.js +542 -0
  52. package/es/ele-cropper/components/cropper-tools.d.ts +2 -2
  53. package/es/ele-cropper-modal/index.d.ts +2 -4
  54. package/es/ele-crud/index.d.ts +3 -3
  55. package/es/ele-drawer/index.d.ts +9 -0
  56. package/es/ele-drawer/index.js +5 -1
  57. package/es/ele-drawer/props.d.ts +5 -0
  58. package/es/ele-drawer/props.js +6 -1
  59. package/es/ele-drawer/style/index.scss +11 -0
  60. package/es/ele-file-list/index.d.ts +3 -3
  61. package/es/ele-icon-select/components/icon-grid.d.ts +8 -3
  62. package/es/ele-icon-select/components/icon-grid.js +20 -12
  63. package/es/ele-icon-select/index.d.ts +58 -59
  64. package/es/ele-icon-select/index.js +92 -86
  65. package/es/ele-icon-select/props.d.ts +35 -35
  66. package/es/ele-icon-select/props.js +34 -34
  67. package/es/ele-icon-select/style/css-var.scss +1 -1
  68. package/es/ele-icon-select/style/index.scss +50 -18
  69. package/es/ele-icon-select/types.d.ts +13 -0
  70. package/es/ele-map-picker/index.d.ts +3 -3
  71. package/es/ele-modal/index.d.ts +4 -2
  72. package/es/ele-modal/index.js +9 -3
  73. package/es/ele-modal/props.d.ts +2 -0
  74. package/es/ele-modal/props.js +2 -0
  75. package/es/ele-modal/style/index.scss +16 -0
  76. package/es/ele-pro-form/components/item-type-data.js +39 -64
  77. package/es/ele-pro-form/index.d.ts +3 -3
  78. package/es/ele-pro-table/components/table-tools.d.ts +12 -97
  79. package/es/ele-pro-table/components/table-tools.js +118 -248
  80. package/es/ele-pro-table/components/tool-export.d.ts +5 -1
  81. package/es/ele-pro-table/components/tool-export.js +32 -20
  82. package/es/ele-pro-table/components/tool-print.d.ts +5 -1
  83. package/es/ele-pro-table/components/tool-print.js +37 -25
  84. package/es/ele-pro-table/exceljs-plugin.d.ts +12 -0
  85. package/es/ele-pro-table/exceljs-plugin.js +81 -0
  86. package/es/ele-pro-table/index.d.ts +6 -7
  87. package/es/ele-pro-table/index.js +117 -46
  88. package/es/ele-pro-table/types.d.ts +11 -0
  89. package/es/ele-split-panel/style/index.scss +1 -1
  90. package/es/ele-table-select/index.d.ts +2 -0
  91. package/es/ele-table-select/props.d.ts +2 -0
  92. package/es/ele-table-select/props.js +3 -1
  93. package/es/ele-tour/index.d.ts +3 -3
  94. package/es/ele-tree-select/index.d.ts +2 -0
  95. package/es/ele-upload-list/index.d.ts +3 -3
  96. package/es/ele-upload-list/index.js +25 -8
  97. package/es/ele-virtual-table/components/body-cell.d.ts +1 -1
  98. package/es/ele-watermark/index.d.ts +20 -7
  99. package/es/ele-watermark/index.js +253 -94
  100. package/es/ele-watermark/props.d.ts +10 -3
  101. package/es/ele-watermark/props.js +10 -3
  102. package/es/ele-watermark/types.d.ts +12 -0
  103. package/es/ele-watermark/util.d.ts +2 -9
  104. package/es/ele-watermark/util.js +10 -19
  105. package/es/lang/en_US.js +116 -0
  106. package/es/lang/zh_CN.js +116 -0
  107. package/es/lang/zh_TW.js +116 -0
  108. package/es/style/plus.scss +3 -1
  109. package/es/style/themes/default.scss +12 -3
  110. package/es/style/themes/rounded.scss +2 -1
  111. package/es/utils/theme-util.d.ts +1 -1
  112. package/lib/core-components.cjs +104 -100
  113. package/lib/core-components.d.ts +2 -0
  114. package/lib/ele-app/plus.d.ts +9 -1
  115. package/lib/ele-app/plusx.d.ts +26 -13
  116. package/lib/ele-backtop/index.cjs +6 -0
  117. package/lib/ele-basic-select/components/select-view.cjs +56 -19
  118. package/lib/ele-basic-select/components/select-view.d.ts +53 -22
  119. package/lib/ele-basic-select/index.cjs +61 -12
  120. package/lib/ele-basic-select/index.d.ts +39 -19
  121. package/lib/ele-basic-select/props.cjs +33 -21
  122. package/lib/ele-basic-select/props.d.ts +33 -21
  123. package/lib/ele-basic-select/style/index.cjs +2 -0
  124. package/lib/ele-basic-select/types.d.ts +1 -1
  125. package/lib/ele-config-provider/components/receiver-view.cjs +2 -2
  126. package/lib/ele-config-provider/components/receiver-view.d.ts +2 -0
  127. package/lib/ele-config-provider/receiver.cjs +5 -1
  128. package/lib/ele-config-provider/receiver.d.ts +2 -2
  129. package/lib/ele-config-provider/types.d.ts +10 -1
  130. package/lib/ele-copyable/index.d.ts +2 -4
  131. package/lib/ele-cron-builder/index.cjs +80 -0
  132. package/lib/ele-cron-builder/index.d.ts +24 -0
  133. package/lib/ele-cron-builder/props.cjs +24 -0
  134. package/lib/ele-cron-builder/props.d.ts +31 -0
  135. package/lib/ele-cron-builder/style/index.cjs +5 -0
  136. package/lib/ele-cron-builder/style/index.d.ts +1 -0
  137. package/lib/ele-cron-builder/style/index.scss +6 -0
  138. package/lib/ele-cron-builder/types.d.ts +8 -0
  139. package/lib/ele-cron-panel/components/cron-day.cjs +231 -0
  140. package/lib/ele-cron-panel/components/cron-day.d.ts +25 -0
  141. package/lib/ele-cron-panel/components/cron-hour.cjs +173 -0
  142. package/lib/ele-cron-panel/components/cron-hour.d.ts +25 -0
  143. package/lib/ele-cron-panel/components/cron-minute.cjs +173 -0
  144. package/lib/ele-cron-panel/components/cron-minute.d.ts +25 -0
  145. package/lib/ele-cron-panel/components/cron-month.cjs +173 -0
  146. package/lib/ele-cron-panel/components/cron-month.d.ts +25 -0
  147. package/lib/ele-cron-panel/components/cron-second.cjs +173 -0
  148. package/lib/ele-cron-panel/components/cron-second.d.ts +25 -0
  149. package/lib/ele-cron-panel/components/cron-week.cjs +228 -0
  150. package/lib/ele-cron-panel/components/cron-week.d.ts +25 -0
  151. package/lib/ele-cron-panel/components/cron-year.cjs +185 -0
  152. package/lib/ele-cron-panel/components/cron-year.d.ts +25 -0
  153. package/lib/ele-cron-panel/index.cjs +347 -0
  154. package/lib/ele-cron-panel/index.d.ts +14 -0
  155. package/lib/ele-cron-panel/props.cjs +14 -0
  156. package/lib/ele-cron-panel/props.d.ts +20 -0
  157. package/lib/ele-cron-panel/style/index.cjs +8 -0
  158. package/lib/ele-cron-panel/style/index.d.ts +1 -0
  159. package/lib/ele-cron-panel/style/index.scss +282 -0
  160. package/lib/ele-cron-panel/types.d.ts +118 -0
  161. package/lib/ele-cron-panel/util.cjs +542 -0
  162. package/lib/ele-cron-panel/util.d.ts +23 -0
  163. package/lib/ele-cropper/components/cropper-tools.d.ts +2 -2
  164. package/lib/ele-cropper-modal/index.d.ts +2 -4
  165. package/lib/ele-crud/index.d.ts +3 -3
  166. package/lib/ele-drawer/index.cjs +4 -0
  167. package/lib/ele-drawer/index.d.ts +9 -0
  168. package/lib/ele-drawer/props.cjs +6 -1
  169. package/lib/ele-drawer/props.d.ts +5 -0
  170. package/lib/ele-drawer/style/index.scss +11 -0
  171. package/lib/ele-file-list/index.d.ts +3 -3
  172. package/lib/ele-icon-select/components/icon-grid.cjs +19 -11
  173. package/lib/ele-icon-select/components/icon-grid.d.ts +8 -3
  174. package/lib/ele-icon-select/index.cjs +91 -85
  175. package/lib/ele-icon-select/index.d.ts +58 -59
  176. package/lib/ele-icon-select/props.cjs +34 -34
  177. package/lib/ele-icon-select/props.d.ts +35 -35
  178. package/lib/ele-icon-select/style/css-var.scss +1 -1
  179. package/lib/ele-icon-select/style/index.scss +50 -18
  180. package/lib/ele-icon-select/types.d.ts +13 -0
  181. package/lib/ele-map-picker/index.d.ts +3 -3
  182. package/lib/ele-modal/index.cjs +9 -3
  183. package/lib/ele-modal/index.d.ts +4 -2
  184. package/lib/ele-modal/props.cjs +2 -0
  185. package/lib/ele-modal/props.d.ts +2 -0
  186. package/lib/ele-modal/style/index.scss +16 -0
  187. package/lib/ele-pro-form/components/item-type-data.cjs +39 -64
  188. package/lib/ele-pro-form/index.d.ts +3 -3
  189. package/lib/ele-pro-table/components/table-tools.cjs +117 -247
  190. package/lib/ele-pro-table/components/table-tools.d.ts +12 -97
  191. package/lib/ele-pro-table/components/tool-export.cjs +32 -20
  192. package/lib/ele-pro-table/components/tool-export.d.ts +5 -1
  193. package/lib/ele-pro-table/components/tool-print.cjs +37 -25
  194. package/lib/ele-pro-table/components/tool-print.d.ts +5 -1
  195. package/lib/ele-pro-table/exceljs-plugin.cjs +81 -0
  196. package/lib/ele-pro-table/exceljs-plugin.d.ts +12 -0
  197. package/lib/ele-pro-table/index.cjs +143 -72
  198. package/lib/ele-pro-table/index.d.ts +6 -7
  199. package/lib/ele-pro-table/types.d.ts +11 -0
  200. package/lib/ele-split-panel/style/index.scss +1 -1
  201. package/lib/ele-table-select/index.d.ts +2 -0
  202. package/lib/ele-table-select/props.cjs +3 -1
  203. package/lib/ele-table-select/props.d.ts +2 -0
  204. package/lib/ele-tour/index.d.ts +3 -3
  205. package/lib/ele-tree-select/index.d.ts +2 -0
  206. package/lib/ele-upload-list/index.cjs +25 -8
  207. package/lib/ele-upload-list/index.d.ts +3 -3
  208. package/lib/ele-virtual-table/components/body-cell.d.ts +1 -1
  209. package/lib/ele-watermark/index.cjs +251 -92
  210. package/lib/ele-watermark/index.d.ts +20 -7
  211. package/lib/ele-watermark/props.cjs +10 -3
  212. package/lib/ele-watermark/props.d.ts +10 -3
  213. package/lib/ele-watermark/types.d.ts +12 -0
  214. package/lib/ele-watermark/util.cjs +10 -19
  215. package/lib/ele-watermark/util.d.ts +2 -9
  216. package/lib/lang/en_US.cjs +116 -0
  217. package/lib/lang/zh_CN.cjs +116 -0
  218. package/lib/lang/zh_TW.cjs +116 -0
  219. package/lib/style/plus.scss +3 -1
  220. package/lib/style/themes/default.scss +12 -3
  221. package/lib/style/themes/rounded.scss +2 -1
  222. package/lib/utils/theme-util.d.ts +1 -1
  223. package/package.json +1 -1
  224. package/typings/global.d.ts +2 -0
@@ -0,0 +1,232 @@
1
+ import { defineComponent, ref, watch, createElementBlock, openBlock, createVNode, unref, isRef, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createBlock, createCommentVNode } from "vue";
2
+ import { ElRadioGroup, ElRadio, ElInputNumber, ElCheckboxGroup, ElCheckbox } from "element-plus";
3
+ import { useCron } from "../util";
4
+ const _hoisted_1 = { class: "ele-cron-panel-content" };
5
+ const _hoisted_2 = { class: "ele-cron-panel-item" };
6
+ const _hoisted_3 = { class: "ele-cron-panel-item-input" };
7
+ const _hoisted_4 = { class: "ele-cron-panel-item-input" };
8
+ const _hoisted_5 = { class: "ele-cron-panel-item" };
9
+ const _hoisted_6 = { class: "ele-cron-panel-item-input" };
10
+ const _hoisted_7 = { class: "ele-cron-panel-item-input" };
11
+ const _hoisted_8 = { class: "ele-cron-panel-options" };
12
+ const _hoisted_9 = { class: "ele-cron-panel-item" };
13
+ const _hoisted_10 = { class: "ele-cron-panel-item-input" };
14
+ const minValue = 1;
15
+ const maxValue = 31;
16
+ const _sfc_main = /* @__PURE__ */ defineComponent({
17
+ __name: "cron-day",
18
+ props: {
19
+ /** day */
20
+ modelValue: String,
21
+ /** 国际化 */
22
+ lang: {
23
+ type: Object,
24
+ required: true
25
+ }
26
+ },
27
+ emits: {
28
+ "update:modelValue": (_day) => true
29
+ },
30
+ setup(__props, { emit: __emit }) {
31
+ const props = __props;
32
+ const emit = __emit;
33
+ const {
34
+ type,
35
+ start,
36
+ end,
37
+ endMin,
38
+ intervalStart,
39
+ intervalStep,
40
+ intervalStepMax,
41
+ selections,
42
+ getValue,
43
+ parseValue
44
+ } = useCron(minValue, maxValue);
45
+ const workday = ref(1);
46
+ const updateModelValue = (day) => {
47
+ emit("update:modelValue", day);
48
+ };
49
+ watch(
50
+ [type, start, end, intervalStart, intervalStep, selections, workday],
51
+ () => {
52
+ if (type.value === "workday") {
53
+ updateModelValue(`${workday.value}W`);
54
+ return;
55
+ }
56
+ if (type.value === "last") {
57
+ updateModelValue("L");
58
+ return;
59
+ }
60
+ if (type.value === "unset") {
61
+ updateModelValue("?");
62
+ return;
63
+ }
64
+ updateModelValue(getValue());
65
+ },
66
+ { deep: true, immediate: true }
67
+ );
68
+ watch(
69
+ () => props.modelValue,
70
+ (day) => {
71
+ if (day != null && day.endsWith("W")) {
72
+ type.value = "workday";
73
+ workday.value = Number(day.slice(0, -1));
74
+ return;
75
+ }
76
+ if (day === "L") {
77
+ type.value = "last";
78
+ return;
79
+ }
80
+ if (day === "?") {
81
+ type.value = "unset";
82
+ return;
83
+ }
84
+ parseValue(day);
85
+ },
86
+ { immediate: true }
87
+ );
88
+ return (_ctx, _cache) => {
89
+ return openBlock(), createElementBlock("div", _hoisted_1, [
90
+ createVNode(unref(ElRadioGroup), {
91
+ modelValue: unref(type),
92
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => isRef(type) ? type.value = $event : null)
93
+ }, {
94
+ default: withCtx(() => [
95
+ createVNode(unref(ElRadio), {
96
+ value: "every",
97
+ label: __props.lang.dayEvery
98
+ }, null, 8, ["label"]),
99
+ createVNode(unref(ElRadio), {
100
+ value: "range",
101
+ class: "ele-cron-panel-item-wrapper"
102
+ }, {
103
+ default: withCtx(() => [
104
+ createElementVNode("div", _hoisted_2, [
105
+ createElementVNode("div", null, toDisplayString(__props.lang.dayRangeStart) + " ", 1),
106
+ createElementVNode("div", _hoisted_3, [
107
+ createVNode(unref(ElInputNumber), {
108
+ modelValue: unref(start),
109
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(start) ? start.value = $event : null),
110
+ min: minValue,
111
+ max: maxValue - 1,
112
+ placeholder: "",
113
+ controlsPosition: "right"
114
+ }, null, 8, ["modelValue", "max"])
115
+ ]),
116
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.dayRange) + " ", 1),
117
+ createElementVNode("div", _hoisted_4, [
118
+ createVNode(unref(ElInputNumber), {
119
+ modelValue: unref(end),
120
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(end) ? end.value = $event : null),
121
+ min: unref(endMin),
122
+ max: maxValue,
123
+ placeholder: "",
124
+ controlsPosition: "right"
125
+ }, null, 8, ["modelValue", "min"])
126
+ ]),
127
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.dayRangeEnd), 1)
128
+ ])
129
+ ]),
130
+ _: 1
131
+ }),
132
+ createVNode(unref(ElRadio), {
133
+ value: "interval",
134
+ class: "ele-cron-panel-item-wrapper"
135
+ }, {
136
+ default: withCtx(() => [
137
+ createElementVNode("div", _hoisted_5, [
138
+ createElementVNode("div", null, toDisplayString(__props.lang.dayIntervalStart) + " ", 1),
139
+ createElementVNode("div", _hoisted_6, [
140
+ createVNode(unref(ElInputNumber), {
141
+ modelValue: unref(intervalStart),
142
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(intervalStart) ? intervalStart.value = $event : null),
143
+ min: minValue,
144
+ max: maxValue - 1,
145
+ placeholder: "",
146
+ controlsPosition: "right"
147
+ }, null, 8, ["modelValue", "max"])
148
+ ]),
149
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.dayInterval) + " ", 1),
150
+ createElementVNode("div", _hoisted_7, [
151
+ createVNode(unref(ElInputNumber), {
152
+ modelValue: unref(intervalStep),
153
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(intervalStep) ? intervalStep.value = $event : null),
154
+ min: 1,
155
+ max: unref(intervalStepMax),
156
+ placeholder: "",
157
+ controlsPosition: "right"
158
+ }, null, 8, ["modelValue", "max"])
159
+ ]),
160
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.dayIntervalEnd), 1)
161
+ ])
162
+ ]),
163
+ _: 1
164
+ }),
165
+ createVNode(unref(ElRadio), {
166
+ value: "specified",
167
+ class: "ele-cron-panel-item-wrapper ele-cron-panel-options-wrapper"
168
+ }, {
169
+ default: withCtx(() => [
170
+ createElementVNode("div", null, toDisplayString(__props.lang.daySpecified), 1),
171
+ createElementVNode("div", _hoisted_8, [
172
+ createVNode(unref(ElCheckboxGroup), {
173
+ modelValue: unref(selections),
174
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(selections) ? selections.value = $event : null)
175
+ }, {
176
+ default: withCtx(() => [
177
+ (openBlock(true), createElementBlock(Fragment, null, renderList(maxValue + 1, (item) => {
178
+ return openBlock(), createElementBlock(Fragment, { key: item }, [
179
+ item - 1 >= minValue ? (openBlock(), createBlock(unref(ElCheckbox), {
180
+ key: 0,
181
+ value: item - 1,
182
+ label: item - 1
183
+ }, null, 8, ["value", "label"])) : createCommentVNode("", true)
184
+ ], 64);
185
+ }), 128))
186
+ ]),
187
+ _: 1
188
+ }, 8, ["modelValue"])
189
+ ])
190
+ ]),
191
+ _: 1
192
+ }),
193
+ createVNode(unref(ElRadio), {
194
+ value: "workday",
195
+ class: "ele-cron-panel-item-wrapper"
196
+ }, {
197
+ default: withCtx(() => [
198
+ createElementVNode("div", _hoisted_9, [
199
+ createElementVNode("div", null, toDisplayString(__props.lang.dayWorkday) + " ", 1),
200
+ createElementVNode("div", _hoisted_10, [
201
+ createVNode(unref(ElInputNumber), {
202
+ modelValue: workday.value,
203
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => workday.value = $event),
204
+ min: minValue,
205
+ max: maxValue,
206
+ placeholder: "",
207
+ controlsPosition: "right"
208
+ }, null, 8, ["modelValue"])
209
+ ]),
210
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.dayWorkdayText), 1)
211
+ ])
212
+ ]),
213
+ _: 1
214
+ }),
215
+ createVNode(unref(ElRadio), {
216
+ value: "last",
217
+ label: __props.lang.dayLast
218
+ }, null, 8, ["label"]),
219
+ createVNode(unref(ElRadio), {
220
+ value: "unset",
221
+ label: __props.lang.dayUnset
222
+ }, null, 8, ["label"])
223
+ ]),
224
+ _: 1
225
+ }, 8, ["modelValue"])
226
+ ]);
227
+ };
228
+ }
229
+ });
230
+ export {
231
+ _sfc_main as default
232
+ };
@@ -0,0 +1,25 @@
1
+ import { PropType } from 'vue';
2
+ import { CronPanelLocale } from '../types';
3
+
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ /** hour */
6
+ modelValue: StringConstructor;
7
+ /** 国际化 */
8
+ lang: {
9
+ type: PropType<CronPanelLocale>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ "update:modelValue": (_hour?: string | undefined) => void;
14
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ /** hour */
16
+ modelValue: StringConstructor;
17
+ /** 国际化 */
18
+ lang: {
19
+ type: PropType<CronPanelLocale>;
20
+ required: true;
21
+ };
22
+ }>> & Readonly<{
23
+ "onUpdate:modelValue"?: ((_hour?: string | undefined) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ export default _default;
@@ -0,0 +1,174 @@
1
+ import { defineComponent, watch, createElementBlock, openBlock, createVNode, unref, isRef, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createBlock, createCommentVNode } from "vue";
2
+ import { ElRadioGroup, ElRadio, ElInputNumber, ElCheckboxGroup, ElCheckbox } from "element-plus";
3
+ import { useCron } from "../util";
4
+ const _hoisted_1 = { class: "ele-cron-panel-content" };
5
+ const _hoisted_2 = { class: "ele-cron-panel-item" };
6
+ const _hoisted_3 = { class: "ele-cron-panel-item-input" };
7
+ const _hoisted_4 = { class: "ele-cron-panel-item-input" };
8
+ const _hoisted_5 = { class: "ele-cron-panel-item" };
9
+ const _hoisted_6 = { class: "ele-cron-panel-item-input" };
10
+ const _hoisted_7 = { class: "ele-cron-panel-item-input" };
11
+ const _hoisted_8 = { class: "ele-cron-panel-options" };
12
+ const minValue = 0;
13
+ const maxValue = 23;
14
+ const _sfc_main = /* @__PURE__ */ defineComponent({
15
+ __name: "cron-hour",
16
+ props: {
17
+ /** hour */
18
+ modelValue: String,
19
+ /** 国际化 */
20
+ lang: {
21
+ type: Object,
22
+ required: true
23
+ }
24
+ },
25
+ emits: {
26
+ "update:modelValue": (_hour) => true
27
+ },
28
+ setup(__props, { emit: __emit }) {
29
+ const props = __props;
30
+ const emit = __emit;
31
+ const {
32
+ type,
33
+ start,
34
+ end,
35
+ endMin,
36
+ intervalStart,
37
+ intervalStep,
38
+ intervalStepMax,
39
+ selections,
40
+ getValue,
41
+ parseValue
42
+ } = useCron(minValue, maxValue);
43
+ const updateModelValue = (day) => {
44
+ emit("update:modelValue", day);
45
+ };
46
+ watch(
47
+ [type, start, end, intervalStart, intervalStep, selections],
48
+ () => {
49
+ updateModelValue(getValue());
50
+ },
51
+ { deep: true, immediate: true }
52
+ );
53
+ watch(
54
+ () => props.modelValue,
55
+ (hour) => {
56
+ parseValue(hour);
57
+ },
58
+ { immediate: true }
59
+ );
60
+ return (_ctx, _cache) => {
61
+ return openBlock(), createElementBlock("div", _hoisted_1, [
62
+ createVNode(unref(ElRadioGroup), {
63
+ modelValue: unref(type),
64
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(type) ? type.value = $event : null)
65
+ }, {
66
+ default: withCtx(() => [
67
+ createVNode(unref(ElRadio), {
68
+ value: "every",
69
+ label: __props.lang.hourEvery
70
+ }, null, 8, ["label"]),
71
+ createVNode(unref(ElRadio), {
72
+ value: "range",
73
+ class: "ele-cron-panel-item-wrapper"
74
+ }, {
75
+ default: withCtx(() => [
76
+ createElementVNode("div", _hoisted_2, [
77
+ createElementVNode("div", null, toDisplayString(__props.lang.hourRangeStart) + " ", 1),
78
+ createElementVNode("div", _hoisted_3, [
79
+ createVNode(unref(ElInputNumber), {
80
+ modelValue: unref(start),
81
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(start) ? start.value = $event : null),
82
+ min: minValue,
83
+ max: maxValue - 1,
84
+ placeholder: "",
85
+ controlsPosition: "right"
86
+ }, null, 8, ["modelValue", "max"])
87
+ ]),
88
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.hourRange) + " ", 1),
89
+ createElementVNode("div", _hoisted_4, [
90
+ createVNode(unref(ElInputNumber), {
91
+ modelValue: unref(end),
92
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(end) ? end.value = $event : null),
93
+ min: unref(endMin),
94
+ max: maxValue,
95
+ placeholder: "",
96
+ controlsPosition: "right"
97
+ }, null, 8, ["modelValue", "min"])
98
+ ]),
99
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.hourRangeEnd), 1)
100
+ ])
101
+ ]),
102
+ _: 1
103
+ }),
104
+ createVNode(unref(ElRadio), {
105
+ value: "interval",
106
+ class: "ele-cron-panel-item-wrapper"
107
+ }, {
108
+ default: withCtx(() => [
109
+ createElementVNode("div", _hoisted_5, [
110
+ createElementVNode("div", null, toDisplayString(__props.lang.hourIntervalStart) + " ", 1),
111
+ createElementVNode("div", _hoisted_6, [
112
+ createVNode(unref(ElInputNumber), {
113
+ modelValue: unref(intervalStart),
114
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(intervalStart) ? intervalStart.value = $event : null),
115
+ min: minValue,
116
+ max: maxValue - 1,
117
+ placeholder: "",
118
+ controlsPosition: "right"
119
+ }, null, 8, ["modelValue", "max"])
120
+ ]),
121
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.hourInterval) + " ", 1),
122
+ createElementVNode("div", _hoisted_7, [
123
+ createVNode(unref(ElInputNumber), {
124
+ modelValue: unref(intervalStep),
125
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(intervalStep) ? intervalStep.value = $event : null),
126
+ min: 1,
127
+ max: unref(intervalStepMax),
128
+ placeholder: "",
129
+ controlsPosition: "right"
130
+ }, null, 8, ["modelValue", "max"])
131
+ ]),
132
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.hourIntervalEnd), 1)
133
+ ])
134
+ ]),
135
+ _: 1
136
+ }),
137
+ createVNode(unref(ElRadio), {
138
+ value: "specified",
139
+ class: "ele-cron-panel-item-wrapper ele-cron-panel-options-wrapper"
140
+ }, {
141
+ default: withCtx(() => [
142
+ createElementVNode("div", null, toDisplayString(__props.lang.hourSpecified), 1),
143
+ createElementVNode("div", _hoisted_8, [
144
+ createVNode(unref(ElCheckboxGroup), {
145
+ modelValue: unref(selections),
146
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(selections) ? selections.value = $event : null)
147
+ }, {
148
+ default: withCtx(() => [
149
+ (openBlock(true), createElementBlock(Fragment, null, renderList(maxValue + 1, (item) => {
150
+ return openBlock(), createElementBlock(Fragment, { key: item }, [
151
+ item - 1 >= minValue ? (openBlock(), createBlock(unref(ElCheckbox), {
152
+ key: 0,
153
+ value: item - 1,
154
+ label: item - 1
155
+ }, null, 8, ["value", "label"])) : createCommentVNode("", true)
156
+ ], 64);
157
+ }), 128))
158
+ ]),
159
+ _: 1
160
+ }, 8, ["modelValue"])
161
+ ])
162
+ ]),
163
+ _: 1
164
+ })
165
+ ]),
166
+ _: 1
167
+ }, 8, ["modelValue"])
168
+ ]);
169
+ };
170
+ }
171
+ });
172
+ export {
173
+ _sfc_main as default
174
+ };
@@ -0,0 +1,25 @@
1
+ import { PropType } from 'vue';
2
+ import { CronPanelLocale } from '../types';
3
+
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ /** minute */
6
+ modelValue: StringConstructor;
7
+ /** 国际化 */
8
+ lang: {
9
+ type: PropType<CronPanelLocale>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ "update:modelValue": (_minute?: string | undefined) => void;
14
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ /** minute */
16
+ modelValue: StringConstructor;
17
+ /** 国际化 */
18
+ lang: {
19
+ type: PropType<CronPanelLocale>;
20
+ required: true;
21
+ };
22
+ }>> & Readonly<{
23
+ "onUpdate:modelValue"?: ((_minute?: string | undefined) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ export default _default;
@@ -0,0 +1,174 @@
1
+ import { defineComponent, watch, createElementBlock, openBlock, createVNode, unref, isRef, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createBlock, createCommentVNode } from "vue";
2
+ import { ElRadioGroup, ElRadio, ElInputNumber, ElCheckboxGroup, ElCheckbox } from "element-plus";
3
+ import { useCron } from "../util";
4
+ const _hoisted_1 = { class: "ele-cron-panel-content" };
5
+ const _hoisted_2 = { class: "ele-cron-panel-item" };
6
+ const _hoisted_3 = { class: "ele-cron-panel-item-input" };
7
+ const _hoisted_4 = { class: "ele-cron-panel-item-input" };
8
+ const _hoisted_5 = { class: "ele-cron-panel-item" };
9
+ const _hoisted_6 = { class: "ele-cron-panel-item-input" };
10
+ const _hoisted_7 = { class: "ele-cron-panel-item-input" };
11
+ const _hoisted_8 = { class: "ele-cron-panel-options" };
12
+ const minValue = 0;
13
+ const maxValue = 59;
14
+ const _sfc_main = /* @__PURE__ */ defineComponent({
15
+ __name: "cron-minute",
16
+ props: {
17
+ /** minute */
18
+ modelValue: String,
19
+ /** 国际化 */
20
+ lang: {
21
+ type: Object,
22
+ required: true
23
+ }
24
+ },
25
+ emits: {
26
+ "update:modelValue": (_minute) => true
27
+ },
28
+ setup(__props, { emit: __emit }) {
29
+ const props = __props;
30
+ const emit = __emit;
31
+ const {
32
+ type,
33
+ start,
34
+ end,
35
+ endMin,
36
+ intervalStart,
37
+ intervalStep,
38
+ intervalStepMax,
39
+ selections,
40
+ getValue,
41
+ parseValue
42
+ } = useCron(minValue, maxValue);
43
+ const updateModelValue = (day) => {
44
+ emit("update:modelValue", day);
45
+ };
46
+ watch(
47
+ [type, start, end, intervalStart, intervalStep, selections],
48
+ () => {
49
+ updateModelValue(getValue());
50
+ },
51
+ { deep: true, immediate: true }
52
+ );
53
+ watch(
54
+ () => props.modelValue,
55
+ (minute) => {
56
+ parseValue(minute);
57
+ },
58
+ { immediate: true }
59
+ );
60
+ return (_ctx, _cache) => {
61
+ return openBlock(), createElementBlock("div", _hoisted_1, [
62
+ createVNode(unref(ElRadioGroup), {
63
+ modelValue: unref(type),
64
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(type) ? type.value = $event : null)
65
+ }, {
66
+ default: withCtx(() => [
67
+ createVNode(unref(ElRadio), {
68
+ value: "every",
69
+ label: __props.lang.minuteEvery
70
+ }, null, 8, ["label"]),
71
+ createVNode(unref(ElRadio), {
72
+ value: "range",
73
+ class: "ele-cron-panel-item-wrapper"
74
+ }, {
75
+ default: withCtx(() => [
76
+ createElementVNode("div", _hoisted_2, [
77
+ createElementVNode("div", null, toDisplayString(__props.lang.minuteRangeStart) + " ", 1),
78
+ createElementVNode("div", _hoisted_3, [
79
+ createVNode(unref(ElInputNumber), {
80
+ modelValue: unref(start),
81
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(start) ? start.value = $event : null),
82
+ min: minValue,
83
+ max: maxValue - 1,
84
+ placeholder: "",
85
+ controlsPosition: "right"
86
+ }, null, 8, ["modelValue", "max"])
87
+ ]),
88
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.minuteRange) + " ", 1),
89
+ createElementVNode("div", _hoisted_4, [
90
+ createVNode(unref(ElInputNumber), {
91
+ modelValue: unref(end),
92
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(end) ? end.value = $event : null),
93
+ min: unref(endMin),
94
+ max: maxValue,
95
+ placeholder: "",
96
+ controlsPosition: "right"
97
+ }, null, 8, ["modelValue", "min"])
98
+ ]),
99
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.minuteRangeEnd), 1)
100
+ ])
101
+ ]),
102
+ _: 1
103
+ }),
104
+ createVNode(unref(ElRadio), {
105
+ value: "interval",
106
+ class: "ele-cron-panel-item-wrapper"
107
+ }, {
108
+ default: withCtx(() => [
109
+ createElementVNode("div", _hoisted_5, [
110
+ createElementVNode("div", null, toDisplayString(__props.lang.minuteIntervalStart) + " ", 1),
111
+ createElementVNode("div", _hoisted_6, [
112
+ createVNode(unref(ElInputNumber), {
113
+ modelValue: unref(intervalStart),
114
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(intervalStart) ? intervalStart.value = $event : null),
115
+ min: minValue,
116
+ max: maxValue - 1,
117
+ placeholder: "",
118
+ controlsPosition: "right"
119
+ }, null, 8, ["modelValue", "max"])
120
+ ]),
121
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.minuteInterval) + " ", 1),
122
+ createElementVNode("div", _hoisted_7, [
123
+ createVNode(unref(ElInputNumber), {
124
+ modelValue: unref(intervalStep),
125
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(intervalStep) ? intervalStep.value = $event : null),
126
+ min: 1,
127
+ max: unref(intervalStepMax),
128
+ placeholder: "",
129
+ controlsPosition: "right"
130
+ }, null, 8, ["modelValue", "max"])
131
+ ]),
132
+ createElementVNode("div", null, " " + toDisplayString(__props.lang.minuteIntervalEnd), 1)
133
+ ])
134
+ ]),
135
+ _: 1
136
+ }),
137
+ createVNode(unref(ElRadio), {
138
+ value: "specified",
139
+ class: "ele-cron-panel-item-wrapper ele-cron-panel-options-wrapper"
140
+ }, {
141
+ default: withCtx(() => [
142
+ createElementVNode("div", null, toDisplayString(__props.lang.minuteSpecified), 1),
143
+ createElementVNode("div", _hoisted_8, [
144
+ createVNode(unref(ElCheckboxGroup), {
145
+ modelValue: unref(selections),
146
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(selections) ? selections.value = $event : null)
147
+ }, {
148
+ default: withCtx(() => [
149
+ (openBlock(true), createElementBlock(Fragment, null, renderList(maxValue + 1, (item) => {
150
+ return openBlock(), createElementBlock(Fragment, { key: item }, [
151
+ item - 1 >= minValue ? (openBlock(), createBlock(unref(ElCheckbox), {
152
+ key: 0,
153
+ value: item - 1,
154
+ label: item - 1
155
+ }, null, 8, ["value", "label"])) : createCommentVNode("", true)
156
+ ], 64);
157
+ }), 128))
158
+ ]),
159
+ _: 1
160
+ }, 8, ["modelValue"])
161
+ ])
162
+ ]),
163
+ _: 1
164
+ })
165
+ ]),
166
+ _: 1
167
+ }, 8, ["modelValue"])
168
+ ]);
169
+ };
170
+ }
171
+ });
172
+ export {
173
+ _sfc_main as default
174
+ };
@@ -0,0 +1,25 @@
1
+ import { PropType } from 'vue';
2
+ import { CronPanelLocale } from '../types';
3
+
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ /** month */
6
+ modelValue: StringConstructor;
7
+ /** 国际化 */
8
+ lang: {
9
+ type: PropType<CronPanelLocale>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ "update:modelValue": (_month?: string | undefined) => void;
14
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ /** month */
16
+ modelValue: StringConstructor;
17
+ /** 国际化 */
18
+ lang: {
19
+ type: PropType<CronPanelLocale>;
20
+ required: true;
21
+ };
22
+ }>> & Readonly<{
23
+ "onUpdate:modelValue"?: ((_month?: string | undefined) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ export default _default;