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 {
9999 ]
100100 }
101101
102- periods ( format : CronFormat ) {
102+ periods ( format : CronFormat ) : Period [ ] {
103103 const isQuartz = format == 'quartz'
104104 const second = isQuartz ? [ { id : 'q-second' , value : [ ] } ] : [ ]
105105 const secondField = isQuartz ? [ 'second' ] : [ ]
@@ -146,7 +146,7 @@ export function useCron(options: CronOptions) {
146146 const periods = ( options . periods ?? cronDefaults . periods ( format ) ) . map ( ( p ) => {
147147 return {
148148 ...p ,
149- text : l10n . getLocaleStr ( p . id , TextPosition . Text ) ,
149+ text : p . text ?? l10n . getLocaleStr ( p . id , TextPosition . Text ) ,
150150 }
151151 } )
152152 const initialPeriod =
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ export interface Period {
5252 * The value determines which fields are visible
5353 */
5454 value : string [ ]
55+
56+ /**
57+ * The display name of the period
58+ */
59+ text ?: string
5560}
5661
5762export class FieldWrapper {
You can’t perform that action at this time.
0 commit comments