File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export class DefaultCronOptions {
99
99
]
100
100
}
101
101
102
- periods ( format : CronFormat ) {
102
+ periods ( format : CronFormat ) : Period [ ] {
103
103
const isQuartz = format == 'quartz'
104
104
const second = isQuartz ? [ { id : 'q-second' , value : [ ] } ] : [ ]
105
105
const secondField = isQuartz ? [ 'second' ] : [ ]
@@ -146,7 +146,7 @@ export function useCron(options: CronOptions) {
146
146
const periods = ( options . periods ?? cronDefaults . periods ( format ) ) . map ( ( p ) => {
147
147
return {
148
148
...p ,
149
- text : l10n . getLocaleStr ( p . id , TextPosition . Text ) ,
149
+ text : p . text ?? l10n . getLocaleStr ( p . id , TextPosition . Text ) ,
150
150
}
151
151
} )
152
152
const initialPeriod =
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ export interface Period {
52
52
* The value determines which fields are visible
53
53
*/
54
54
value : string [ ]
55
+
56
+ /**
57
+ * The display name of the period
58
+ */
59
+ text ?: string
55
60
}
56
61
57
62
export class FieldWrapper {
You can’t perform that action at this time.
0 commit comments