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,228 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const elementPlus = require("element-plus");
4
+ const util = require("../util");
5
+ const _hoisted_1 = { class: "ele-cron-panel-content" };
6
+ const _hoisted_2 = { class: "ele-cron-panel-item" };
7
+ const _hoisted_3 = { class: "ele-cron-panel-item-input" };
8
+ const _hoisted_4 = { class: "ele-cron-panel-item-input" };
9
+ const _hoisted_5 = { class: "ele-cron-panel-item" };
10
+ const _hoisted_6 = { class: "ele-cron-panel-item-input" };
11
+ const _hoisted_7 = { class: "ele-cron-panel-item-input" };
12
+ const _hoisted_8 = { class: "ele-cron-panel-options" };
13
+ const _hoisted_9 = { class: "ele-cron-panel-item" };
14
+ const _hoisted_10 = { class: "ele-cron-panel-item-input" };
15
+ const minValue = 1;
16
+ const maxValue = 7;
17
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
18
+ __name: "cron-week",
19
+ props: {
20
+ /** week */
21
+ modelValue: String,
22
+ /** 国际化 */
23
+ lang: {
24
+ type: Object,
25
+ required: true
26
+ }
27
+ },
28
+ emits: {
29
+ "update:modelValue": (_week) => true
30
+ },
31
+ setup(__props, { emit: __emit }) {
32
+ const props = __props;
33
+ const emit = __emit;
34
+ const {
35
+ type,
36
+ start,
37
+ end,
38
+ endMin,
39
+ intervalStart,
40
+ intervalStep,
41
+ selections,
42
+ getValue,
43
+ parseValue
44
+ } = util.useCron(minValue, maxValue, "unset");
45
+ const lastWeek = vue.ref(1);
46
+ const weekNames = vue.computed(() => {
47
+ return [
48
+ props.lang.weekName1,
49
+ props.lang.weekName2,
50
+ props.lang.weekName3,
51
+ props.lang.weekName4,
52
+ props.lang.weekName5,
53
+ props.lang.weekName6,
54
+ props.lang.weekName7
55
+ ];
56
+ });
57
+ const updateModelValue = (day) => {
58
+ emit("update:modelValue", day);
59
+ };
60
+ vue.watch(
61
+ [type, start, end, intervalStart, intervalStep, selections],
62
+ () => {
63
+ if (type.value === "last") {
64
+ updateModelValue(`${lastWeek.value}L`);
65
+ return;
66
+ }
67
+ if (type.value === "unset") {
68
+ updateModelValue("?");
69
+ return;
70
+ }
71
+ updateModelValue(getValue());
72
+ },
73
+ { deep: true, immediate: true }
74
+ );
75
+ vue.watch(
76
+ () => props.modelValue,
77
+ (week) => {
78
+ if (week != null && week.endsWith("L")) {
79
+ type.value = "last";
80
+ lastWeek.value = Number(week.slice(0, -1));
81
+ return;
82
+ }
83
+ if (week === "?") {
84
+ type.value = "unset";
85
+ return;
86
+ }
87
+ parseValue(week);
88
+ },
89
+ { immediate: true }
90
+ );
91
+ return (_ctx, _cache) => {
92
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
93
+ vue.createVNode(vue.unref(elementPlus.ElRadioGroup), {
94
+ modelValue: vue.unref(type),
95
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.isRef(type) ? type.value = $event : null)
96
+ }, {
97
+ default: vue.withCtx(() => [
98
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
99
+ value: "every",
100
+ label: __props.lang.weekEvery
101
+ }, null, 8, ["label"]),
102
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
103
+ value: "range",
104
+ class: "ele-cron-panel-item-wrapper"
105
+ }, {
106
+ default: vue.withCtx(() => [
107
+ vue.createElementVNode("div", _hoisted_2, [
108
+ vue.createElementVNode("div", null, vue.toDisplayString(__props.lang.weekRangeStart) + " ", 1),
109
+ vue.createElementVNode("div", _hoisted_3, [
110
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), {
111
+ modelValue: vue.unref(start),
112
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(start) ? start.value = $event : null),
113
+ min: minValue,
114
+ max: maxValue - 1,
115
+ placeholder: "",
116
+ controlsPosition: "right"
117
+ }, null, 8, ["modelValue", "max"])
118
+ ]),
119
+ vue.createElementVNode("div", null, " " + vue.toDisplayString(__props.lang.weekRange) + " ", 1),
120
+ vue.createElementVNode("div", _hoisted_4, [
121
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), {
122
+ modelValue: vue.unref(end),
123
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(end) ? end.value = $event : null),
124
+ min: vue.unref(endMin),
125
+ max: maxValue,
126
+ placeholder: "",
127
+ controlsPosition: "right"
128
+ }, null, 8, ["modelValue", "min"])
129
+ ])
130
+ ])
131
+ ]),
132
+ _: 1
133
+ }),
134
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
135
+ value: "interval",
136
+ class: "ele-cron-panel-item-wrapper"
137
+ }, {
138
+ default: vue.withCtx(() => [
139
+ vue.createElementVNode("div", _hoisted_5, [
140
+ vue.createElementVNode("div", null, vue.toDisplayString(__props.lang.weekIntervalStart) + " ", 1),
141
+ vue.createElementVNode("div", _hoisted_6, [
142
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), {
143
+ modelValue: vue.unref(intervalStart),
144
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(intervalStart) ? intervalStart.value = $event : null),
145
+ min: minValue,
146
+ max: 4,
147
+ placeholder: "",
148
+ controlsPosition: "right"
149
+ }, null, 8, ["modelValue"])
150
+ ]),
151
+ vue.createElementVNode("div", null, " " + vue.toDisplayString(__props.lang.weekInterval) + " ", 1),
152
+ vue.createElementVNode("div", _hoisted_7, [
153
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), {
154
+ modelValue: vue.unref(intervalStep),
155
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(intervalStep) ? intervalStep.value = $event : null),
156
+ min: minValue,
157
+ max: maxValue,
158
+ placeholder: "",
159
+ controlsPosition: "right"
160
+ }, null, 8, ["modelValue"])
161
+ ]),
162
+ vue.createElementVNode("div", null, " " + vue.toDisplayString(__props.lang.weekIntervalEnd), 1)
163
+ ])
164
+ ]),
165
+ _: 1
166
+ }),
167
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
168
+ value: "specified",
169
+ class: "ele-cron-panel-item-wrapper ele-cron-panel-options-wrapper"
170
+ }, {
171
+ default: vue.withCtx(() => [
172
+ vue.createElementVNode("div", null, vue.toDisplayString(__props.lang.weekSpecified), 1),
173
+ vue.createElementVNode("div", _hoisted_8, [
174
+ vue.createVNode(vue.unref(elementPlus.ElCheckboxGroup), {
175
+ modelValue: vue.unref(selections),
176
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(selections) ? selections.value = $event : null)
177
+ }, {
178
+ default: vue.withCtx(() => [
179
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(maxValue + 1, (item) => {
180
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: item }, [
181
+ item - 1 >= minValue ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElCheckbox), {
182
+ key: 0,
183
+ value: item - 1,
184
+ label: weekNames.value[item - 1 - 1],
185
+ class: "ele-cron-panel-item-input"
186
+ }, null, 8, ["value", "label"])) : vue.createCommentVNode("", true)
187
+ ], 64);
188
+ }), 128))
189
+ ]),
190
+ _: 1
191
+ }, 8, ["modelValue"])
192
+ ])
193
+ ]),
194
+ _: 1
195
+ }),
196
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
197
+ value: "last",
198
+ class: "ele-cron-panel-item-wrapper"
199
+ }, {
200
+ default: vue.withCtx(() => [
201
+ vue.createElementVNode("div", _hoisted_9, [
202
+ vue.createElementVNode("div", null, vue.toDisplayString(__props.lang.weekLast) + " ", 1),
203
+ vue.createElementVNode("div", _hoisted_10, [
204
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), {
205
+ modelValue: lastWeek.value,
206
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => lastWeek.value = $event),
207
+ min: minValue,
208
+ max: maxValue,
209
+ placeholder: "",
210
+ controlsPosition: "right"
211
+ }, null, 8, ["modelValue"])
212
+ ])
213
+ ])
214
+ ]),
215
+ _: 1
216
+ }),
217
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
218
+ value: "unset",
219
+ label: __props.lang.weekUnset
220
+ }, null, 8, ["label"])
221
+ ]),
222
+ _: 1
223
+ }, 8, ["modelValue"])
224
+ ]);
225
+ };
226
+ }
227
+ });
228
+ module.exports = _sfc_main;
@@ -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
+ /** week */
6
+ modelValue: StringConstructor;
7
+ /** 国际化 */
8
+ lang: {
9
+ type: PropType<CronPanelLocale>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ "update:modelValue": (_week?: string | undefined) => void;
14
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ /** week */
16
+ modelValue: StringConstructor;
17
+ /** 国际化 */
18
+ lang: {
19
+ type: PropType<CronPanelLocale>;
20
+ required: true;
21
+ };
22
+ }>> & Readonly<{
23
+ "onUpdate:modelValue"?: ((_week?: string | undefined) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ export default _default;
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const elementPlus = require("element-plus");
4
+ const util = require("../util");
5
+ const _hoisted_1 = { class: "ele-cron-panel-content" };
6
+ const _hoisted_2 = { class: "ele-cron-panel-item" };
7
+ const _hoisted_3 = { class: "ele-cron-panel-item-input" };
8
+ const _hoisted_4 = { class: "ele-cron-panel-item-input" };
9
+ const _hoisted_5 = { class: "ele-cron-panel-item" };
10
+ const _hoisted_6 = { class: "ele-cron-panel-item-input" };
11
+ const _hoisted_7 = { class: "ele-cron-panel-item-input" };
12
+ const _hoisted_8 = { class: "ele-cron-panel-options" };
13
+ const minValue = 2024;
14
+ const maxValue = 2054;
15
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
+ __name: "cron-year",
17
+ props: {
18
+ /** year */
19
+ modelValue: String,
20
+ /** 国际化 */
21
+ lang: {
22
+ type: Object,
23
+ required: true
24
+ }
25
+ },
26
+ emits: {
27
+ "update:modelValue": (_year) => true
28
+ },
29
+ setup(__props, { emit: __emit }) {
30
+ const props = __props;
31
+ const emit = __emit;
32
+ const {
33
+ type,
34
+ start,
35
+ end,
36
+ endMin,
37
+ intervalStart,
38
+ intervalStep,
39
+ intervalStepMax,
40
+ selections,
41
+ getValue,
42
+ parseValue
43
+ } = util.useCron(minValue, maxValue, "unset");
44
+ const updateModelValue = (day) => {
45
+ emit("update:modelValue", day);
46
+ };
47
+ vue.watch(
48
+ [type, start, end, intervalStart, intervalStep, selections],
49
+ () => {
50
+ if (type.value === "unset") {
51
+ updateModelValue("");
52
+ return;
53
+ }
54
+ updateModelValue(getValue());
55
+ },
56
+ { deep: true, immediate: true }
57
+ );
58
+ vue.watch(
59
+ () => props.modelValue,
60
+ (year) => {
61
+ if (year == null || year === "" || year === "?") {
62
+ type.value = "unset";
63
+ return;
64
+ }
65
+ parseValue(year);
66
+ },
67
+ { immediate: true }
68
+ );
69
+ return (_ctx, _cache) => {
70
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
71
+ vue.createVNode(vue.unref(elementPlus.ElRadioGroup), {
72
+ modelValue: vue.unref(type),
73
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.isRef(type) ? type.value = $event : null)
74
+ }, {
75
+ default: vue.withCtx(() => [
76
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
77
+ value: "every",
78
+ label: __props.lang.yearEvery
79
+ }, null, 8, ["label"]),
80
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
81
+ value: "range",
82
+ class: "ele-cron-panel-item-wrapper"
83
+ }, {
84
+ default: vue.withCtx(() => [
85
+ vue.createElementVNode("div", _hoisted_2, [
86
+ vue.createElementVNode("div", null, vue.toDisplayString(__props.lang.yearRangeStart) + " ", 1),
87
+ vue.createElementVNode("div", _hoisted_3, [
88
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), {
89
+ modelValue: vue.unref(start),
90
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(start) ? start.value = $event : null),
91
+ min: minValue,
92
+ max: maxValue - 1,
93
+ placeholder: "",
94
+ controlsPosition: "right"
95
+ }, null, 8, ["modelValue", "max"])
96
+ ]),
97
+ vue.createElementVNode("div", null, " " + vue.toDisplayString(__props.lang.yearRange) + " ", 1),
98
+ vue.createElementVNode("div", _hoisted_4, [
99
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), {
100
+ modelValue: vue.unref(end),
101
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(end) ? end.value = $event : null),
102
+ min: vue.unref(endMin),
103
+ max: maxValue,
104
+ placeholder: "",
105
+ controlsPosition: "right"
106
+ }, null, 8, ["modelValue", "min"])
107
+ ]),
108
+ vue.createElementVNode("div", null, " " + vue.toDisplayString(__props.lang.yearRangeEnd), 1)
109
+ ])
110
+ ]),
111
+ _: 1
112
+ }),
113
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
114
+ value: "interval",
115
+ class: "ele-cron-panel-item-wrapper"
116
+ }, {
117
+ default: vue.withCtx(() => [
118
+ vue.createElementVNode("div", _hoisted_5, [
119
+ vue.createElementVNode("div", null, vue.toDisplayString(__props.lang.yearIntervalStart) + " ", 1),
120
+ vue.createElementVNode("div", _hoisted_6, [
121
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), {
122
+ modelValue: vue.unref(intervalStart),
123
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(intervalStart) ? intervalStart.value = $event : null),
124
+ min: minValue,
125
+ max: maxValue - 1,
126
+ placeholder: "",
127
+ controlsPosition: "right"
128
+ }, null, 8, ["modelValue", "max"])
129
+ ]),
130
+ vue.createElementVNode("div", null, " " + vue.toDisplayString(__props.lang.yearInterval) + " ", 1),
131
+ vue.createElementVNode("div", _hoisted_7, [
132
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), {
133
+ modelValue: vue.unref(intervalStep),
134
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(intervalStep) ? intervalStep.value = $event : null),
135
+ min: 1,
136
+ max: vue.unref(intervalStepMax),
137
+ placeholder: "",
138
+ controlsPosition: "right"
139
+ }, null, 8, ["modelValue", "max"])
140
+ ]),
141
+ vue.createElementVNode("div", null, " " + vue.toDisplayString(__props.lang.yearIntervalEnd), 1)
142
+ ])
143
+ ]),
144
+ _: 1
145
+ }),
146
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
147
+ value: "specified",
148
+ class: "ele-cron-panel-item-wrapper ele-cron-panel-options-wrapper"
149
+ }, {
150
+ default: vue.withCtx(() => [
151
+ vue.createElementVNode("div", null, vue.toDisplayString(__props.lang.yearSpecified), 1),
152
+ vue.createElementVNode("div", _hoisted_8, [
153
+ vue.createVNode(vue.unref(elementPlus.ElCheckboxGroup), {
154
+ modelValue: vue.unref(selections),
155
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(selections) ? selections.value = $event : null)
156
+ }, {
157
+ default: vue.withCtx(() => [
158
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(maxValue + 1, (item) => {
159
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: item }, [
160
+ item - 1 >= minValue ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElCheckbox), {
161
+ key: 0,
162
+ value: item - 1,
163
+ label: item - 1
164
+ }, null, 8, ["value", "label"])) : vue.createCommentVNode("", true)
165
+ ], 64);
166
+ }), 128))
167
+ ]),
168
+ _: 1
169
+ }, 8, ["modelValue"])
170
+ ])
171
+ ]),
172
+ _: 1
173
+ }),
174
+ vue.createVNode(vue.unref(elementPlus.ElRadio), {
175
+ value: "unset",
176
+ label: __props.lang.yearUnset
177
+ }, null, 8, ["label"])
178
+ ]),
179
+ _: 1
180
+ }, 8, ["modelValue"])
181
+ ]);
182
+ };
183
+ }
184
+ });
185
+ module.exports = _sfc_main;
@@ -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
+ /** year */
6
+ modelValue: StringConstructor;
7
+ /** 国际化 */
8
+ lang: {
9
+ type: PropType<CronPanelLocale>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ "update:modelValue": (_year?: string | undefined) => void;
14
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ /** year */
16
+ modelValue: StringConstructor;
17
+ /** 国际化 */
18
+ lang: {
19
+ type: PropType<CronPanelLocale>;
20
+ required: true;
21
+ };
22
+ }>> & Readonly<{
23
+ "onUpdate:modelValue"?: ((_year?: string | undefined) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ export default _default;