# CronCore - Component
# Props
Name | Type | Default | Description |
---|---|---|---|
value |
|
| the current cron expression |
fields |
|
| each field defines on position of the cron expression |
periods |
|
| the |
locale |
|
| |
custom-locale |
|
# Types
type Field = {
id: string,
items: Array<{
text: string
alt: string
value: string
}>
}
type Period = {
id: string,
text: string,
value: string[]
}
type Locale = {
periodPrefix: string,
periodSuffix: string
eachPeriod: {
eachField: {
empty: string,
value: string,
range: string,
everyX: string,
prefix: string,
suffix: string,
},
'{{fieldId}}Field': {
empty: string,
value: string,
range: string,
everyX: string,
prefix: string,
suffix: string,
}
}
'{{periodId}}Period': {
eachField: {
empty: string,
value: string,
range: string,
everyX: string,
prefix: string,
suffix: string,
},
'{{fieldId}}Field': {
empty: string,
value: string,
range: string,
everyX: string,
prefix: string,
suffix: string,
}
}
}
# Events
Name | Description |
---|---|
input | emitted when the cron expression changed |
error | emitted when the cron expression is invalid |
# Slots
Name | Description | Slot Props |
---|---|---|
default | used to render the cron editor |
|
# Types
type CronState = {
fields: Array<{
attrs: {
value: Array<number> //array item values
},
events: {
input: (arg1: Array<number>) => void
},
id: string,
items: Array<Object> //see type Field
cron: string,
selectedStr: string,
prefix: string,
suffix: string
}>,
period: {
attrs: {
value: string //selected period id
},
events: {
input: (periodId: string) => void
},
items: Array<Period>,
prefix: string,
suffix: string
},
error: string
}
util →